docblocks

Override PHP docblock/annotation of method without overloading (PhpStorm autocompletion)

你。 提交于 2019-12-24 08:49:30
问题 This is a question about the autocompletion behavior in PhpStorm (and possibly other IDEs) in conjunction with PHP docblocks. I have to groups of classes in my application. First there are individual classes for various products (CarProduct, FoodProduct etc.), all inheriting from BaseProduct, and the counterpart for individual contracts (CarContract, FoodContract etc.), all inheriting from BaseContract. <?php class BaseContract { /** @var BaseProduct */ private $product; /** * @return

PhpStorm not to generate docblock for function/method arguments that are typehinted

萝らか妹 提交于 2019-12-24 01:54:48
问题 At the moment on my PhpStorm I have the following options enabled: File | Settings | Editor | Inspections | Missing @return tag` -> Marked both options there (Ignore PHPDoc without @param + Ignore PHPDoc with return type hint). File | Settings | Editor | Inspections | PHPDoc comment matches function/method signature` -> Mark option about allowing params with typehint. So according to these settings my functions should look like this: /** * @throws \Exception */ public function submit(string

Are there any PHP DocBlock parser tools available? [closed]

杀马特。学长 韩版系。学妹 提交于 2019-12-17 18:37:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I would like to build some smaller scale but hightly customized documentation sites for a few projects. PhpDocumentor is pretty great but it is very heavy. I thought about trying to tweak the templates for that but after spending only a couple of minutes looking into it I decided that it would be too much work.

PHP dynamic Page-level DocBlocks

故事扮演 提交于 2019-12-11 04:58:24
问题 I was wondering if there is a way to interact with the Page-level DocBlocks. My question is more specifically about wordpress plugin development, but this question has arised also in a non-wordpress environments. The reason is mainly the possibility to easily change VERSIONS and names throughout a large project with maybe a constant definition - but that will reflect also in the docblock.. The following example Docblock is from a wordpress plugin I write - /* Plugin Name: o99 Auxilary

PHP Docblocks - Explaining an array [duplicate]

谁说胖子不能爱 提交于 2019-12-07 07:15:11
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Is there a way for phpDoc to document an array of objects as a parameter? I've been searching, and looked at the phpDocumentor documentation but cannot find if there is a way to properly document @param array (as in, declare the keys / values types expected) that will be parsed and included in any generated documentation. This would lead me to believe there is no way to do it and I'll be resigned to using the

PHP Docblocks - Explaining an array [duplicate]

独自空忆成欢 提交于 2019-12-05 17:58:07
Possible Duplicate: Is there a way for phpDoc to document an array of objects as a parameter? I've been searching, and looked at the phpDocumentor documentation but cannot find if there is a way to properly document @param array (as in, declare the keys / values types expected) that will be parsed and included in any generated documentation. This would lead me to believe there is no way to do it and I'll be resigned to using the description. Thanks in advance. @param YourType[] is recognized by at least Eclipse/Zend Studio. I don't know about other IDE's but would expect the same, even if that

generate annotated doctrine2 entites from db schema

喜欢而已 提交于 2019-12-03 04:00:16
问题 Is it possible to generate Doctrine 2 entities, with the relevant docblock annotations, from an existing database schema? 回答1: I had to made these changes for the above code to work.. <?php use Doctrine\ORM\Tools\EntityGenerator; ini_set("display_errors", "On"); $libPath = __DIR__; // Set this to where you have doctrine2 installed // autoloaders require_once $libPath . '/Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine', $libPath); $classLoader-

generate annotated doctrine2 entites from db schema

别来无恙 提交于 2019-12-02 17:21:39
Is it possible to generate Doctrine 2 entities, with the relevant docblock annotations, from an existing database schema? dminer I had to made these changes for the above code to work.. <?php use Doctrine\ORM\Tools\EntityGenerator; ini_set("display_errors", "On"); $libPath = __DIR__; // Set this to where you have doctrine2 installed // autoloaders require_once $libPath . '/Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine', $libPath); $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); $classLoader->register(

How to document magic (_call and _callStatic) methods for IDEs

五迷三道 提交于 2019-11-27 17:39:45
After many happy years coding in notepad++ and sublime, I've been advised to give a PHP IDE a go. I'm trying out phpStorm and it seems nice. The code completion and documentation is a great feature but isn't working out for me when magic methods are used. Is there a work around to get phpStorm to understand what's going on in magic methods? Our situation is something like this: abstract class a { public static function __callStatic($method,$args) { if(strpos($method,"get_by_") === 0) { //do stuff } elseif(strpos($method,"get_first_by_") === 0) { //do stuff } elseif($method == "get_all") { //do

How to document magic (_call and _callStatic) methods for IDEs

久未见 提交于 2019-11-26 19:07:08
问题 After many happy years coding in notepad++ and sublime, I've been advised to give a PHP IDE a go. I'm trying out phpStorm and it seems nice. The code completion and documentation is a great feature but isn't working out for me when magic methods are used. Is there a work around to get phpStorm to understand what's going on in magic methods? Our situation is something like this: abstract class a { public static function __callStatic($method,$args) { if(strpos($method,"get_by_") === 0) { //do