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