Comments (2)
Thanks for your report, phpDocumentor doesn't do any validation right now so errors or warnings will not be generated.
I think you are right about the duplicated declarations, they should overwrite properties. This is a bug that we need to address
from phpdocumentor.
@jaapio thank you for your reply. I understand that validation is outside phpDocumentor scope/purpose. In fact, having a duplicated element in the doc block rendered as a duplicate element in the HTML doc is kind of logical, like a writer's choice.
I found another way to duplicate a declaration:
<?php
/**
* @property-read BaseValueClass $value
*/
class BaseClass
{
protected mixed $value;
public function __construct(array $properties = [])
{
foreach ($properties as $property => $value) {
$this->$property = $value;
}
}
public function __get($property)
{
if (property_exists($this, $property)) {
return $this->$property;
}
}
}
The code seems genuine to me. The property $value
is protected
against writing, while the magic __get
make the property readable to public
.
In this example, the $value
property is documented twice in phpDocumentor output.
from phpdocumentor.
Related Issues (20)
- PHP Deprecated: Please use getType in .../phpDocumentor/Descriptor/Traits/CanHaveAType.php HOT 1
- Xdebug has detected a possible infinite loop - problem with latest, not with 3.4.1 HOT 4
- Bug XmlUtils.php - Start tag expected HOT 2
- Documentation issue: Separator characters and the @package tag HOT 7
- Twig v3 support? HOT 2
- Background colour is not defined, but text colour is
- Latest git master is pushed to docker hub instead of stable release HOT 3
- feat: render readthedocs flyout menu for default theme HOT 1
- Specify PHIVE install GPG keys HOT 4
- Separate by folder HOT 2
- Document how to create phar
- Doesn't document the right inherited method HOT 1
- Specify a bookmark for `@see`
- Deprecated: Creation of dynamic property HOT 1
- Slowdowns on documentation site generated by PHPDocumentor
- Add support for typed constants
- Version 3.5.0 fails with "No arguments expected, got 'run'" HOT 2
- Add support for phpstorm attributes
- Add syntax for typing tuples in `@return array` values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpdocumentor.