Completed
Push — develop ( 9f16e6...3b316f )
by Schlaefer
02:38
created
src/Lib/Saito/Exception/SaitoBlackholeException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function __construct($type = null, $data = [])
14 14
     {
15
-        $message = 'Request was blackholed. Type: ' . $type;
15
+        $message = 'Request was blackholed. Type: '.$type;
16 16
         $logger = new ExceptionLogger;
17 17
         $logger->write($message, $data);
18 18
         parent::__construct($message, 400);
Please login to merge, or discard this patch.
src/Lib/Saito/Test/AssertTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $document = new \DOMDocument;
91 91
         libxml_use_internal_errors(true);
92
-        $document->loadHTML('<!DOCTYPE html>' . $html);
92
+        $document->loadHTML('<!DOCTYPE html>'.$html);
93 93
         $xpath = new \DOMXPath($document);
94 94
         libxml_clear_errors();
95 95
 
Please login to merge, or discard this patch.
plugins/Installer/src/Controller/InstallController.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -226,6 +226,7 @@
 block discarded – undo
226 226
 
227 227
     /**
228 228
      * {@inheritdoc}
229
+     * @param string $msg
229 230
      */
230 231
     public function log($msg, $level = LogLevel::INFO, $context = ['saito.install'])
231 232
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -242,6 +242,6 @@  discard block
 block discarded – undo
242 242
     {
243 243
         InstallerState::set($action);
244 244
 
245
-        return $this->redirect('/install/' . $action);
245
+        return $this->redirect('/install/'.$action);
246 246
     }
247 247
 }
Please login to merge, or discard this patch.
plugins/Installer/src/Lib/InstallerState.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
             throw new \RuntimeException('TMP directory not available.', 1560524787);
72 72
         }
73 73
 
74
-        return (new File(TMP . 'installer.state'));
74
+        return (new File(TMP.'installer.state'));
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
src/Model/Table/UserBlocksTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
      */
177 177
     public function findAssocUsers(Query $query)
178 178
     {
179
-        $callback = function (Query $query) {
179
+        $callback = function(Query $query) {
180 180
             return $query->select(['id', 'username']);
181 181
         };
182 182
         $query->contain(['BlockedBy' => $callback, 'Users' => $callback]);
Please login to merge, or discard this patch.
plugins/Installer/tests/TestCase/Controller/InstallControllerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         ];
62 62
 
63 63
         foreach ($actions as $action) {
64
-            $this->get('install/' . $action);
64
+            $this->get('install/'.$action);
65 65
             $this->assertRedirect('/');
66 66
         }
67 67
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $this->createSettings();
103 103
         (new DbVersion(TableRegistry::get('Settings')))->set('4.10.0');
104 104
 
105
-        $token = new File(CONFIG . 'installer');
105
+        $token = new File(CONFIG.'installer');
106 106
         $this->assertTrue($token->exists());
107 107
 
108 108
         $this->get('install/connected');
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     private function createInstallerToken()
114 114
     {
115
-        (new File(CONFIG . 'installer'))->create();
115
+        (new File(CONFIG.'installer'))->create();
116 116
     }
117 117
 
118 118
     private function createSettings()
Please login to merge, or discard this patch.
plugins/BbcodeParser/src/Lib/Helper/UrlParserTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $validator->add('url', ['url' => ['rule' => 'url']]);
68 68
             $errors = $validator->errors(['url' => $url]);
69 69
             if (empty($errors)) {
70
-                $url = 'http://' . $url;
70
+                $url = 'http://'.$url;
71 71
             }
72 72
         }
73 73
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             if (!empty($url) && preg_match('/\<img\s*?src=/', $text) !== 1) {
84 84
                 $host = DomainParser::domainAndTld($url);
85 85
                 if ($host !== null && $host !== env('SERVER_NAME')) {
86
-                    $out .= ' <span class=\'richtext-linkInfo\'>[' . $host . ']</span>';
86
+                    $out .= ' <span class=\'richtext-linkInfo\'>['.$host.']</span>';
87 87
                 }
88 88
             }
89 89
         }
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
         }
117 117
 
118 118
         $_placeholder = ' … ';
119
-        $leftMargin = (int)floor($_textWordMaxLength / 2);
120
-        $rightMargin = (int)(-1 * ($_textWordMaxLength - $leftMargin - mb_strlen($_placeholder)));
119
+        $leftMargin = (int) floor($_textWordMaxLength / 2);
120
+        $rightMargin = (int) (-1 * ($_textWordMaxLength - $leftMargin - mb_strlen($_placeholder)));
121 121
 
122
-        $string = mb_substr($string, 0, $leftMargin) . $_placeholder .
122
+        $string = mb_substr($string, 0, $leftMargin).$_placeholder.
123 123
             mb_substr($string, $rightMargin);
124 124
 
125 125
         return $string;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     protected function _decorateTarget($string)
136 136
     {
137
-        $decorator = function ($matches) {
137
+        $decorator = function($matches) {
138 138
             $out = '';
139 139
             $url = $matches[1];
140 140
 
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
             $parsedUrl = parse_url($url);
146 146
 
147 147
             if (isset($parsedUrl['host'])) {
148
-                if ($parsedUrl['host'] !== env('SERVER_NAME') && $parsedUrl['host'] !== "www." . env('SERVER_NAME')) {
148
+                if ($parsedUrl['host'] !== env('SERVER_NAME') && $parsedUrl['host'] !== "www.".env('SERVER_NAME')) {
149 149
                     $out = " rel='external' target='_blank'";
150 150
                 }
151 151
             }
152 152
 
153
-            return $matches[0] . $out;
153
+            return $matches[0].$out;
154 154
         };
155 155
 
156 156
         return preg_replace_callback(
Please login to merge, or discard this patch.
src/Lib/Saito/DomainParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
Please login to merge, or discard this patch.
src/Lib/Saito/User/Permission.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
      */
117 117
     protected function _getRoles($role)
118 118
     {
119
-        $key = 'saito.core.permission.' . $role;
119
+        $key = 'saito.core.permission.'.$role;
120 120
 
121 121
         return $this->rememberStatic(
122 122
             $key,
123
-            function () use ($role) {
123
+            function() use ($role) {
124 124
                 if (!isset($this->groups[$role])) {
125 125
                     return false;
126 126
                 }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         Stopwatch::start('Permission::__construct()');
151 151
         $this->resources = Cache::remember(
152 152
             'saito.core.permission.resources',
153
-            function () {
153
+            function() {
154 154
                 $this->_bootstrapCategories();
155 155
 
156 156
                 return $this->resources;
Please login to merge, or discard this patch.