Test Failed
Branch master (20b14b)
by Marcio
04:20
created
src/Ballybran/Helpers/Routing/Routes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 	
92 92
 
93
-     public function call()
93
+        public function call()
94 94
     {
95 95
             
96 96
             if (is_string($this->callable)) {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         return $path;
132 132
     }
133 133
 
134
-	/*
134
+    /*
135 135
 	*@deprecated
136 136
 	*/
137 137
     public static function route()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class Routes
28 28
 {
29
-    private $path, $callable, $matches=[], $params=[];
29
+    private $path, $callable, $matches = [], $params = [];
30 30
     protected $_controllerPath = PV . APP . DS . "Controllers/";
31 31
 
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param string $path
36 36
      * @param $callable
37 37
      */
38
-    public function __construct( $path, $callable)
38
+    public function __construct($path, $callable)
39 39
     {
40 40
         $this->path = trim($path, '/');
41 41
         $this->callable = $callable;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @param string $url
59 59
      * @return bool
60 60
      */
61
-    public function match( $url) : bool
61
+    public function match($url) : bool
62 62
     {
63 63
         $url = trim($url, '/');
64 64
         $path = preg_replace_callback('#:([\w]+)#', [$this, 'paramMatch'], $this->path);
Please login to merge, or discard this patch.
src/Ballybran/Helpers/Routing/Map.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
      * @param $name
77 77
      * @param $method
78 78
      * @return Routes
79
-  	* example $router->add( '/user/:id', function($id) {}, 'name')->with('id','[0-9]+');
79
+     * example $router->add( '/user/:id', function($id) {}, 'name')->with('id','[0-9]+');
80 80
      */
81 81
     public  function add($path, $callable, $name, $method) : Routes
82 82
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 {
29 29
     private  $url;
30 30
     private  $callable;
31
-    private  $routes =[];
31
+    private  $routes = [];
32 32
     private  $nameRoute;
33 33
 
34 34
 
Please login to merge, or discard this patch.
src/Ballybran/Helpers/Event/Registry.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  * Class Registry
23 23
  * @package Ballybran\Helpers\Event
24 24
  */
25
- class Registry
25
+    class Registry
26 26
 {
27 27
     private static $instance;
28 28
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
         if ($prefix == 'get' && array_key_exists($key, $this->method)) {
127 127
             return $this->method[$key];
128 128
         } else {
129
-            throw new  Exception\InvalidCallException ('Setting read-only method: ' . '::');
129
+            throw new  Exception\InvalidCallException('Setting read-only method: ' . '::');
130 130
 
131 131
         }
132 132
     }
Please login to merge, or discard this patch.
src/Ballybran/Config/autoload.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * Also spl_autoload_register (Take a look at it if you like)
23 23
  *
24 24
  */
25
-spl_autoload_register(function ($class) {
25
+spl_autoload_register(function($class) {
26 26
 
27 27
     if (file_exists(str_replace('\\', DS, $class) . '.php')) {
28 28
         $file = str_replace('\\', DS, $class) . '.php';
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             // Se for um diretório procura dentro dele
48 48
             $f = search_lib($lib . $ds . $dir, $file, $ds);
49 49
             // Caso não encontre retora false
50
-            if ( false !== $f ) return $f;
50
+            if (false !== $f) return $f;
51 51
         }
52 52
     }
53 53
     // Se o diretório informado não for válido ou se não tiver encontrado retorna false
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,16 +38,22 @@  discard block
 block discarded – undo
38 38
     // Verifica se o diretório informado é válido
39 39
     if (is_dir($lib)) {
40 40
         // Verifica se o arquivo já existe neste primeiro diretório
41
-        if (file_exists($lib . $ds . $file)) return $lib . $ds . $file;
41
+        if (file_exists($lib . $ds . $file)) {
42
+            return $lib . $ds . $file;
43
+        }
42 44
         // Lista os subdiretórios e arquivos
43 45
         $dirs = array_diff(scandir($lib, 1), array('.', '..'));
44 46
         foreach ($dirs as $dir) {
45 47
             // Verifica se é um arquivo se for, pula para o próximo
46
-            if (!is_dir($lib . $ds . $dir)) continue;
48
+            if (!is_dir($lib . $ds . $dir)) {
49
+                continue;
50
+            }
47 51
             // Se for um diretório procura dentro dele
48 52
             $f = search_lib($lib . $ds . $dir, $file, $ds);
49 53
             // Caso não encontre retora false
50
-            if ( false !== $f ) return $f;
54
+            if ( false !== $f ) {
55
+                return $f;
56
+            }
51 57
         }
52 58
     }
53 59
     // Se o diretório informado não for válido ou se não tiver encontrado retorna false
@@ -60,7 +66,9 @@  discard block
 block discarded – undo
60 66
     $ext = '.php';
61 67
     $file = search_lib($libs, $class . $ext);
62 68
     // Se encontrou inclui o arquivo
63
-    if (false !== $file) require_once $file;
69
+    if (false !== $file) {
70
+        require_once $file;
71
+    }
64 72
     // Se não encontrar o arquivo lança um erro na tela. :)
65 73
     else {
66 74
         $msg = "Autoload fatal erro: Can't find the file {$class}{$ext}!";
Please login to merge, or discard this patch.
src/Ballybran/Config/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,6 +149,6 @@
 block discarded – undo
149 149
  * Esta constante é a constante resposnavel pela nossa View ( Arquivo de visualização).
150 150
  *
151 151
  */
152
-    define('VIEW', 'html'. DS . 'views' . DS);
152
+    define('VIEW', 'html' . DS . 'views' . DS);
153 153
 
154 154
 
Please login to merge, or discard this patch.
src/Ballybran/Core/Collections/Collection/IteratorDot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
         if ($this->exists($this->elements, $key)) {
168 168
             return $this->elements[$key];
169 169
         }
170
-        if ( false === strpos($key, '.') ) {
170
+        if (false === strpos($key, '.')) {
171 171
             return $default;
172 172
         }
173 173
         $items = $this->elements;
Please login to merge, or discard this patch.
src/Ballybran/Core/View/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         ob_start();
84 84
         $this->isHeader();
85 85
 
86
-        include $this->file =  VIEW . $this->controllers . DS . $this->view . $this->ex;
86
+        include $this->file = VIEW . $this->controllers . DS . $this->view . $this->ex;
87 87
         $this->isFooter();
88 88
 
89 89
         $content = ob_get_contents();
Please login to merge, or discard this patch.
src/Ballybran/Core/View/ViewrInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
     public function offsetExists($offset) : bool;
33 33
 
34
-    public function offsetGet($offset) : string ;
34
+    public function offsetGet($offset) : string;
35 35
 
36 36
     public function offsetSet($offset, $value) : void;
37 37
 
Please login to merge, or discard this patch.
src/Ballybran/Core/Model/Model.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
 
84 84
         $this->model = new $className($this->obj);
85 85
 
86
-         $this->model;
86
+            $this->model;
87 87
     }
88 88
 
89 89
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         $classModel = str_replace('Controllers', $this->modelPath, $className);
65 65
         $this->modelClass = $classModel . 'Model';
66 66
         //$path = 'App/' . $this->modelClass . '.php';  // Use when bootstrap route is enabled
67
-        $path =   $this->modelClass . '.php';
67
+        $path = $this->modelClass . '.php';
68 68
         if (file_exists($path) || is_readable($path)) {
69 69
             require_once $path;
70 70
             return $this->dbObject();
Please login to merge, or discard this patch.