Completed
Branch master (07b0df)
by judicael
05:36 queued 02:38
created
bundles/lib/Debug.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
         error_reporting($iLevel);
153 153
 
154
-        set_error_handler(function ($iErrNo, $sErrStr, $sErrFile, $iErrLine)
154
+        set_error_handler(function($iErrNo, $sErrStr, $sErrFile, $iErrLine)
155 155
         {
156 156
             $aContext = array('file' => $sErrFile, 'line' => $iErrLine);
157 157
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         self::_initLogFile();
217 217
         self::$_bActivateException = true;
218 218
 
219
-        set_exception_handler(function (\Exception $oException)
219
+        set_exception_handler(function(\Exception $oException)
220 220
         {
221 221
             $aContext = array('file' => $oException->getFile(), 'line' => $oException->getLine());
222 222
             self::getInstance()->critical($oException->getMessage(), $aContext);
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         else {
413 413
 
414 414
             if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI'])) {
415
-                error_log(Bash::setColor('############### ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ' ###############', 'cyan'));
415
+                error_log(Bash::setColor('############### '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].' ###############', 'cyan'));
416 416
             }
417 417
         }
418 418
     }
Please login to merge, or discard this patch.
bundles/lib/Bash.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,6 +148,6 @@
 block discarded – undo
148 148
      */
149 149
     private static function _applyCode(string $sContent, string $sCode) : string
150 150
     {
151
-        return "\033[" . $sCode . "m" . $sContent . "\033[0m\n";
151
+        return "\033[".$sCode."m".$sContent."\033[0m\n";
152 152
     }
153 153
 }
Please login to merge, or discard this patch.
bundles/lib/Date.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public static function getWeek(int $iWeek, int $iYear, string $sFormat = "Y-m-d") : Date
43 43
     {
44
-        $iFirstDayInYear = date("N",mktime(0, 0, 0, 1, 1, $iYear));
44
+        $iFirstDayInYear = date("N", mktime(0, 0, 0, 1, 1, $iYear));
45 45
 
46 46
         if ($iFirstDayInYear < 5) { $iShift = -($iFirstDayInYear - 1) * 86400; } else { $iShift = (8 - $iFirstDayInYear) * 86400; }
47 47
 
48
-        if ($iWeek > 1) { $iWeekInSeconds = ($iWeek-1) * 604800; } else { $iWeekInSeconds = 0; }
48
+        if ($iWeek > 1) { $iWeekInSeconds = ($iWeek - 1) * 604800; } else { $iWeekInSeconds = 0; }
49 49
 
50 50
         $iTimestamp = mktime(0, 0, 0, 1, 1, $iYear) + $iWeekInSeconds + $iShift;
51 51
         $iTimestampLastDay = mktime(0, 0, 0, 1, 6, $iYear) + $iWeekInSeconds + $iShift + 604800;
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public static function getMiddleWeek(int $iWeek, int $iYear, string $sFormat = "Y-m-d") : array
158 158
     {
159
-        $iFirstDayInYear = date("N",mktime(0, 0, 0, 1, 1, $iYear));
159
+        $iFirstDayInYear = date("N", mktime(0, 0, 0, 1, 1, $iYear));
160 160
 
161 161
         if ($iFirstDayInYear < 5) { $iShift = -($iFirstDayInYear - 1) * 86400; }
162 162
         else { $iShift = (8 - $iFirstDayInYear) * 86400; }
163 163
 
164
-        if ($iWeek > 1) { $iWeekInSeconds = ($iWeek-1) * 604800; }
164
+        if ($iWeek > 1) { $iWeekInSeconds = ($iWeek - 1) * 604800; }
165 165
         else { $iWeekInSeconds = 0; }
166 166
 
167 167
         if (date('N') > 2) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         if (preg_replace('/^([0-9]+)-[0-9]+-[0-9]+$/', '$1', $aDates[0]) != date('Y')) {
181 181
 
182 182
             $aDates[0] = preg_replace('/^[0-9]+(-[0-9]+-[0-9]+)$/', date('Y').'$1', $aDates[0]);
183
-            $aDates[1] = preg_replace('/^[0-9]+(-[0-9]+-[0-9]+)$/', (date('Y')+1).'$1', $aDates[1]);
183
+            $aDates[1] = preg_replace('/^[0-9]+(-[0-9]+-[0-9]+)$/', (date('Y') + 1).'$1', $aDates[1]);
184 184
         }
185 185
 
186 186
         return $aDates;
@@ -221,10 +221,10 @@  discard block
 block discarded – undo
221 221
         $oDateTime = DateTime::createFromFormat('Y-m-d H:i:s', $sDateTime);
222 222
         $iTimeStamp = time() - $oDateTime->getTimestamp();
223 223
 
224
-        if ($iTimeStamp < 3600) { return $sStartReturn.' '.(int)($iTimeStamp/60).' '.$sMinutes.$sEndReturn; }
225
-        if ($iTimeStamp < 86400) { return $sStartReturn.' '.(int)($iTimeStamp/3600).' '.$sHours.$sEndReturn; }
226
-        if ($iTimeStamp < 2592000) { return $sStartReturn.' '.(int)($iTimeStamp/86400).' '.$sDays.$sEndReturn; }
227
-        if ($iTimeStamp < 31536000) { return $sStartReturn.' '.(int)($iTimeStamp/2592000).' '.$sMonths.$sEndReturn; }
228
-        else { return $sStartReturn.' '.(int)($iTimeStamp/31536000).' '.$sYears.$sEndReturn; }
224
+        if ($iTimeStamp < 3600) { return $sStartReturn.' '.(int)($iTimeStamp / 60).' '.$sMinutes.$sEndReturn; }
225
+        if ($iTimeStamp < 86400) { return $sStartReturn.' '.(int)($iTimeStamp / 3600).' '.$sHours.$sEndReturn; }
226
+        if ($iTimeStamp < 2592000) { return $sStartReturn.' '.(int)($iTimeStamp / 86400).' '.$sDays.$sEndReturn; }
227
+        if ($iTimeStamp < 31536000) { return $sStartReturn.' '.(int)($iTimeStamp / 2592000).' '.$sMonths.$sEndReturn; }
228
+        else { return $sStartReturn.' '.(int)($iTimeStamp / 31536000).' '.$sYears.$sEndReturn; }
229 229
     }
230 230
 }
Please login to merge, or discard this patch.
bundles/core/UrlManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
                         $aRoutes = array();
84 84
 
85
-                        foreach($oHost->routes as $sKey => $oRoute) {
85
+                        foreach ($oHost->routes as $sKey => $oRoute) {
86 86
 
87 87
                             if ($sKey === $sCode) {
88 88
 
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
             throw new \Exception();
134 134
         }
135 135
 
136
-        $sStringToEncode = str_replace(['à','á','â','ã','ä','ç','è','é','ê','ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ù','ú','û','ü','ý','ÿ','À','Á','Â','Ã','Ä','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ñ','Ò','Ó','Ô','Õ','Ö','Ù','Ú','Û','Ü','Ý'],
137
-            ['a','a','a','a','a','c','e','e','e','e','i','i','i','i','n','o','o','o','o','o','u','u','u','u','y','y','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N','O','O','O','O','O','U','U','U','U','Y'],
136
+        $sStringToEncode = str_replace(['à', 'á', 'â', 'ã', 'ä', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ù', 'Ú', 'Û', 'Ü', 'Ý'],
137
+            ['a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'N', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y'],
138 138
                 $sStringToEncode);
139 139
 
140 140
         $sStringToEncode = preg_replace('/[^a-zA-Z0-9_]+/', '_', preg_quote($sStringToEncode));
Please login to merge, or discard this patch.