Passed
Push — master ( 8d3934...cb4c7a )
by Stephan
02:02
created
src/Picqer/Financials/Exact/Query/Findable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @return string (guid)
50 50
      */
51
-    public function findId($code, $key='Code'){
52
-        if ( $this->isFillable($key) ) {
51
+    public function findId($code, $key = 'Code') {
52
+        if ($this->isFillable($key)) {
53 53
             $format = ($this->url == 'crm/Accounts' && $key === 'Code') ? '%18s' : '%s';
54 54
             if (preg_match('/^[\w]{8}-([\w]{4}-){3}[\w]{12}$/', $code)) {
55 55
                 $format = "guid'$format'";
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 '$select' => $this->primaryKey,
66 66
                 '$orderby' => $this->primaryKey,
67 67
             ];
68
-            if( $records = $this->connection()->get($this->url, $request) ){
68
+            if ($records = $this->connection()->get($this->url, $request)) {
69 69
                 return $records[0][$this->primaryKey];
70 70
             }
71 71
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         $result = $this->connection()->get($this->url, $request, $headers);
99 99
 
100
-        if (!empty($divisionId)) {
100
+        if ( ! empty($divisionId)) {
101 101
             $this->connection()->setDivision($originalDivision); // Restore division
102 102
         }
103 103
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         // If we have one result which is not an assoc array, make it the first element of an array for the
133 133
         // collectionFromResult function so we always return a collection from filter
134 134
         if ((bool) count(array_filter(array_keys($result), 'is_string'))) {
135
-            $result = [ $result ];
135
+            $result = [$result];
136 136
         }
137 137
 
138 138
         while ($this->connection()->nextUrl !== null)
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
             
142 142
             // If we have one result which is not an assoc array, make it the first element of an array for the array_merge function
143 143
             if ((bool) count(array_filter(array_keys($nextResult), 'is_string'))) {
144
-                $nextResult = [ $nextResult ];
144
+                $nextResult = [$nextResult];
145 145
             }
146 146
             
147 147
             $result = array_merge($result, $nextResult);
148 148
         }
149
-        $collection = [ ];
149
+        $collection = [];
150 150
         foreach ($result as $r) {
151 151
             $collection[] = new self($this->connection(), $r);
152 152
         }
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/Quotation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,10 +123,10 @@
 block discarded – undo
123 123
      */
124 124
     public function addItem(array $array)
125 125
     {
126
-        if (! isset($this->attributes['QuotationLines']) || $this->attributes['QuotationLines'] == null) {
126
+        if ( ! isset($this->attributes['QuotationLines']) || $this->attributes['QuotationLines'] == null) {
127 127
             $this->attributes['QuotationLines'] = [];
128 128
         }
129
-        if (! isset($array['LineNumber'])) {
129
+        if ( ! isset($array['LineNumber'])) {
130 130
             $array['LineNumber'] = count($this->attributes['QuotationLines']) + 1;
131 131
         }
132 132
         $this->attributes['QuotationLines'][] = $array;
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/Query/Resultset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         // If we have one result which is not an assoc array, make it the first element of an array for the
36 36
         // collectionFromResult function so we always return a collection from filter
37 37
         if ((bool) count(array_filter(array_keys($result), 'is_string'))) {
38
-            $result = [ $result ];
38
+            $result = [$result];
39 39
         }
40 40
 
41 41
         $class = $this->class;
Please login to merge, or discard this patch.