@@ -29,8 +29,9 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function get($pagesize = 50) |
31 | 31 | { |
32 | - if (empty($this->parameters['pageSize'])) |
|
33 | - $this->parameters['pageSize'] = $pagesize; |
|
32 | + if (empty($this->parameters['pageSize'])) { |
|
33 | + $this->parameters['pageSize'] = $pagesize; |
|
34 | + } |
|
34 | 35 | |
35 | 36 | $this->celcatWebAPI->log()->info('Getting '. (new \ReflectionClass($this))->getShortName());// . (empty($this->parameters) ?: ' with ' . implode(',', $this->parameters))); |
36 | 37 | return $this->celcatWebAPI->get((empty($this->name) ? (new \ReflectionClass($this))->getShortName() : $this->name), $this->parameters); |
@@ -44,8 +45,9 @@ discard block |
||
44 | 45 | */ |
45 | 46 | public function getAll($pagesize = 1000) |
46 | 47 | { |
47 | - if (empty($this->parameters['pageSize'])) |
|
48 | - $this->parameters['pageSize'] = $pagesize; |
|
48 | + if (empty($this->parameters['pageSize'])) { |
|
49 | + $this->parameters['pageSize'] = $pagesize; |
|
50 | + } |
|
49 | 51 | |
50 | 52 | $results = $this->get(); |
51 | 53 |
@@ -105,8 +105,7 @@ |
||
105 | 105 | $this->log()->transferLogs(); |
106 | 106 | $this->throwRunTimeException('An error occurred, received a '. $request->getStatusCode()); |
107 | 107 | } |
108 | - } |
|
109 | - catch (\Exception $exception){ |
|
108 | + } catch (\Exception $exception){ |
|
110 | 109 | if($exception instanceof ClientException){ |
111 | 110 | if($exception->getCode() == 404) { |
112 | 111 | $this->log()->info('Received '. $exception->getCode()); |