Passed
Branch main (7572bb)
by Osvaldo
10:26
created
src/Controlador.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         if(!file_exists(CONTROLADOR_DIR.$controlador.'.php') || !class_exists(CONTROLADOR_NAMESPACE.$controlador))
46 46
         {
47
-               return $this->controladorPorDefectoExiste();
47
+                return $this->controladorPorDefectoExiste();
48 48
         }
49 49
 
50 50
         return $controlador;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         if(!file_exists(CONTROLADOR_DIR.CONTROLADOR_POR_DEFECTO.'.php') || !class_exists(CONTROLADOR_NAMESPACE.CONTROLADOR_POR_DEFECTO))
56 56
         {
57
-               throw new Exception("El controlador por defecto no existe");
57
+                throw new Exception("El controlador por defecto no existe");
58 58
         }
59 59
 
60 60
         return CONTROLADOR_POR_DEFECTO;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     //controlador esta declarado
31 31
     private function controladorDeclarado(array $url)
32 32
     {
33
-        if(!isset($url[0]))
33
+        if (!isset($url[0]))
34 34
         {
35 35
             return CONTROLADOR_POR_DEFECTO;
36 36
         }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     private function controladorExiste(string $controlador): string
44 44
     {
45
-        if(!file_exists(CONTROLADOR_DIR.$controlador.'.php') || !class_exists(CONTROLADOR_NAMESPACE.$controlador))
45
+        if (!file_exists(CONTROLADOR_DIR.$controlador.'.php') || !class_exists(CONTROLADOR_NAMESPACE.$controlador))
46 46
         {
47 47
                return $this->controladorPorDefectoExiste();
48 48
         }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     private function controladorPorDefectoExiste(): string
54 54
     {
55
-        if(!file_exists(CONTROLADOR_DIR.CONTROLADOR_POR_DEFECTO.'.php') || !class_exists(CONTROLADOR_NAMESPACE.CONTROLADOR_POR_DEFECTO))
55
+        if (!file_exists(CONTROLADOR_DIR.CONTROLADOR_POR_DEFECTO.'.php') || !class_exists(CONTROLADOR_NAMESPACE.CONTROLADOR_POR_DEFECTO))
56 56
         {
57 57
                throw new Exception("El controlador por defecto no existe");
58 58
         }
Please login to merge, or discard this patch.
src/Metodo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
     private function elMetodoEstaDefinido(array $array): string
44 44
     {
45
-        if(!isset($array[1]))
45
+        if (!isset($array[1]))
46 46
         {
47 47
             return METODO_POR_DEFECTO;
48 48
         }
Please login to merge, or discard this patch.
src/Parametros.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
     {
20 20
         unset($this->_url[0]);
21 21
 
22
-        if(isset($this->_url[1]))
22
+        if (isset($this->_url[1]))
23 23
         {
24
-            if($this->_metodo->metodo() == $this->_url[1])
24
+            if ($this->_metodo->metodo() == $this->_url[1])
25 25
             {
26 26
                 unset($this->_url[1]);
27 27
             }
Please login to merge, or discard this patch.
src/Peticion.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
     private $_metodo;
10 10
     private $_parametros;
11 11
     
12
-    public function __construct
13
-    (
12
+    public function __construct(
14 13
         Controlador $Controlador,
15 14
         Metodo $Metodo,
16 15
         Parametros $Parametros
Please login to merge, or discard this patch.
src/PeticionInterface.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 
8 8
 interface PeticionInterface
9 9
 {
10
-    public function __construct
11
-    (
10
+    public function __construct(
12 11
         Controlador $Controlador,
13 12
         Metodo $Metodo,
14 13
         Parametros $Parametros
Please login to merge, or discard this patch.
src/Enlace.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     private function setEnlace(array $array): array
19 19
     {
20 20
         
21
-        if(!isset($array['url']))
21
+        if (!isset($array['url']))
22 22
         {
23 23
             return [];
24 24
         }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types=1);
3
-require_once __DIR__ . '/vendor/autoload.php';
3
+require_once __DIR__.'/vendor/autoload.php';
4 4
 
5 5
 use src\Factory;
6 6
 
7
-define('CONTROLADOR_DIR',__DIR__.'\\controladores\\');
7
+define('CONTROLADOR_DIR', __DIR__.'\\controladores\\');
8 8
 
9
-define('CONTROLADOR_POR_DEFECTO','Controlador');
9
+define('CONTROLADOR_POR_DEFECTO', 'Controlador');
10 10
 
11 11
 define('CONTROLADOR_NAMESPACE', 'controladores\\');
12 12
 
13
-define('METODO_POR_DEFECTO','index');
13
+define('METODO_POR_DEFECTO', 'index');
14 14
 
15 15
 $factory = new Factory();
16 16
 
17
-$peticion = $factory->crear('src\CrearPeticion',array(
17
+$peticion = $factory->crear('src\CrearPeticion', array(
18 18
     'url' => $_REQUEST
19 19
 ));
20 20
 
Please login to merge, or discard this patch.