Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class Collection extends Model { |
||
22 | |||
23 | protected static array $casting = [ |
||
24 | 'ExcludeFromSitemap' => 'boolval', |
||
25 | 'isAuto' => 'boolval', |
||
26 | 'MatchAny' => 'boolval' |
||
27 | ]; |
||
28 | |||
29 | public function __construct(Connector $client, array $_object_data = []) |
||
30 | { |
||
31 | parent::__construct($client, $_object_data); |
||
32 | if (array_key_exists('Rules', $_object_data)) { |
||
33 | $this->Rules = json_decode($_object_data['Rules'], true); |
||
34 | } |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return string |
||
39 | */ |
||
40 | public function model(): string |
||
41 | { |
||
42 | return 'Collection'; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return Collections |
||
47 | */ |
||
48 | public function getService(): Collections |
||
51 | } |
||
52 | } |
||
53 |