Coder Social home page Coder Social logo

phpdocumentor-markdown's Issues

Error in creating links to parent interfaces

When I tried to create documentation for this interface:

<?php
/**
 * Файл с интерфейсом
 * события для `Selsyn`
 *
 * PHP version 8
 *
 * @category Event
 * @package  Selsyn
 * @author   Whatis <[email protected]>
 * @license  unlicense
 * @link     https://github.com/TheWhatis/Selsyn
 */

namespace Whatis\Selsyn\Event;

use Psr\EventDispatcher\StoppableEventInterface;

/**
 * Интерфейс для `Selsyn`
 *
 * PHP version 8
 *
 * @category Event
 * @package  Selsyn
 * @author   Whatis <[email protected]>
 * @license  unlicense
 * @link     https://github.com/TheWhatis/Selsyn
 */
interface IEvent extends StoppableEventInterface
{
    /**
     * Получить название события
     *
     * @return string
     */
    public static function getName(): string;
}

I got an error: strtr(): Argument #1 ($string) must be of type string, phpDocumentor\Descriptor\Collection given.

There was no time to wait until you read and correct (if you correct at all), so I myself found where the problem is.
I replaced this in the file interface.md.twig:

{% if node.parent and node.parent is not empty %}* Parent interface: {{ macros.mdClassLink(node.parent, macros.mdClassPath(node), node.parent.FullyQualifiedStructuralElementName) }}
{% endif %}

For this:

{% if node.parent and node.parent is not empty %}
* Parent interfaces: {% for parent in node.parent %}{% if loop.index0 > 0 %}{{ ', ' }}{% endif %}{{ macros.mdClassLink(parent, macros.mdClassPath(node), parent.FullyQualifiedStructuralElementName) }}{% endfor %}
{% endif %}

I would be grateful if you correct)

Internal links

Suggestion: For internal links, remove the .md appendix in order to provide compatibility with Wiki pages. Current template opens raw md files instead of rendering it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.