@@ -25,7 +25,9 @@ |
||
25 | 25 | public static function create(Connector $connector, string $model, array $data = []): ?Model |
26 | 26 | { |
27 | 27 | $model = strtolower($model); |
28 | - if (!array_key_exists($model, self::CLASS_MAP)) return null; |
|
28 | + if (!array_key_exists($model, self::CLASS_MAP)) { |
|
29 | + return null; |
|
30 | + } |
|
29 | 31 | |
30 | 32 | $cls = self::CLASS_MAP[$model]; |
31 | 33 | return new $cls($connector, $data); |
@@ -43,7 +43,9 @@ |
||
43 | 43 | public function __get(string $service): Model |
44 | 44 | { |
45 | 45 | $obj = ObjectFactory::create($this, $service); |
46 | - if (!$obj) throw new BadMethodException("Service for `{$service}` does not exist"); |
|
46 | + if (!$obj) { |
|
47 | + throw new BadMethodException("Service for `{$service}` does not exist"); |
|
48 | + } |
|
47 | 49 | |
48 | 50 | return $obj; |
49 | 51 | } |
@@ -67,7 +67,9 @@ |
||
67 | 67 | |
68 | 68 | foreach ($data['items'] as $item) { |
69 | 69 | $obj = ObjectFactory::make($this->getClient(), $item); |
70 | - if (!$obj) continue; |
|
70 | + if (!$obj) { |
|
71 | + continue; |
|
72 | + } |
|
71 | 73 | |
72 | 74 | $this->_items[$page][] = $obj; |
73 | 75 | } |