src/Identities/AbstractIdentityNode.php 1 location
|
@@ 43-47 (lines=5) @@
|
40 |
|
*/ |
41 |
|
public function __construct($type, $id) |
42 |
|
{ |
43 |
|
if (!is_string($type)) { |
44 |
|
throw new \InvalidArgumentException('Identity node type must be string'); |
45 |
|
} elseif ($type === '') { |
46 |
|
throw new \InvalidArgumentException('Identity node type must be not empty'); |
47 |
|
} |
48 |
|
|
49 |
|
if (!is_int($id)) { |
50 |
|
throw new \InvalidArgumentException('Identity node ID must be integer'); |
src/Transport/WithCustomHost.php 1 location
|
@@ 41-45 (lines=5) @@
|
38 |
|
*/ |
39 |
|
public function __construct(TransportInterface $transport, $host, $scheme = 'https') |
40 |
|
{ |
41 |
|
if (!is_string($host)) { |
42 |
|
throw new \InvalidArgumentException('Host must be string'); |
43 |
|
} elseif (empty($host)) { |
44 |
|
throw new \InvalidArgumentException('Host must be not empty'); |
45 |
|
} |
46 |
|
|
47 |
|
if (!is_string($scheme)) { |
48 |
|
throw new \InvalidArgumentException('Scheme must be string'); |