| Total Complexity | 8 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class Property extends AbstractPropertyAnnotation implements PropertyAnnotationInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | * @Required |
||
| 18 | */ |
||
| 19 | protected $code; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | * @Required |
||
| 24 | * @Enum({"string", "boolean", "integer", "float", "datetime", "file", "entity"}) |
||
| 25 | */ |
||
| 26 | protected $type; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $name; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var bool |
||
| 35 | */ |
||
| 36 | protected $multiple; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var bool |
||
| 40 | */ |
||
| 41 | protected $primaryKey; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @var string |
||
| 45 | */ |
||
| 46 | protected $entity; |
||
| 47 | |||
| 48 | 27 | public function __construct(array $values) |
|
| 49 | { |
||
| 50 | 27 | $this->code = isset($values['code']) ? $values['code'] : null; |
|
| 51 | 27 | $this->type = isset($values['type']) ? $values['type'] : null; |
|
| 52 | 27 | $this->name = isset($values['name']) ? $values['name'] : null; |
|
| 53 | 27 | $this->multiple = isset($values['multiple']) ? $values['multiple'] : null; |
|
| 54 | 27 | $this->primaryKey = isset($values['primaryKey']) ? (bool)$values['primaryKey'] : false; |
|
| 55 | 27 | $this->entity = isset($values['entity']) ? $values['entity'] : null; |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return bool|null |
||
| 60 | */ |
||
| 61 | 22 | public function isMultiple() |
|
| 64 | } |
||
| 65 | } |