Completed
Branch master (dee123)
by dima
03:02 queued 22s
created
app/ValidatorTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  *
15 15
  * @author Dmitriy
16 16
  */
17
-trait ValidatorTrait{
17
+trait ValidatorTrait {
18 18
 
19 19
     /**
20 20
      * Symfony\Component\Validator\Validator\RecursiveValidator
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
      */
23 23
     protected $validator;
24 24
 
25
-    function __construct(){
25
+    function __construct() {
26 26
 	$this->validator = new RecursiveValidator(
27 27
 		new ExecutionContextFactory(new IdentityTranslator()), new LazyLoadingMetadataFactory(new StaticMethodLoader()), new ConstraintValidatorFactory()
28 28
 	);
29 29
     }
30 30
 
31
-    public function preSave(\Propel\Runtime\Connection\ConnectionInterface $con = null){
32
-	if(!$result = $this->validate($this->validator)){
31
+    public function preSave(\Propel\Runtime\Connection\ConnectionInterface $con = null) {
32
+	if (!$result = $this->validate($this->validator)) {
33 33
 	    throw new ValidationException($this->getValidationFailures(), "Validation error");
34 34
 	}
35 35
 	return $result;
Please login to merge, or discard this patch.
app/Controllers/ModuleController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  *
7 7
  * @author d.lanec
8 8
  */
9
-abstract class ModuleController extends BaseController implements \Frameworkless\ModuleInterface{
9
+abstract class ModuleController extends BaseController implements \Frameworkless\ModuleInterface {
10 10
 
11
-    protected function render($view, array $data = array()){
11
+    protected function render($view, array $data = array()) {
12 12
 
13 13
 	$ref = new \ReflectionClass($this);
14 14
 
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
      * @return $this
28 28
      * @throws \Exception
29 29
      */
30
-    public function setParams(array $params = array()){
30
+    public function setParams(array $params = array()) {
31 31
 
32
-	foreach($params as $param => $value){
33
-	    if((new \ReflectionClass($this))->hasProperty($param) === false)
32
+	foreach ($params as $param => $value) {
33
+	    if ((new \ReflectionClass($this))->hasProperty($param) === false)
34 34
 		throw new \Exception(sprintf("param '%s' not found in module '%s'", $param, self::class));
35 35
 
36 36
 	    $this->{$param} = $value;
Please login to merge, or discard this patch.
app/Controllers/BaseController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     use \Psr\Log\LoggerAwareTrait;
27 27
 
28
-    protected function render($view, array $data = []){
28
+    protected function render($view, array $data = []) {
29 29
 
30 30
 	$debugbarRenderer = $this->debugbar->getJavascriptRenderer("/assets/debug_bar");
31 31
 
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 	return new Response($this->twig->render($view, $data));
36 36
     }
37 37
 
38
-    public function setTwig(Twig_Environment $twig){
38
+    public function setTwig(Twig_Environment $twig) {
39 39
 	$this->twig = $twig;
40 40
 	return $this;
41 41
     }
42 42
 
43
-    public function setDebugbar(StandardDebugBar $debugbar){
43
+    public function setDebugbar(StandardDebugBar $debugbar) {
44 44
 	$this->debugbar = $debugbar;
45 45
 	return $this;
46 46
     }
Please login to merge, or discard this patch.
app/Controllers/IndexController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use Core\Modules\UserList\UserList;
5 5
 use Symfony\Component\HttpFoundation\Response;
6 6
 
7
-class IndexController extends BaseController{
7
+class IndexController extends BaseController {
8 8
 
9 9
     /**
10 10
      * Return index page (/)
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      * @param array $args
13 13
      * @return Response
14 14
      */
15
-    public function get($args){
15
+    public function get($args) {
16 16
 
17 17
 	$result = \App::getModule(UserList::class, [
18 18
 		    "limit" => 50
Please login to merge, or discard this patch.
app/Controllers/PageInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  *
10 10
  * @author d.lanec
11 11
  */
12
-interface PageInterface{
12
+interface PageInterface {
13 13
 
14 14
     public function setTwig(Twig_Environment $twig);
15 15
 
Please login to merge, or discard this patch.
app/Exceptions/ValidationException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
  *
7 7
  * @author Dmitriy
8 8
  */
9
-class ValidationException extends \Exception{
9
+class ValidationException extends \Exception {
10 10
 
11 11
     private $failures;
12 12
 
13
-    public function __construct($failures, $message = "", $code = 0, $previous = null){
13
+    public function __construct($failures, $message = "", $code = 0, $previous = null) {
14 14
 
15 15
 	parent::__construct($message, $code, $previous);
16 16
 
17 17
 	$this->failures = $failures;
18 18
     }
19 19
 
20
-    function getFailures(){
20
+    function getFailures() {
21 21
 	return $this->failures;
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
app/CrudInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  *
9 9
  * @author Dmitriy
10 10
  */
11
-interface CrudInterface{
11
+interface CrudInterface {
12 12
 
13 13
     public function findById($id);
14 14
 
Please login to merge, or discard this patch.
app/Console/Commands/SeedResetCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
  *
14 14
  * @author Dmitriy
15 15
  */
16
-class SeedResetCommand extends Command{
16
+class SeedResetCommand extends Command {
17 17
 
18
-    protected function configure(){
18
+    protected function configure() {
19 19
 	$this->setName('seed:reset')
20 20
 		->setDescription('Reset all seeds data')
21 21
 		->setDefinition(
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 	);
26 26
     }
27 27
 
28
-    protected function execute(InputInterface $input, OutputInterface $output){
28
+    protected function execute(InputInterface $input, OutputInterface $output) {
29 29
 
30
-	if(!$class = $input->getOption('class')){
30
+	if (!$class = $input->getOption('class')) {
31 31
 	    $output->writeln("Class Model not set");
32 32
 	    return;
33 33
 	}
34 34
 
35
-	if($class::reset()){
35
+	if ($class::reset()) {
36 36
 	    $output->writeln(sprintf("Seed %s reset success!", $class));
37 37
 	} else
38 38
 	    $output->writeln("Command seed:reset fail to execute!");
Please login to merge, or discard this patch.
app/Console/Commands/InfoCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
  *
11 11
  * @author Dmitriy
12 12
  */
13
-class InfoCommand extends Command{
13
+class InfoCommand extends Command {
14 14
 
15
-    protected function configure(){
15
+    protected function configure() {
16 16
 	$this->setName('info')
17 17
 		->setDescription('Outputs \'Info about command\'');
18 18
     }
19 19
 
20
-    protected function execute(InputInterface $input, OutputInterface $output){
20
+    protected function execute(InputInterface $input, OutputInterface $output) {
21 21
 	$output->writeln('This is frameworkless console');
22 22
     }
23 23
 }
Please login to merge, or discard this patch.