Inline comments

Hello!

I document my scripts with the PhpDocumentor.
In some methods I have inline comments.
Can I invest in the Javadoc comment block adopt these comments automatically.

Sincerely yours

Stephan

3 comments

Stephan, could you please provide the examples of code: what you have and what you'd like to have?

0

Hello!

I've written a method in a class.
In this class are 2 inline comments.

public function getMyWert1(Front_Model_myModel $aaa, array $bbb)
    {

        // contrl is array
        if (array_key_exists('a1', $bbb)) {

            ...

        }

        // control is object
        if (is_object($aaa)) {

            ...

        }

        return $bbb;
    }

If I type / **
Javadoc is the block generated.
The inline comments are not included.

     /**
     * @param Front_Model_myModel $aaa
     * @param array $bbb
     * @return array
     */
    public function getMyWert1(Front_Model_myModel $aaa, array $bbb)
    {

        // contrl is array
        if (array_key_exists('a1', $bbb)) {

            ...

        }

        // control is object
        if (is_object($aaa)) {

            ...

        }

        return $bbb;
    }

Is it possible to take the inline comments automatically?

/**
     * + contrl is array
     * + control is object
     *
     * @param Front_Model_myModel $aaa
     * @param array $bbb
     * @return array
     */

Your sincerly

Stephan

0

Hi Stephan,

If I type / ** Javadoc is the block generated.

It's called PHPDoc in PHP world -- http://www.phpdoc.org/docs/latest/index.html

Is it possible to take the inline comments automatically?

No -- such functionality is not currently present in PhpStorm.

Considering that "proper guys" would normally write some comments to explain some moments in their code ... such approach (to add these comment into method PHPDoc comment) would be overkill (unless configurable, of course). So far I have not seen any open source project/librarys that would use it.

0

Please sign in to leave a comment.