Passed
Push — master ( f1682e...573569 )
by Stephan
03:18 queued 01:14
created
src/Picqer/Financials/Exact/PurchaseOrder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,10 +124,10 @@
 block discarded – undo
124 124
      */
125 125
     public function addItem(array $array)
126 126
     {
127
-        if (! isset($this->attributes['PurchaseOrderLines']) || $this->attributes['PurchaseOrderLines'] == null) {
127
+        if ( ! isset($this->attributes['PurchaseOrderLines']) || $this->attributes['PurchaseOrderLines'] == null) {
128 128
             $this->attributes['PurchaseOrderLines'] = [];
129 129
         }
130
-        if (! isset($array['LineNumber'])) {
130
+        if ( ! isset($array['LineNumber'])) {
131 131
             $array['LineNumber'] = count($this->attributes['PurchaseOrderLines']) + 1;
132 132
         }
133 133
         $this->attributes['PurchaseOrderLines'][] = $array;
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/CashEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
     public function addItem(array $array)
54 54
     {
55
-        if (! isset($this->attributes['CashEntryLines']) || $this->attributes['CashEntryLines'] == null) {
55
+        if ( ! isset($this->attributes['CashEntryLines']) || $this->attributes['CashEntryLines'] == null) {
56 56
             $this->attributes['CashEntryLines'] = [];
57 57
         }
58 58
         $this->attributes['CashEntryLines'][] = $array;
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/Connection.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
     protected $middleWares = [];
95 95
 
96 96
     /**
97
-    * @var
98
-    */
97
+     * @var
98
+     */
99 99
     public $nextUrl = null;
100 100
 
101 101
     /**
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/SalesOrder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,10 +142,10 @@
 block discarded – undo
142 142
      */
143 143
     public function addItem(array $array)
144 144
     {
145
-        if (! isset($this->attributes['SalesOrderLines']) || $this->attributes['SalesOrderLines'] == null) {
145
+        if ( ! isset($this->attributes['SalesOrderLines']) || $this->attributes['SalesOrderLines'] == null) {
146 146
             $this->attributes['SalesOrderLines'] = [];
147 147
         }
148
-        if (! isset($array['LineNumber'])) {
148
+        if ( ! isset($array['LineNumber'])) {
149 149
             $array['LineNumber'] = count($this->attributes['SalesOrderLines']) + 1;
150 150
         }
151 151
         $this->attributes['SalesOrderLines'][] = $array;
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/Model.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * @var array The model's attributes
20 20
      */
21
-    protected $attributes = [ ];
21
+    protected $attributes = [];
22 22
     
23 23
     /**
24 24
      * @deferred array The model's collection values
25 25
      */
26
-    protected $deferred = [ ];
26
+    protected $deferred = [];
27 27
 
28 28
     /**
29 29
      * @var array The model's fillable attributes
30 30
      */
31
-    protected $fillable = [ ];
31
+    protected $fillable = [];
32 32
 
33 33
     /**
34 34
      * @var string The URL endpoint of this model
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         }
135 135
 
136 136
         try {
137
-            if(is_array($this->attributes[$key]) && array_key_exists('__deferred', $this->attributes[$key])) {
137
+            if (is_array($this->attributes[$key]) && array_key_exists('__deferred', $this->attributes[$key])) {
138 138
                 $class = preg_replace('/(.+?)s?$/', __NAMESPACE__ . '\\\$1', $key); // Filter plural 's' and add namespace
139 139
                 $deferred = new $class($this->connection());
140 140
                 $uri = $this->attributes[$key]['__deferred']['uri'];
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             return $this->deferred[$key];
159 159
         }
160 160
         
161
-        if (isset( $this->attributes[$key] )) {
161
+        if (isset($this->attributes[$key])) {
162 162
             return $this->attributes[$key];
163 163
         }
164 164
     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             return false;
197 197
         }
198 198
 
199
-        return ! empty( $this->attributes[$this->primaryKey] );
199
+        return ! empty($this->attributes[$this->primaryKey]);
200 200
     }
201 201
 
202 202
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $attributes = $this->attributes;
213 213
         if ($withDeferred) {
214
-            foreach($this->deferred as $attribute => $collection) {
214
+            foreach ($this->deferred as $attribute => $collection) {
215 215
                 if (empty($collection)) {
216 216
                     continue; // Leave orriginal array with __deferred key
217 217
                 }
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
      *
251 251
      * @return boolean
252 252
      */
253
-    public function userHasRights($action='GET')
253
+    public function userHasRights($action = 'GET')
254 254
     {
255
-        $action =  preg_match('/^GET|POST|PUT|DELETE$/i', $action) ? strtoupper($action) : 'GET';
255
+        $action = preg_match('/^GET|POST|PUT|DELETE$/i', $action) ? strtoupper($action) : 'GET';
256 256
         $result = $this->connection()->get('users/UserHasRights', [
257 257
             'endpoint' => "'{$this->url}'",
258 258
             'action' => "'{$action}'"
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,8 +144,7 @@
 block discarded – undo
144 144
 
145 145
                 return true;
146 146
             }
147
-        }
148
-        catch (\Exception $e) {
147
+        } catch (\Exception $e) {
149 148
             // We tried lets leave it as is.
150 149
         }
151 150
 
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/WebhookSubscription.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     use Persistance\Storable;
19 19
 
20 20
     protected $fillable = [
21
-    	'ID',
21
+        'ID',
22 22
         'CallbackURL',
23 23
         'Topic',
24 24
     ];
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/SalesEntry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,10 +112,10 @@
 block discarded – undo
112 112
 
113 113
     public function addItem(array $array)
114 114
     {
115
-        if (! isset($this->attributes['SalesEntryLines']) || $this->attributes['SalesEntryLines'] == null) {
115
+        if ( ! isset($this->attributes['SalesEntryLines']) || $this->attributes['SalesEntryLines'] == null) {
116 116
             $this->attributes['SalesEntryLines'] = [];
117 117
         }
118
-        if (! isset($array['LineNumber'])) {
118
+        if ( ! isset($array['LineNumber'])) {
119 119
             $array['LineNumber'] = count($this->attributes['SalesEntryLines']) + 1;
120 120
         }
121 121
         $this->attributes['SalesEntryLines'][] = $array;
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/PurchaseEntry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,10 +67,10 @@
 block discarded – undo
67 67
 
68 68
     public function addItem(array $array)
69 69
     {
70
-        if (! isset($this->attributes['PurchaseEntryLines']) || $this->attributes['PurchaseEntryLines'] == null) {
70
+        if ( ! isset($this->attributes['PurchaseEntryLines']) || $this->attributes['PurchaseEntryLines'] == null) {
71 71
             $this->attributes['PurchaseEntryLines'] = [];
72 72
         }
73
-        if (! isset($array['LineNumber'])) {
73
+        if ( ! isset($array['LineNumber'])) {
74 74
             $array['LineNumber'] = count($this->attributes['PurchaseEntryLines']) + 1;
75 75
         }
76 76
         $this->attributes['PurchaseEntryLines'][] = $array;
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/ReceivableList.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,22 +32,22 @@
 block discarded – undo
32 32
     protected $primaryKey = 'HID';
33 33
 
34 34
     protected $fillable = [
35
-		'AccountCode',
36
-		'AccountId',
37
-		'AccountName',
38
-		'Amount',
39
-		'AmountInTransit',
40
-		'CurrencyCode',
41
-		'Description',
42
-		'DueDate',
43
-		'EntryNumber',
44
-		'HID',
45
-		'Id',
46
-		'InvoiceDate',
47
-		'InvoiceNumber',
48
-		'JournalCode',
49
-		'JournalDescription',
50
-		'YourRef',
35
+        'AccountCode',
36
+        'AccountId',
37
+        'AccountName',
38
+        'Amount',
39
+        'AmountInTransit',
40
+        'CurrencyCode',
41
+        'Description',
42
+        'DueDate',
43
+        'EntryNumber',
44
+        'HID',
45
+        'Id',
46
+        'InvoiceDate',
47
+        'InvoiceNumber',
48
+        'JournalCode',
49
+        'JournalDescription',
50
+        'YourRef',
51 51
     ];
52 52
 
53 53
     protected $url = 'read/financial/ReceivablesList';
Please login to merge, or discard this patch.