| 1 | <?php |
||
| 18 | class ApprovedDatePropertyAnnotator implements PropertyAnnotator { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Predefined property ID |
||
| 22 | */ |
||
| 23 | const PROP_ID = '___APPROVEDDATE'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var AppFactory |
||
| 27 | */ |
||
| 28 | private $appFactory; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var Integer|null |
||
| 32 | */ |
||
| 33 | private $approvedDate; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param AppFactory $appFactory |
||
| 37 | */ |
||
| 38 | 4 | public function __construct( AppFactory $appFactory ) { |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @since 2.0 |
||
| 44 | * |
||
| 45 | * @param Integer $approvedDate |
||
| 46 | */ |
||
| 47 | 2 | public function setApprovedDate( $approvedDate ) { |
|
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritDoc} |
||
| 53 | */ |
||
| 54 | 1 | public function isAnnotatorFor( DIProperty $property ) { |
|
| 57 | |||
| 58 | 2 | public function getDataItem() { |
|
| 71 | |||
| 72 | /** |
||
| 73 | * {@inheritDoc} |
||
| 74 | */ |
||
| 75 | 2 | public function addAnnotation( |
|
| 92 | } |
||
| 93 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: