Completed
Push — master ( 61613f...b745a7 )
by Fran
04:31
created
tests/Patterns/SingletonTest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     /**
36 36
      * Test singleton instance
37 37
      * @param string $instanceClass
38
-     * @return boolean
38
+     * @return boolean|null
39 39
      */
40 40
     public function checkSingletonInstance($instanceClass = '\CloudFramework\Core\CloudFrameworkApp')
41 41
     {
Please login to merge, or discard this patch.
src/Core/Tool/ConfigLoader.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@
 block discarded – undo
103 103
     /**
104 104
      * Set a config parameter
105 105
      * @param string $key
106
-     * @param mixed $value
107
-     * @return \CloudFramework\Core\ConfigLoader
106
+     * @param string $value
107
+     * @return ConfigLoader
108 108
      */
109 109
     public function setConfigParam($key, $value = null)
110 110
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
                 $aux[$_key] = array();
134 134
             }
135 135
             if ($keyCount > 0) {
136
-                $aux[$_key]  = $this->setConfigValue($this->getChildConfigKey($key), $value, $aux[$_key]);
136
+                $aux[$_key] = $this->setConfigValue($this->getChildConfigKey($key), $value, $aux[$_key]);
137 137
             } else {
138 138
                 $aux[$_key] = $value;
139 139
             }
Please login to merge, or discard this patch.
src/Core/Tool/RequestParser.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
     /**
83 83
      * Get query param
84
-     * @param $key
84
+     * @param string $key
85 85
      * @return array|null
86 86
      */
87 87
     public static function getQueryParam($key)
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace CloudFramework\Core\Tool;
3 3
 
4
-use CloudFramework\Helpers\MagicClass;
5
-use CloudFramework\Patterns\Singleton;
6
-
7 4
 final class RequestParser
8 5
 {
9 6
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public static function getRequestHeaders()
14 14
     {
15 15
         $headers = array();
16
-        if(function_exists("getallheaders")) {
16
+        if (function_exists("getallheaders")) {
17 17
             foreach (getallheaders() as $key => $value) {
18 18
                 $headers[strtolower($key)] = $value;
19 19
             }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $query = array();
51 51
         try {
52 52
             parse_str($_SERVER['QUERY_STRING'], $query);
53
-        } catch(\Throwable $t) {
53
+        } catch (\Throwable $t) {
54 54
             syslog(LOG_ERR, $t->getMessage());
55 55
         }
56 56
         return $query;
Please login to merge, or discard this patch.
dispatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'autoload.php';
2
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'autoload.php';
3 3
 $app = \CloudFramework\Core\CloudFrameworkApp::getInstance();
4 4
 $app->run();
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  */
6 6
 spl_autoload_register(function($class) {
7 7
 
8
-    if(!function_exists("loadClass")) {
8
+    if (!function_exists("loadClass")) {
9 9
         /**
10 10
          * Class Loader
11 11
          * @param string $class
Please login to merge, or discard this patch.
src/Patterns/Singleton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
                 if ($singleton) {
161 161
                     $instance = $instanceReflector->getMethod("getInstance")->invoke(null);
162 162
                 }
163
-            } catch(\Exception $e) {
163
+            } catch (\Exception $e) {
164 164
                 $singleton = false;
165 165
             }
166 166
             if (!$singleton) {
Please login to merge, or discard this patch.
src/Helpers/SingletonTrait.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Class SingletonTrait
7 7
  * @package CloudFramework\Helpers
8 8
  */
9
-Trait SingletonTrait {
9
+trait SingletonTrait {
10 10
 
11 11
     private static $instance = array();
12 12
     /**
Please login to merge, or discard this patch.
src/Helpers/MagicClass.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * Class MagicClass
6 6
  * @package CloudFramework\Helpers
7 7
  */
8
-Trait MagicClass {
8
+trait MagicClass {
9 9
     /**
10 10
      * Magic setter
11 11
      * @param string $variable
Please login to merge, or discard this patch.
src/Helpers/Response.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * Class Response
6 6
  * @package CloudFramework\Helpers
7 7
  */
8
-Trait Response
8
+trait Response
9 9
 {
10 10
 
11 11
     public function dumpText($text)
Please login to merge, or discard this patch.