We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae1c047 commit d14d3e7Copy full SHA for d14d3e7
1 file changed
src/Model.php
@@ -6,7 +6,6 @@
6
use JsonSerializable;
7
use Pace\XPath\Builder;
8
use Pace\Model\Attachments;
9
-use InvalidArgumentException;
10
use UnexpectedValueException;
11
12
class Model implements ArrayAccess, JsonSerializable
@@ -62,12 +61,8 @@ class Model implements ArrayAccess, JsonSerializable
62
61
* @param string $type
63
* @param array $attributes
64
*/
65
- public function __construct(Client $client, $type, array $attributes = [])
+ public function __construct(Client $client, string $type, array $attributes = [])
66
{
67
- if (!preg_match('/^([A-Z]+[a-z]*)+$/', $type)) {
68
- throw new InvalidArgumentException('Type must be CapitalizedWords');
69
- }
70
-
71
$this->client = $client;
72
$this->type = $type;
73
$this->attributes = $attributes;
0 commit comments