-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
302 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Spatie\ModelStatus\Exceptions; | ||
|
||
use Exception; | ||
|
||
class InvalidEnumClass extends Exception | ||
{ | ||
public static function create(string $statusEnum): self | ||
{ | ||
return new self("The status is not of type $statusEnum"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Spatie\ModelStatus\Exceptions; | ||
|
||
use Exception; | ||
|
||
class InvalidEnumType extends Exception | ||
{ | ||
public static function create(string $statusEnumClass): self | ||
{ | ||
return new self("Enum `{$statusEnumClass}` must be a string backed Enum"); | ||
} | ||
} |
Oops, something went wrong.