-
-
Notifications
You must be signed in to change notification settings - Fork 167
Move for PSR-4 #31
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
Move for PSR-4 #31
Conversation
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.
Hey @geekcom I removed in JasperPHP Class $this->resource_directory attribute and $resource_directory param of constructor.
- Have a logic if ($resource_dir) and throws Exception;
- I searched in PHPJasper the class never uses this attribute;
The code is unecessary.
The logic for Exception can be found in execute() method, it's a duplicate code.
rafaelqueiroz
left a comment
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.
Hey @geekcom I refactor execute method, create a validateExecute() and addUserToCommand()
|
This PR is great @rafaelqueiroz , thanks. |
The goal of PR is move the project for psr-4.
Move src/JasperStarter to bin/jasperstart
The library of Java it's a command line tool and not belongs to JasperPHP application It's a dependency wich can stay outside of src/
Before:
/src/JasperPHP/JasperPHP.php
/src/JasperPHP/JasperPHPCommand.php
/src/jasperPHP/JasperPHPServiceProvider.php
After:
/src/JasperPHP.php
/src/Command/JasperPHPCommand.php
/src/Service/JasperPHPServiceProvider.php
After this I think the next step is slicing JasperPHP class in many for respect SRP. We neeed kill the God Class. But I don't know if make this here or create a new PR.