| Total Complexity | 5 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Coverage | 33.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Permission implements \JsonSerializable |
||
| 18 | { |
||
| 19 | use JsonSerializableTrait; |
||
| 20 | |||
| 21 | /** @var string Permission label. */ |
||
| 22 | private $label; |
||
| 23 | |||
| 24 | /** @var GoogleImage */ |
||
| 25 | private $icon; |
||
| 26 | |||
| 27 | /** @var string[] Permissions. */ |
||
| 28 | private $permissions; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Permission constructor. |
||
| 32 | * |
||
| 33 | * @param string $label |
||
| 34 | * @param GoogleImage $icon |
||
| 35 | * @param string[] $permissions |
||
| 36 | */ |
||
| 37 | 1 | public function __construct(string $label, GoogleImage $icon, array $permissions) |
|
| 38 | { |
||
| 39 | 1 | $this->label = $label; |
|
| 40 | 1 | $this->icon = $icon; |
|
| 41 | 1 | $this->permissions = $permissions; |
|
| 42 | 1 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getLabel(): string |
||
| 48 | { |
||
| 49 | return $this->label; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return GoogleImage |
||
| 54 | */ |
||
| 55 | public function getIcon(): GoogleImage |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string[] |
||
| 62 | */ |
||
| 63 | public function getPermissions(): array |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Returns class properties as an array. |
||
| 70 | * |
||
| 71 | * @return array class properties as an array |
||
| 72 | */ |
||
| 73 | public function asArray(): array |
||
| 82 |