| 1 | <?php |
||
| 21 | class RevisionIDPropertyAnnotator implements PropertyAnnotator { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var AppFactory |
||
| 25 | */ |
||
| 26 | private $appFactory; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @since 2.0 |
||
| 30 | * |
||
| 31 | * @param AppFactory $appFactory |
||
| 32 | */ |
||
| 33 | public function __construct( AppFactory $appFactory ) { |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @since 2.0 |
||
| 39 | * |
||
| 40 | * {@inheritDoc} |
||
| 41 | */ |
||
| 42 | public function isAnnotatorFor( DIProperty $property ) { |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @since 2.0 |
||
| 48 | * |
||
| 49 | * {@inheritDoc} |
||
| 50 | */ |
||
| 51 | public function addAnnotation( DIProperty $property, SemanticData $semanticData ) { |
||
| 68 | |||
| 69 | } |
||
| 70 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: