diff --git a/src/EntityTrait.php b/src/EntityTrait.php index ddf88fc..2da6dba 100644 --- a/src/EntityTrait.php +++ b/src/EntityTrait.php @@ -3,9 +3,9 @@ namespace Selami\Entity; +use Selami\Entity\Exception\InvalidArgumentException; use stdClass; use Selami\Entity\Interfaces\EntityInterface; -use Selami\Entity\Exception\UnexpectedValueException; trait EntityTrait { @@ -37,7 +37,7 @@ public function __unset($name) public static function createFromJsonFile(string $filePath, string $id) : EntityInterface { if (!file_exists($filePath)) { - throw new UnexpectedValueException(sprintf('Model definition file (%s) does not exist!', $filePath)); + throw new InvalidArgumentException(sprintf('Model definition file (%s) does not exist!', $filePath)); } $json = file_get_contents($filePath); return static::createFromJson($json, $id); diff --git a/src/Exception/UnexpectedValueException.php b/src/Exception/UnexpectedValueException.php deleted file mode 100644 index d1ca7d5..0000000 --- a/src/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,9 +0,0 @@ -