PSR file doc generate

hi,

 

I use phpstorm 2016.2 with phpcodesniffer. I have configure codesniffer to check the psr2 but i have some error with doc block because i don' have the file doc block.

I can generate doc block for function, class but not file or i don't see this. ? it is possible to integrate this on future version ? or how to remediate this ?

I have see one more thing, when i have something like this

/**
* @Security("has_role('ROLE_INFORMATIQUE')")
*/
public function listAction()
{
$listActions = $this->getDoctrine()->getRepository('CPCoreBundle:ActionPending')->getAllActionPendingNonExecutedDESC();

// creation de la vue
return $this->render('CPCoreBundle:ActionPending:list.html.twig', array('listActions' => $listActions));
}

i can't generate the doc function because there is @security... is it normal ? because with symfony we have more @ parameters ..

Thanks for your help :)

 

 

0
5 comments
Avatar
Permanently deleted user

Hello,

>I can generate doc block for function, class but not file or i don't see this. ? it is possible to integrate this on future version ? or how to remediate this ?

Please provide a code example and more details about where you need the PHPDoc block to be generated.

> i can't generate the doc function because there is @security... is it normal ? because with symfony we have more @ parameters ..

For what element exactly do you trigger the PHPDoc generation?

0
Avatar
Permanently deleted user

HI thnak you for your answer

if its possible something like this

/**
* Contient le formType pour le formulaire user.
*
* PHP version 7
*
* @category FormType
* @package DSIT\UserLdapBundle
* @author %user.name% <%user.mail%>
* @copyright 2016 DSIT
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @version GIT: %git.version.commit% (GF5D54SS12GG18D21SG21F)
* @link http://test.fr
*/

Some field can be autocomplete, others i can complete manually

For the second problem i think it's because i make this function with other editor.

0

Hi there,

For such "header" comments -- try Copyright plugin (bundled in latest versions) -- it made for such purpose.

Alternatively -- for more-or-less static stuff -- you may use Live Templates (code snippets)

 

P.S.

I do not think that any of the IDE functionality can work with %git.version.commit% stuff though...

0
Avatar
Permanently deleted user

Thanks i think i will use the live template

 

For the PS :) you have reason but it will be cool phpstorm doesn't know the git commit version ?

0

%git.version.commit% seems to be not supported yet. You can submit a feature request to add this at http://youtrack.jetbrains.com/issues/WI#newissue=yes

0

Please sign in to leave a comment.