Completed
Push — chroe/update-to-php-8-again ( ef11db...95514a )
by Vladimir
08:07
created
tests/bootstrap.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,13 +3,17 @@
 block discarded – undo
3 3
 require __DIR__ . "/../vendor/autoload.php";
4 4
 
5 5
 // The only deprecation warnings we need to ignore/handle are in PHP 7.4 so far
6
-if (PHP_VERSION_ID >= 70400) {
7
-    function customErrorHandler($errno, $errstr, $errfile, $errline) {
6
+if (PHP_VERSION_ID >= 70400)
7
+{
8
+    function customErrorHandler($errno, $errstr, $errfile, $errline)
9
+    {
8 10
         // We know about this deprecation warning exists and it's already been
9 11
         // fixed in the 2.x branch. For BC reasons in the 1.x branch, we'll
10 12
         // ignore this warning to let tests pass.
11
-        if ($errno === E_DEPRECATED) {
12
-            if ($errstr === "Function ReflectionType::__toString() is deprecated") {
13
+        if ($errno === E_DEPRECATED)
14
+        {
15
+            if ($errstr === "Function ReflectionType::__toString() is deprecated")
16
+            {
13 17
                 return true;
14 18
             }
15 19
         }
Please login to merge, or discard this patch.
tests/PHPUnit_Stakx_TestCase.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -476,7 +476,8 @@
 block discarded – undo
476 476
 
477 477
         /** @var \ReflectionMethod $fxnToCall */
478 478
         $fxnToCall = \__::chain($fxns)
479
-            ->filter(function (\ReflectionMethod $fxn) use ($method) {
479
+            ->filter(function (\ReflectionMethod $fxn) use ($method)
480
+            {
480 481
                 return $fxn->getName() === $method;
481 482
             })
482 483
             ->get(0, null)
Please login to merge, or discard this patch.
src/AssetEngine/Sass/SassEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
         if ($this->cacheDirectory)
200 200
         {
201 201
             $cacheOptions = [
202
-                'cacheDir' => (string) $this->cacheDirectory->getFilesystemPath(),
202
+                'cacheDir' => (string)$this->cacheDirectory->getFilesystemPath(),
203 203
                 'forceRefresh' => false,
204 204
             ];
205 205
         }
Please login to merge, or discard this patch.
src/Server/WebServer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@
 block discarded – undo
62 62
     {
63 63
         $routes = Controller::create($routeMapper, $compiler);
64 64
 
65
-        return new Server(function (ServerRequestInterface $request) use ($routes, $compiler, $assetManager) {
65
+        return new Server(function (ServerRequestInterface $request) use ($routes, $compiler, $assetManager)
66
+        {
66 67
             $httpMethod = $request->getMethod();
67 68
             $urlPath = Controller::normalizeUrl($request->getUri()->getPath());
68 69
 
Please login to merge, or discard this patch.
src/Server/Controller.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@  discard block
 block discarded – undo
45 45
      */
46 46
     private function staticPageViewAction(StaticPageView $pageView, Compiler $compiler)
47 47
     {
48
-        return function () use ($pageView, $compiler) {
48
+        return function () use ($pageView, $compiler)
49
+        {
49 50
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
50 51
 
51 52
             $compiler->getTemplateBridge()->clearTemplateCache();
@@ -75,7 +76,8 @@  discard block
 block discarded – undo
75 76
      */
76 77
     private function dynamicPageViewAction(DynamicPageView $pageView, Compiler $compiler)
77 78
     {
78
-        return function (ServerRequestInterface $request) use ($pageView, $compiler) {
79
+        return function (ServerRequestInterface $request) use ($pageView, $compiler)
80
+        {
79 81
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
80 82
 
81 83
             $compiler->getTemplateBridge()->clearTemplateCache();
@@ -111,7 +113,8 @@  discard block
 block discarded – undo
111 113
      */
112 114
     private function repeaterPageViewAction(RepeaterPageView $pageView, Compiler $compiler)
113 115
     {
114
-        return function (ServerRequestInterface $request) use ($pageView, $compiler) {
116
+        return function (ServerRequestInterface $request) use ($pageView, $compiler)
117
+        {
115 118
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
116 119
 
117 120
             $compiler->getTemplateBridge()->clearTemplateCache();
@@ -154,7 +157,8 @@  discard block
 block discarded – undo
154 157
                 return $this->repeaterPageViewAction($pageView, $compiler);
155 158
 
156 159
             default:
157
-                return function () {
160
+                return function ()
161
+                {
158 162
                     $errMsg = 'This URL type has not yet been implemented.';
159 163
 
160 164
                     return new Response(501, ['Content-Type' => 'text/plain'], $errMsg);
@@ -171,7 +175,8 @@  discard block
 block discarded – undo
171 175
      */
172 176
     private function createRedirectAction($to)
173 177
     {
174
-        return function () use ($to) {
178
+        return function () use ($to)
179
+        {
175 180
             return new Response(302, [
176 181
                 'Location' => $to,
177 182
             ]);
Please login to merge, or discard this patch.
src/Templating/Twig/Extension/OrderFilter.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@
 block discarded – undo
19 19
             return $array;
20 20
         }
21 21
 
22
-        usort($array, function ($a, $b) use ($key, $order, $case_insensitive) {
22
+        usort($array, function ($a, $b) use ($key, $order, $case_insensitive)
23
+        {
23 24
             $aValue = __::get($a, $key);
24 25
             $bValue = __::get($b, $key);
25 26
 
Please login to merge, or discard this patch.
src/Templating/Twig/Extension/TableOfContentsFilter.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,14 +55,20 @@
 block discarded – undo
55 55
 
56 56
             $headingID = $heading->attributes->getNamedItem('id');
57 57
 
58
-            if ($curr > $last) // If the current level is greater than the last level indent one level
58
+            if ($curr > $last)
59
+            {
60
+                // If the current level is greater than the last level indent one level
59 61
             {
60 62
                 $toc .= '<ul>';
61 63
             }
62
-            elseif ($curr < $last) // If the current level is less than the last level go up appropriate amount.
64
+            }
65
+            elseif ($curr < $last)
66
+            {
67
+                // If the current level is less than the last level go up appropriate amount.
63 68
             {
64 69
                 $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>';
65 70
             }
71
+            }
66 72
             else // If the current level is equal to the last.
67 73
             {
68 74
                 $toc .= '</li>';
Please login to merge, or discard this patch.
src/Document/CollectableItemTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * {@inheritdoc}
47 47
      */
48
-    public function saveParentPageView(DynamicPageView &$pageView)
48
+    public function saveParentPageView(DynamicPageView & $pageView)
49 49
     {
50 50
         $this->parentPageViews[] = &$pageView;
51 51
     }
Please login to merge, or discard this patch.
src/Document/DynamicPageView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * Add a CollectableItem for this PageView to handle.
37 37
      */
38
-    public function addCollectableItem(CollectableItem &$collectable)
38
+    public function addCollectableItem(CollectableItem & $collectable)
39 39
     {
40 40
         $this->collectableItems[$collectable->getRelativeFilePath()] = &$collectable;
41 41
         $collectable->saveParentPageView($this);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * Delete a CollectableItem from this PageView.
46 46
      */
47
-    public function delCollectableItem(CollectableItem &$collectableItem)
47
+    public function delCollectableItem(CollectableItem & $collectableItem)
48 48
     {
49 49
         unset($this->collectableItems[$collectableItem->getRelativeFilePath()]);
50 50
     }
Please login to merge, or discard this patch.