Skip to content

Commit d35b513

Browse files
author
Michael van de rijt
committed
Merge branch 'develop'
* develop: array_merge(): Argument #2 is not an array Some typecasting added. Missing a parameter.
2 parents b64d85e + 50774cc commit d35b513

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

src/Artisaninweb/SoapWrapper/Service.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ class Service {
4848
*/
4949
protected $options;
5050

51+
/**
52+
* The constructor
53+
*/
54+
public function __construct()
55+
{
56+
$this->options = [];
57+
}
58+
5159
/**
5260
* Set the name of the service
5361
*

src/Artisaninweb/SoapWrapper/Wrapper.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Artisaninweb\SoapWrapper;
44

55
use Exception;
6+
use Closure;
67

78
/**
89
* Soap Webservice wrapper
@@ -12,6 +13,11 @@
1213
*/
1314
Class Wrapper {
1415

16+
/**
17+
* @var array
18+
*/
19+
protected $clients;
20+
1521
/**
1622
* @var array
1723
*/
@@ -22,7 +28,8 @@
2228
*/
2329
public function __construct()
2430
{
25-
$this->clients = [];
31+
$this->clients = [];
32+
$this->services = [];
2633
}
2734

2835
/**
@@ -43,7 +50,7 @@ public function services()
4350
* @return mixed
4451
* @throws \Exception
4552
*/
46-
public function service($name,$callback)
53+
public function service($name, Closure $callback)
4754
{
4855
if(!empty($this->services[$name]))
4956
{
@@ -61,7 +68,7 @@ public function service($name,$callback)
6168
* @return $this
6269
* @throws \Exception
6370
*/
64-
public function add($service)
71+
public function add(Closure $service)
6572
{
6673
$client = new Service();
6774

@@ -85,7 +92,7 @@ public function add($service)
8592
* @param $service
8693
* @return $this
8794
*/
88-
public function override($service)
95+
public function override(Closure $service)
8996
{
9097
$client = new Service();
9198

0 commit comments

Comments
 (0)