Skip to content

Commit

Permalink
Remove model type capitalized words check
Browse files Browse the repository at this point in the history
  • Loading branch information
robgridley committed Feb 3, 2020
1 parent ae1c047 commit d14d3e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use JsonSerializable;
use Pace\XPath\Builder;
use Pace\Model\Attachments;
use InvalidArgumentException;
use UnexpectedValueException;

class Model implements ArrayAccess, JsonSerializable
Expand Down Expand Up @@ -62,12 +61,8 @@ class Model implements ArrayAccess, JsonSerializable
* @param string $type
* @param array $attributes
*/
public function __construct(Client $client, $type, array $attributes = [])
public function __construct(Client $client, string $type, array $attributes = [])
{
if (!preg_match('/^([A-Z]+[a-z]*)+$/', $type)) {
throw new InvalidArgumentException('Type must be CapitalizedWords');
}

$this->client = $client;
$this->type = $type;
$this->attributes = $attributes;
Expand Down

0 comments on commit d14d3e7

Please sign in to comment.