Completed
Branch develop (3f9c38)
by
unknown
25:32
created
includes/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      */
73 73
     public function __construct(\Twig_Profiler_Profile $profile, $loaderOrEnv = null)
74 74
     {
75
-        $this->profile     = $profile;
75
+        $this->profile = $profile;
76 76
         if ($loaderOrEnv instanceof \Twig_Environment) {
77 77
             $loaderOrEnv = $loaderOrEnv->getLoader();
78 78
         }
Please login to merge, or discard this patch.
htdocs/includes/maximebf/debugbar/src/DebugBar/JavascriptRenderer.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->baseUrl = $baseUrl;
100 100
 
101 101
         if ($basePath === null) {
102
-            $basePath = __DIR__ . DIRECTORY_SEPARATOR . 'Resources';
102
+            $basePath = __DIR__.DIRECTORY_SEPARATOR.'Resources';
103 103
         }
104 104
         $this->basePath = $basePath;
105 105
 
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
         if (substr($uri, 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri)) {
795 795
             return $uri;
796 796
         }
797
-        return rtrim($root, '/') . "/$uri";
797
+        return rtrim($root, '/')."/$uri";
798 798
     }
799 799
 
800 800
     /**
@@ -904,16 +904,16 @@  discard block
 block discarded – undo
904 904
         $dumpedContent = '';
905 905
         if ($files) {
906 906
             foreach ($files as $file) {
907
-                $dumpedContent .= file_get_contents($file) . "\n";
907
+                $dumpedContent .= file_get_contents($file)."\n";
908 908
             }
909 909
         }
910 910
         if ($content) {
911 911
             foreach ($content as $item) {
912
-                $dumpedContent .= $item . "\n";
912
+                $dumpedContent .= $item."\n";
913 913
             }
914 914
         }
915 915
         if ($useRequireJs) {
916
-            $dumpedContent = "define('debugbar', ['jquery'], function($){\r\n" . $dumpedContent . "\r\n return PhpDebugBar; \r\n});";
916
+            $dumpedContent = "define('debugbar', ['jquery'], function($){\r\n".$dumpedContent."\r\n return PhpDebugBar; \r\n});";
917 917
         }
918 918
         if ($targetFilename !== null) {
919 919
             file_put_contents($targetFilename, $dumpedContent);
@@ -937,27 +937,27 @@  discard block
 block discarded – undo
937 937
         $nonce = $this->getNonceAttribute();
938 938
 
939 939
         foreach ($cssFiles as $file) {
940
-            $html .= sprintf('<link rel="stylesheet" type="text/css" href="%s">' . "\n", $file);
940
+            $html .= sprintf('<link rel="stylesheet" type="text/css" href="%s">'."\n", $file);
941 941
         }
942 942
 
943 943
         foreach ($inlineCss as $content) {
944
-            $html .= sprintf('<style type="text/css">%s</style>' . "\n", $content);
944
+            $html .= sprintf('<style type="text/css">%s</style>'."\n", $content);
945 945
         }
946 946
 
947 947
         foreach ($jsFiles as $file) {
948
-            $html .= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $file);
948
+            $html .= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $file);
949 949
         }
950 950
 
951 951
         foreach ($inlineJs as $content) {
952
-            $html .= sprintf('<script type="text/javascript"%s>%s</script>' . "\n", $nonce, $content);
952
+            $html .= sprintf('<script type="text/javascript"%s>%s</script>'."\n", $nonce, $content);
953 953
         }
954 954
 
955 955
         foreach ($inlineHead as $content) {
956
-            $html .= $content . "\n";
956
+            $html .= $content."\n";
957 957
         }
958 958
 
959 959
         if ($this->enableJqueryNoConflict && !$this->useRequireJs) {
960
-            $html .= '<script type="text/javascript"' . $nonce . '>jQuery.noConflict(true);</script>' . "\n";
960
+            $html .= '<script type="text/javascript"'.$nonce.'>jQuery.noConflict(true);</script>'."\n";
961 961
         }
962 962
 
963 963
         return $html;
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
 
1047 1047
         $nonce = $this->getNonceAttribute();
1048 1048
 
1049
-        if ($this->useRequireJs){
1049
+        if ($this->useRequireJs) {
1050 1050
             return "<script type=\"text/javascript\"{$nonce}>\nrequire(['debugbar'], function(PhpDebugBar){ $js });\n</script>\n";
1051 1051
         } else {
1052 1052
             return "<script type=\"text/javascript\"{$nonce}>\n$js\n</script>\n";
@@ -1178,7 +1178,7 @@  discard block
 block discarded – undo
1178 1178
             $this->variableName,
1179 1179
             json_encode($data),
1180 1180
             $requestId,
1181
-            $suffix ? ", " . json_encode($suffix) : ''
1181
+            $suffix ? ", ".json_encode($suffix) : ''
1182 1182
         );
1183 1183
         return $js;
1184 1184
     }
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
     protected function getNonceAttribute()
1191 1191
     {
1192 1192
         if ($nonce = $this->getCspNonce()) {
1193
-            return ' nonce="' . $nonce .'"';
1193
+            return ' nonce="'.$nonce.'"';
1194 1194
         }
1195 1195
 
1196 1196
         return '';
Please login to merge, or discard this patch.
htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
     {
25 25
         if (function_exists('random_bytes')) {
26 26
             // PHP 7 only
27
-            return 'X' . bin2hex(random_bytes(16));
27
+            return 'X'.bin2hex(random_bytes(16));
28 28
         } else if (function_exists('openssl_random_pseudo_bytes')) {
29 29
             // PHP >= 5.3.0, but OpenSSL may not always be available
30
-            return 'X' . bin2hex(openssl_random_pseudo_bytes(16));
30
+            return 'X'.bin2hex(openssl_random_pseudo_bytes(16));
31 31
         } else {
32 32
             // Fall back to a rudimentary ID generator:
33 33
             //  * $_SERVER array will make the ID unique to this request.
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
             //  * uniqid('', true) will use the current microtime(), plus additional random data.
37 37
             //  * $this->index guarantees the uniqueness of IDs from the current object.
38 38
             $this->index++;
39
-            $entropy = serialize($_SERVER) . uniqid('', true) . spl_object_hash($this) . $this->index;
40
-            return 'X' . md5($entropy);
39
+            $entropy = serialize($_SERVER).uniqid('', true).spl_object_hash($this).$this->index;
40
+            return 'X'.md5($entropy);
41 41
         }
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
htdocs/includes/maximebf/debugbar/src/DebugBar/DebugBar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         }
240 240
 
241 241
         // Remove all invalid (non UTF-8) characters
242
-        array_walk_recursive($this->data, function (&$item) {
242
+        array_walk_recursive($this->data, function(&$item) {
243 243
                 if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) {
244 244
                     $item = mb_convert_encoding($item, 'UTF-8', 'UTF-8');
245 245
                 }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
         $headers = array();
299 299
         for ($i = 0, $c = count($chunks); $i < $c; $i++) {
300
-            $name = $headerName . ($i > 0 ? "-$i" : '');
300
+            $name = $headerName.($i > 0 ? "-$i" : '');
301 301
             $headers[$name] = $chunks[$i];
302 302
         }
303 303
 
Please login to merge, or discard this patch.
includes/maximebf/debugbar/src/DebugBar/DataCollector/TimeDataCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                 $requestStartTime = microtime(true);
51 51
             }
52 52
         }
53
-        $this->requestStartTime = (float)$requestStartTime;
53
+        $this->requestStartTime = (float) $requestStartTime;
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
maximebf/debugbar/src/DebugBar/DataCollector/RequestDataCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
         foreach ($vars as $var) {
55 55
             if (isset($GLOBALS[$var])) {
56
-                $key = "$" . $var;
56
+                $key = "$".$var;
57 57
                 if ($this->isHtmlVarDumperUsed()) {
58 58
                     $data[$key] = $this->getVarDumper()->renderVar($GLOBALS[$var]);
59 59
                 } else {
Please login to merge, or discard this patch.
includes/maximebf/debugbar/src/DebugBar/DataCollector/PDO/TraceablePDO.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      */
249 249
     public function getAccumulatedStatementsDuration() : float
250 250
     {
251
-        return array_reduce($this->executedStatements, function ($v, $s) { return $v + $s->getDuration(); });
251
+        return array_reduce($this->executedStatements, function($v, $s) { return $v + $s->getDuration(); });
252 252
     }
253 253
 
254 254
     /**
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function getMemoryUsage() : int
260 260
     {
261
-        return array_reduce($this->executedStatements, function ($v, $s) { return $v + $s->getMemoryUsage(); });
261
+        return array_reduce($this->executedStatements, function($v, $s) { return $v + $s->getMemoryUsage(); });
262 262
     }
263 263
 
264 264
     /**
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function getPeakMemoryUsage() : int
270 270
     {
271
-        return array_reduce($this->executedStatements, function ($v, $s) { $m = $s->getEndMemory(); return $m > $v ? $m : $v; });
271
+        return array_reduce($this->executedStatements, function($v, $s) { $m = $s->getEndMemory(); return $m > $v ? $m : $v; });
272 272
     }
273 273
 
274 274
     /**
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
      */
289 289
     public function getFailedExecutedStatements() : array
290 290
     {
291
-        return array_filter($this->executedStatements, function ($s) { return !$s->isSuccess(); });
291
+        return array_filter($this->executedStatements, function($s) { return !$s->isSuccess(); });
292 292
     }
293 293
 
294 294
     /**
Please login to merge, or discard this patch.
includes/maximebf/debugbar/src/DebugBar/DataCollector/PDO/PDOCollector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $data['memory_usage'] += $pdodata['memory_usage'];
109 109
             $data['peak_memory_usage'] = max($data['peak_memory_usage'], $pdodata['peak_memory_usage']);
110 110
             $data['statements'] = array_merge($data['statements'],
111
-                array_map(function ($s) use ($name) { $s['connection'] = $name; return $s; }, $pdodata['statements']));
111
+                array_map(function($s) use ($name) { $s['connection'] = $name; return $s; }, $pdodata['statements']));
112 112
         }
113 113
 
114 114
         $data['accumulated_duration_str'] = $this->getDataFormatter()->formatDuration($data['accumulated_duration']);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if (empty($connectionName) || $connectionName == 'default') {
132 132
             $connectionName = 'pdo';
133 133
         } else {
134
-            $connectionName = 'pdo ' . $connectionName;
134
+            $connectionName = 'pdo '.$connectionName;
135 135
         }
136 136
         $stmts = array();
137 137
         foreach ($pdo->getExecutedStatements() as $stmt) {
Please login to merge, or discard this patch.
maximebf/debugbar/src/DebugBar/DataCollector/PDO/TracedStatement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             if (is_numeric($k)) {
122 122
                 $marker = "\?";
123 123
             } else {
124
-                $marker = (preg_match("/^:/", $k)) ? $k : ":" . $k;
124
+                $marker = (preg_match("/^:/", $k)) ? $k : ":".$k;
125 125
             }
126 126
 
127 127
             $matchRule = "/({$marker}(?!\w))(?=(?:[^$quotationChar]|[$quotationChar][^$quotationChar]*[$quotationChar])*$)/";
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     {
159 159
         $params = [];
160 160
         foreach ($this->parameters as $name => $param) {
161
-            $params[$name] = htmlentities($param?:"", ENT_QUOTES, 'UTF-8', false);
161
+            $params[$name] = htmlentities($param ?: "", ENT_QUOTES, 'UTF-8', false);
162 162
         }
163 163
         return $params;
164 164
     }
Please login to merge, or discard this patch.