-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created ContextInterface #112
base: master
Are you sure you want to change the base?
Conversation
src/Finite/ContextInterface.php
Outdated
* @return StateMachineInterface | ||
*/ | ||
public function getStateMachine($object, $graph = 'default'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at end of file
Seems ok, i'll merge after code review. |
Fixed. Thank you for your attention. |
Hi @yohang . I finished the code review. Do you have any other remarks? |
@luismulinari I'll have a look tomorrow, I was on vacation for a week. |
No problem @yohang . I can wait. |
Hi @yohang! Do you have an opinion about my PR? |
src/Finite/ContextInterface.php
Outdated
use Finite\StateMachine\StateMachineInterface; | ||
|
||
/** | ||
* Interface that all class that have properties must implements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implement
Created ContextInterface to facilitate the "override" process.
I had a case when I needed to use "custom" Context because my "Finite twig extensions" should have other behavior. OK, I can extend the Context and use this, but in my specific case I don't need the Factory on constructor, for example.
I believe that with a Interface, this process will be more easy.