| Total Complexity | 7 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | trait EntityAttributes |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Attributes that are classes |
||
| 14 | * array['attributeName']['type'] = 'scalar|array' |
||
| 15 | * array['attributeName']['namespace'] = \PagOnline\XmlEntities\Class::class. |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $entityAttributes = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $attribute |
||
| 23 | * |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | 10 | public function isEntityAttribute(string $attribute): bool |
|
| 27 | { |
||
| 28 | 10 | return \array_key_exists($attribute, $this->entityAttributes); |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $attribute |
||
| 33 | * |
||
| 34 | * @return null|string |
||
| 35 | */ |
||
| 36 | 3 | public function getCustomAttributeXml(string $attribute): ?string |
|
| 52 | } |
||
| 53 | } |
||
| 54 |