FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17807&edit=1

ID: 17807
Updated by: demon.gene@gmail.com
Reported By: matt at abstractvector dot co dot uk
Summary: Erroneous message "duplicate class element" when
using static keyword
-Status: Open
+Status: Verified
Type: Bug
Package: PhpDocumentor
Operating System: Ubuntu 10.04 64-bit
Package Version: 1.4.3
PHP Version: 5.3.2
Roadmap Versions:
New Comment:

-Status: Open
+Status: Verified
Verified the reported behavior on phpDocumentor SVN, using PHPs 5.3.8,
5.2.17, and 4.4.9.


Previous Comments:
------------------------------------------------------------------------

[2010-08-24 13:19:18] mattk4k

Description:
------------
When using the static keyword to access class properties, phpDocumentor
throws an error.

Test script:
---------------
<?php
/**
* Page-level docblock
*
* @package Test
*/

/**
* Class-level docblock

* @package Test
*/
class Test
{

/**
* Example function
*
* @param string $bar Text
*
* @return void
*/
public static function bar($bar) {
if (null === static::$foo) { static::$foo = array(); }
if (!isset(static::$foo[$bar])) { } // Remove this line and all is
good
}

}

Expected result:
----------------
I expect the above to parse fine and continue reading the class

Actual result:
--------------
The following error messages appear:

WARNING in Test.php on line 24: Class "Test" has no Class-level
DocBlock.
WARNING in Test.php on line 24: no @package tag was used in a DocBlock
for class Test
WARNING in Test.php on line 24:
duplicate class element "Test" in file /home/matt/Test/Test.php will be
ignored.
Use an @ignore tag on the original if you want this case to be
documented.

In addition, subsequent methods in the class are ignored.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 24, '11 at 5:29a
activeSep 24, '11 at 5:29a
posts1
users1
websitepear.php.net

1 user in discussion

Demon Gene: 1 post

People

Translate

site design / logo © 2022 Grokbase