phpdoc

How do I create an automatic code documentation for a PHP project?

家住魔仙堡 提交于 2019-12-08 08:32:07
问题 I have a big project, that uses CakePHP. Now I would like to create a documentation for other new co-workers. An idea was to use the existing PHPdoc comments and other comments inside the code to create an automatic documentation for a start. How can I manage such a big project and How would I create a browsable HTML-Documentation? How can I automatically add missing comments ? (I use Eclipse for coding, but if it is easier in another editor I wouldn't mind.) There are many functions declared

phpDocumentor - “Is phpdoc in either the path or include_path in your php.ini file?”

本秂侑毒 提交于 2019-12-08 04:32:11
问题 I'm trying to run phpDocumentor and am getting this error... I've searched extensively on Google and cannot find a solution that works, unfortunately I couldn't install via PEAR so I've had to download from their github and try to do things manually. I have set the environmental variables as appropriate: C:\xampp\php;C:\xampp\php\pear\phpDocumentor;C:\xampp\php\pear\phpDocumentor\bin; And the include_path within php.ini too: include_path = ".;C:\xampp\php\pear\phpDocumentor;C:\xampp\php\pear

phpdoc suggesting type for $this->someField

余生颓废 提交于 2019-12-07 23:49:14
问题 In Netbeans and phpStorm, this works as expected: public function someMethod() { $objectA = uberEnterprisyFactory('someclassA'); /* @var $objectA TheClassA */ // $objectA-> (autocomplete for TheClassA is displayed, good) This does not: public function someMethod() { $this->objectA = uberEnterprisyFactory('somemodelA'); /* @var $this->objectA TheClassA */ // $this->objectA-> (no autocomplete here, not good, $this->objectA is inferred to be null) How can I sugest type of $this->someThing to

PHPDoc for fluent interface in subclass?

假装没事ソ 提交于 2019-12-07 20:58:53
问题 Is there any why to make my IDE (actually PHPStorm) understand that: $student->setName('Marco'); Will return an instance of Student , without redefining setName() in the subclass (only for adding PHPDoc comments)? class Person { private $name; /** * @param string $name * @return Person */ public function setName($name) { $this->name = $name; return $this; } } class Student extends Person { } 回答1: You can return $this instead of person in your docblock 回答2: you have to overwrite your method

PHPDoc preconditions

╄→гoц情女王★ 提交于 2019-12-07 18:48:48
问题 How to tag preconditions with PHPDoc? I have an object, and before calling a function another function must have been called: $myObject = new MyClass(); $myObject->mustDoThis(); $myObject->beforeThis(); So the documentation for beforeThis() would look like: /** * @precondition mustDoThis() must be called before this function is */ Or is there another way around this? Perhaps a @throw clause would be enough. 回答1: As far as I know, there's no standard @precondition or @postcondition tags for

Installing phpDocumentor using PEAR

帅比萌擦擦* 提交于 2019-12-07 16:48:24
问题 On the home page of http://www.phpdoc.org/, on http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.quickstart.pkg.html, and on https://github.com/phpDocumentor/phpDocumentor2, instructions to install phpDocumentor are: pear channel-discover pear.phpdoc.org pear install phpdoc/phpDocumentor When I do so, I see that it is deprecated: [root@desktop ~]# pear channel-discover pear.phpdoc.org Adding Channel "pear.phpdoc.org" succeeded Discovery of channel "pear

PHPDoc inline {@link} (and Netbeans)

我只是一个虾纸丫 提交于 2019-12-07 07:02:41
问题 Perhaps I'm not understanding completely, but I'm trying to get the {@link} inline PHPDoc tag to link to another method in the class ( the docblock in question is for a "shorthand alias" method ) I haven't actually generated anything to documentation, but the {@link} is showing as plain-text in the NetBeans method descriptor. Am I doing something wrong syntactically ( if I compile the documentation will this work? ) or just that NetBeans is unable to support the inline {@link} ? For example:

How to indicate that method is a part of interface with PHPDoc?

让人想犯罪 __ 提交于 2019-12-07 00:36:51
问题 How to indicate that method is a part of interface with PHPDoc? For example: /** * @implements BarInterface */ class Foo implements BarInterface { /** * @thisMethodIsHereBecauseItIsAPartOf("BarInterface") */ public function doBar() { } } Is there anything appropriate to replace @thisMethodIsHereBecauseItIsAPartOf("BarInterface") with? 回答1: How to indicate that method is a part of interface with PHPDoc? You do not need to document that, because you use implements BarInterface and a source-code

phpDocumentor - “Is phpdoc in either the path or include_path in your php.ini file?”

房东的猫 提交于 2019-12-07 00:08:39
I'm trying to run phpDocumentor and am getting this error... I've searched extensively on Google and cannot find a solution that works, unfortunately I couldn't install via PEAR so I've had to download from their github and try to do things manually. I have set the environmental variables as appropriate: C:\xampp\php;C:\xampp\php\pear\phpDocumentor;C:\xampp\php\pear\phpDocumentor\bin; And the include_path within php.ini too: include_path = ".;C:\xampp\php\pear\phpDocumentor;C:\xampp\php\pear\phpDocumentor\bin;C:\xampp\php\PEAR" I'm trying to generate docs by using the following code: phpdoc -d

Phpdoc No Summary found for this file

三世轮回 提交于 2019-12-06 18:51:45
问题 I've installed phpDoc on our server, set up etc. It's producing documentation correctly. We're using the 'Responsive' template, however this error occurs regardless of the template used. Under the 'Errors', each file scanned seems to have the following error: Type Line Description error 0 No summary was found for this file I've googled exhaustively for this, and can't find a solution. I've even gone through the effort of tracking down the server error code behind the message PPC:ERR-50000 and