1 | <?php |
||
2 | |||
3 | namespace Translation\Entities; |
||
4 | |||
5 | use Translation\Models\Contry; |
||
0 ignored issues
–
show
|
|||
6 | |||
7 | class ContryEntity extends AbstractEntity |
||
8 | { |
||
9 | protected $model = Contry::class; |
||
10 | |||
11 | private $code; |
||
12 | private $name; |
||
13 | private $icon; |
||
14 | private $external = [ |
||
15 | 'pointagram' => null, |
||
16 | ]; |
||
17 | |||
18 | /** |
||
19 | * ContryEntity constructor. |
||
20 | * |
||
21 | * @param array $attributes |
||
22 | */ |
||
23 | public function __construct(array $attributes = []) |
||
24 | { |
||
25 | if (isset($attributes['code']) && !is_null($attributes['code'])) { |
||
26 | $this->setCode($attributes['code']); |
||
27 | } |
||
28 | if (isset($attributes['name']) && !is_null($attributes['name'])) { |
||
29 | $this->setName($attributes['name']); |
||
30 | } |
||
31 | if (isset($attributes['icon']) && !is_null($attributes['icon'])) { |
||
32 | $this->setIcon($attributes['icon']); |
||
33 | } |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param int $code |
||
38 | * @return $this |
||
39 | */ |
||
40 | private function setCode(int $code): ContryEntity |
||
41 | { |
||
42 | $this->code = $code; |
||
43 | |||
44 | return $this; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return int |
||
49 | */ |
||
50 | public function getCode(): int |
||
51 | { |
||
52 | return $this->code; |
||
53 | } |
||
54 | public function getName(): string |
||
55 | { |
||
56 | return $this->name; |
||
57 | } |
||
58 | public function setName($value): vocode |
||
0 ignored issues
–
show
The type
Translation\Entities\vocode was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
59 | { |
||
60 | $this->name = $value; |
||
61 | } |
||
62 | public function getIcon(): string |
||
63 | { |
||
64 | return $this->icon; |
||
65 | } |
||
66 | public function setIcon($value): vocode |
||
67 | { |
||
68 | $this->icon = $value; |
||
69 | } |
||
70 | public function getExternal(string $service): string |
||
71 | { |
||
72 | return $this->external[$service]; |
||
73 | } |
||
74 | public function setExternal(string $service, $value): vocode |
||
75 | { |
||
76 | $this->external[$service] = $value; |
||
77 | } |
||
78 | /** |
||
79 | * @inheritdoc |
||
80 | */ |
||
81 | public function __toString(): string |
||
82 | { |
||
83 | return $this->getName(); |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * @inheritdoc |
||
88 | */ |
||
89 | public function toArray(): array |
||
90 | { |
||
91 | return [ |
||
92 | 'code' => $this->getCode(), |
||
93 | 'name' => $this->getName(), |
||
94 | ]; |
||
95 | } |
||
96 | } |
||
97 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths