0

PhpStorm generate an empty doc-comments:

'/** + space' or 'alt + insert'

return this:

   /**
    * 
    */
    public function getSomething(array $data): string
    {
        return implode($data);
    }

Generation of setters or getters also do not work.

Check active plugins all are enabled. Is anybody faced with similar problem or know how to fix it ?

OS: Ubuntu 16.04

PhpStorm: 2017.1.2

Plugins: PHP`s stuff + symfony

UPDATE:

PhpStorm logs:

2017-10-31 18:21:44,059 [2490534] WARN - s.quality.QualityToolAnnotator - phpcs: Failed loading /usr/lib/php/20151012/xdebug.so: /usr/lib/php/20151012/xdebug.so: undefined symbol: php_log_err for '/home/simpson/development/www/loanscrm/src/CrmBundle/Entity/Loan.php' on local 2017-10-31 18:23:27,559 [2594034] WARN - Detector.MessDetectorAnnotator - Mess Detector path is empty for selected configuration 2017-10-31 18:23:27,869 [2594344] INFO - lity.QualityToolProcessHandler - STDERR: Failed loading /usr/lib/php/20151012/xdebug.so: /usr/lib/php/20151012/xdebug.so: undefined symbol: php_log_err 2017-10-31 18:23:28,085 [2594560] WARN - s.quality.QualityToolAnnotator - phpcs: Failed loading /usr/lib/php/20151012/xdebug.so: /usr/lib/php/20151012/xdebug.so: undefined symbol: php_log_err for '/home/simpson/development/www/loanscrm/src/CrmBundle/Entity/Loan.php' on local


'/** + enter' - also do not work :)

Odin Thunder
  • 3,284
  • 2
  • 28
  • 47
  • **1)** Check corresponding code templates in `Settings/Preferences | Editor | File and Code Templates` -- maybe resetting them to default will help **2)** Try with all custom (not bundled by default) plugins disabled -- maybe one of them is interfering. **3)** check `idea.log` file for possible hints (`Help | Show Log in XXX`) – LazyOne Oct 31 '17 at 16:08
  • I didn't know those short-cuts. I just hit *enter* right after `/**` :-? – Álvaro González Oct 31 '17 at 16:28
  • @ÁlvaroGonzález space make horizontal comments, enter vertical -in my case, no one are worked :) – Odin Thunder Oct 31 '17 at 16:31
  • I see. Some times, when PhpStorm goes berserk, "File/ Invalidate caches" works for me. – Álvaro González Oct 31 '17 at 16:34
  • @LazyOne 1. - ;2. -; 3 - add logs to question; Thnx for idea with logs now I now what to looking for :) – Odin Thunder Oct 31 '17 at 16:34
  • 1
    @ÁlvaroGonzález Local History will be also cleared - it is bad solution :) – Odin Thunder Oct 31 '17 at 16:35
  • 1
    Logs are showing irrelevant messages. As suggested try to disable all custom plugins (Plugins > Show: Custom). Also check if the same happens in another project – Dmitrii Nov 01 '17 at 10:46

1 Answers1

1

Write /** and press Enter on keyboard.

Mert Simsek
  • 1,550
  • 9
  • 19
  • The difference between using the method you have specified above and the method the OP posted is that using `/**` will provide you with empty PHP multi-line comments and when using the keyboard shortcut bundled in PhpStorm, if you have any parameters, or return statements, or anything else of the sort, it will include them within the doc-block for you. Here is more information: http://phpstorm.tips/tips/20-generate-docblocks. – Josh Murray Oct 31 '17 at 16:37
  • Thnx for advice but this also do not work :) Notice: try to avoid answers like this it is better solution to write stuff like this in comment – Odin Thunder Oct 31 '17 at 16:39