@@ -21,6 +21,10 @@ |
||
21 | 21 | private $allow_file_upload; |
22 | 22 | private $file_counter; |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $endpoint |
|
26 | + * @param string $api_type |
|
27 | + */ |
|
24 | 28 | public function __construct( |
25 | 29 | Api $api, |
26 | 30 | $id, |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | return $instance; |
100 | 100 | } |
101 | 101 | /** |
102 | - * @return string|null |
|
102 | + * @return string |
|
103 | 103 | */ |
104 | 104 | public function getParentId() { |
105 | 105 | return $this->parentId; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | * @param array $fields Fields to request |
332 | 332 | * @param array $params Additional filters for the reading |
333 | 333 | * @param string|null $endpoint |
334 | - * @return AbstractObject |
|
334 | + * @return null|AbstractCrudObject |
|
335 | 335 | */ |
336 | 336 | protected function getOneByConnection( |
337 | 337 | $prototype_class, |
@@ -156,6 +156,9 @@ discard block |
||
156 | 156 | return false; |
157 | 157 | } |
158 | 158 | |
159 | + /** |
|
160 | + * @param string $prefix |
|
161 | + */ |
|
159 | 162 | private function startsWith($string, $prefix) { |
160 | 163 | return $prefix === "" || |
161 | 164 | strrpos($string, $prefix, -strlen($string)) !== false; |
@@ -182,12 +185,18 @@ discard block |
||
182 | 185 | return false; |
183 | 186 | } |
184 | 187 | |
188 | + /** |
|
189 | + * @param string $collection |
|
190 | + */ |
|
185 | 191 | public function isTypeCollection($type, $collection) { |
186 | 192 | $len_of_collection = strlen($collection); |
187 | 193 | $typeCollection = substr($type, 0, $len_of_collection); |
188 | 194 | return ($collection === $typeCollection); |
189 | 195 | } |
190 | 196 | |
197 | + /** |
|
198 | + * @param string $collection |
|
199 | + */ |
|
191 | 200 | public function getTypeFromCollection($type, $collection) { |
192 | 201 | return explode(",", trim(substr($type, strlen($collection)), "<>")); |
193 | 202 | } |