-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement state machine concept (#3)
* Several fixes and implement state machine concept * Update readme and composer * Fix readme link on gfm
- Loading branch information
Showing
29 changed files
with
559 additions
and
316 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.gitattributes export-ignore | ||
/.github export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore |
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 |
---|---|---|
@@ -1,32 +1,40 @@ | ||
{ | ||
"name": "uuf6429/state-engine", | ||
"type": "library", | ||
"homepage": "https://github.com/uuf6429/state-engine-php", | ||
"readme": "README.md", | ||
"license": "MIT", | ||
"description": "A library providing interfaces and basic implementation of a State Engine", | ||
"keywords": ["state", "engine", "state-engine", "uuf6429"], | ||
"authors": [ | ||
{ | ||
"name": "Christian Sciberras", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4 || ^8.0", | ||
"psr/event-dispatcher": "^1.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"uuf6429\\StateEngine\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"uuf6429\\StateEngine\\": "test/" | ||
} | ||
"name": "uuf6429/state-engine", | ||
"type": "library", | ||
"homepage": "https://github.com/uuf6429/state-engine-php", | ||
"readme": "README.md", | ||
"license": "MIT", | ||
"description": "A library providing interfaces and basic implementation of a State Engine or Machine", | ||
"keywords": [ | ||
"state", | ||
"engine", | ||
"state-engine", | ||
"machine", | ||
"state-machine", | ||
"workflow", | ||
"uuf6429" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Christian Sciberras", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4 || ^8.0", | ||
"psr/event-dispatcher": "^1.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"uuf6429\\StateEngine\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"uuf6429\\StateEngine\\": "tests/" | ||
} | ||
} | ||
} |
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
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
This file was deleted.
Oops, something went wrong.
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 uuf6429\StateEngine\Exceptions; | ||
|
||
use uuf6429\StateEngine\Interfaces\TransitionInterface; | ||
|
||
class TransitionNotDeclaredException extends RuntimeException | ||
{ | ||
public function __construct(TransitionInterface $transition) | ||
{ | ||
parent::__construct("Cannot apply transition \"$transition\"; no such transition was defined."); | ||
} | ||
} |
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
Oops, something went wrong.