| 1 | <?php |
||
| 21 | class CreatorPropertyAnnotator implements PropertyAnnotator { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Predefined property ID |
||
| 25 | */ |
||
| 26 | const PROP_ID = '___CUSER'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var AppFactory |
||
| 30 | */ |
||
| 31 | private $appFactory; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @since 2.0 |
||
| 35 | * |
||
| 36 | * @param AppFactory $appFactory |
||
| 37 | */ |
||
| 38 | 3 | public function __construct( AppFactory $appFactory ) { |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @since 2.0 |
||
| 44 | * |
||
| 45 | * {@inheritDoc} |
||
| 46 | */ |
||
| 47 | 1 | public function isAnnotatorFor( DIProperty $property ) { |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @since 2.0 |
||
| 53 | * |
||
| 54 | * {@inheritDoc} |
||
| 55 | */ |
||
| 56 | 1 | public function addAnnotation( DIProperty $property, SemanticData $semanticData ) { |
|
| 70 | |||
| 71 | } |
||
| 72 |
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: