phpdoc

How do I stop warnings in phpDocumentor parser when I inherit from an external library class?

a 夏天 提交于 2019-12-23 18:03:15
问题 I've been adding docblocks to my code, and have resolved most of the build errors and warnings that the phpDocumentor script has generated and placed into the errors.html file. However, I have one last 'class' of warnings in my current documentation build - I get a warning for every class that I have documented in my application that inherits from an external library (in this case, Zend). Is there a way to stop warnings such as Warning - Class AMH_Controller_Action parent Zend_Controller

override return type in PHPDoc

那年仲夏 提交于 2019-12-22 05:20:11
问题 I have a class Abc with method (body is not important): /** * @return SomeBaseClass */ function getAll() { ... } In child class of Abc called AbcChild I'd like to redefine only type of returning class to see it properly in Netbeans. Can I do it without redefining method: /** * @return SomeClass */ function getAll() { return parent::getAll(); } 回答1: Try something like this: /** * @method SomeClass getAll() */ class AbcChild { // .... } More info about @method 回答2: No, because you need the

PhpDoc for interface and class implementing interface - difference [closed]

走远了吗. 提交于 2019-12-21 08:07:52
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . The question is quite simple - how should I differ phpdoc for interface and for class implementing interface? Should/Can they be the same or maybe interface documentation should be as general as possible and class implementing this interface more specific? I include one method

Can't set/find detect_unicode to Off

我的梦境 提交于 2019-12-21 06:06:18
问题 I'm want to start using phpDocumentor and the manual installation keeps throwing an error about me not having set detect_unicode = Off in my php.ini in Terminal. When I add it to my php.ini it doesn't take and I get the same issue when running the install. Nobody seems to have this problem, and for the life of me I can't figure it out. https://github.com/phpDocumentor/phpDocumentor2/blob/develop/README.md#installation What am I missing? (I did restart the MAMP server after the php.ini edit)

PhpDocumentor installed via PEAR on OSX not working - missing files?

丶灬走出姿态 提交于 2019-12-21 04:16:45
问题 I'm basically new to PEAR (and PhpDocumentor); I installed PhpDocumentor using the PEAR CLI, and everything seemed to go fine... until I went to use it, at which point I got the following error: Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /usr/local/bin/phpdoc on line 40 Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/usr/share/pear') in /usr/local/bin/phpdoc on line 40

Unable to exclude directories from PHPDocumentor

纵饮孤独 提交于 2019-12-19 07:49:19
问题 I'm trying to run PHPDocumentor on my WAMPServer setup. It runs fine, but I'd like to exclude certain directories, such as \sqlbuddy\ which don't contain my own code. Ironically, PHPDocumentor appears to be ignoring my --ignore switch. I've tried several ways of expressing the same thing, but with the same result. Below is the command I'm running it with: php.exe "C:\Users\username\Documents\PhpDocumentor\phpdoc" -t "C:\Program Files\wamp\www\docs" -o HTML:default:default -d "C:\Program Files

PHPDoc: Documenting a function with a variable number of arguments

有些话、适合烂在心里 提交于 2019-12-19 05:03:08
问题 What is the recommended method for documenting a class method that accepts a variable number of arguments? Maybe something like this? <?php class Foo { /** * Calculates the sum of all the arguments. * * @param mixed [$arg1, $arg2, ...] * * @return float the calculated sum */ public static function sum() { return array_sum(func_get_args()); } } Note: As a general rule, I imagine this type of thing should be avoided where possible. That being said, it would be nice to still document the

Should I use @return self, this or the current class? [closed]

我怕爱的太早我们不能终老 提交于 2019-12-18 13:54:07
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I have a method that return the current object, how do I document this? /** * set something * * @return this */ public function setSomething(){ // ... return $this; } Or should I do @return self or @return Current_Class_Name ? Reason why this question is not "primarily opinion

PHPStorm: correct PHPDoc for a Collection of Objects?

跟風遠走 提交于 2019-12-18 12:47:27
问题 I'm using the PHPStorm IDE, and run into trouble when I run the code inspection. I have a method which returns a collection of objects. The Collection itself is an object, which has its own methods, and implements the Traversable interface: class Repository { public function findByCustomer(Customer $user) { // ... return new Collection($orders); } } If I document findByUser() to return a Collection , the code inspection understands the methods on this object, but doesn't understand what

Can I run a script when I commit to subversion?

不想你离开。 提交于 2019-12-17 16:26:14
问题 I'd like to run a script that builds the documentation for my php project. It is basically just using wget to run phpdoc. 回答1: Here's a fairly extensive tutorial on SVN hooks 回答2: (Answering my own question, I just thought others would like to know as well). Yes, and also TortoiseSVN supports it. The word you are looking for is 'hooks'. For TortoiseSVN, open settings and 'Hook Scripts'. Click 'Add...' and chooe post_commit_hook (for running after the commit is done). Then add whatever script