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 :)
Please sign in to leave a comment.
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?
HI thnak you for your answer
if its possible something like this
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.
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...
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 ?
%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