Passed
Branch master (ded4aa)
by Neil
05:59
created
src/Traits/GetResourcesTrait.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/CelcatWebAPI.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.