Skip to content

Commit d1ca6d7

Browse files
authored
Merge pull request #28 from vemcogroup/master
Laravel 9 support
2 parents dbf4140 + 481b20f commit d1ca6d7

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-24
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
],
1212
"require": {
1313
"php": ">=5.4.0",
14-
"illuminate/support": "5.*|6.*|7.*|8.*",
15-
"guzzlehttp/guzzle": "^6.2|^7.0",
14+
"illuminate/support": "5.*|6.*|7.*|8.*|9.*",
15+
"guzzlehttp/guzzle": "^6.2|^7.0|^7.4",
1616
"artisaninweb/laravel-soap": "^0.3"
1717
},
1818
"require-dev": {

src/SoapClient.php

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SoapClient
1212
protected $secret;
1313
protected $agreement;
1414

15-
public function __construct($agreement = '', $secret = null)
15+
public function __construct($agreement = null, $secret = null)
1616
{
1717
$this->agreement = $agreement ?? config('economic.agreement');
1818
$this->secret = $secret ?? config('economic.secret_token');
@@ -145,7 +145,7 @@ public function getAllCashbooksEntries()
145145
return $entries;
146146
}
147147

148-
public function createCashBookEntryFromData( $data )
148+
public function createCashBookEntryFromData($data)
149149
{
150150
return $this->soap->call('economic.CashBookEntry_CreateFromData', [
151151
'CashBookEntry_CreateFromData' => [
@@ -172,26 +172,26 @@ public function createProjectsFromArray($data)
172172
])->Project_CreateFromDataArrayResult;
173173
}
174174

175-
public function registerPdfVoucher( $file, $entry_number, $entry_date )
175+
public function registerPdfVoucher($file, $entry_number, $entry_date)
176176
{
177-
$this->soap->call( 'economic.CashBook_RegisterPdfVoucher', [
177+
$this->soap->call('economic.CashBook_RegisterPdfVoucher', [
178178
'CashBook_RegisterPdfVoucher' => [
179179
'data' => $file,
180180
'voucherNumber' => (int) $entry_number,
181181
'entryDate' => $entry_date,
182182
],
183-
] );
183+
]);
184184

185185
return true;
186186
}
187187

188-
public function createProductGroupFromData( $data )
188+
public function createProductGroupFromData($data)
189189
{
190-
return $this->soap->call( 'economic.ProductGroup_CreateFromData', [
190+
return $this->soap->call('economic.ProductGroup_CreateFromData', [
191191
'ProductGroup_CreateFromData' => [
192192
'data' => $data,
193193
],
194-
] )->ProductGroup_CreateFromDataResult;
194+
])->ProductGroup_CreateFromDataResult;
195195
}
196196

197197
public function createQuotationsFromArray($data)
@@ -242,40 +242,36 @@ public function getProjectCosts()
242242
return $entries;
243243
}
244244

245-
public function deleteProductGroup( $number )
245+
public function deleteProductGroup($number)
246246
{
247-
return $this->soap->call( 'economic.ProductGroup_Delete', [
247+
return $this->soap->call('economic.ProductGroup_Delete', [
248248
'productGroupHandle' => [
249249
'Number' => $number,
250250
],
251-
] )->ProductGroup_DeleteResponse;
251+
])->ProductGroup_DeleteResponse;
252252
}
253253

254254
/**
255255
* @param $ids integer|array
256256
*
257257
* @return mixed
258258
*/
259-
public function orderGetDataByArray( $ids )
259+
public function orderGetDataByArray($ids)
260260
{
261261
$handles = [];
262262

263-
if ( is_array( $ids ) ) {
264-
265-
foreach ( $ids as $id ) {
266-
267-
$handles[] = [ 'Id' => $id ];
263+
if (is_array($ids)) {
264+
foreach ($ids as $id) {
265+
$handles[] = ['Id' => $id];
268266
}
269267
} else {
270-
271-
$handles[] = [ 'Id' => $ids ];
268+
$handles[] = ['Id' => $ids];
272269
}
273270

274-
return $this->soap->call( 'economic.Order_GetDataArray', [
275-
271+
return $this->soap->call('economic.Order_GetDataArray', [
276272
'Order_GetDataArray' => [
277273
'entityHandles' => $handles,
278274
],
279-
] )->Order_GetDataArrayResult;
275+
])->Order_GetDataArrayResult;
280276
}
281277
}

0 commit comments

Comments
 (0)