Passed
Pull Request — develop (#313)
by Schlaefer
02:21
created
lib/Phile/Model/AbstractModel.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 class AbstractModel implements \ArrayAccess
16 16
 {
17 17
     /**
18
- * @var array the storage
18
+     * @var array the storage
19 19
 */
20 20
     protected $data = array();
21 21
 
Please login to merge, or discard this patch.
plugins/phile/parserMarkdown/Classes/Parser/Markdown.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 class Markdown implements ParserInterface
19 19
 {
20 20
     /**
21
- * @var mixed the configuration
21
+     * @var mixed the configuration
22 22
 */
23 23
     private $config;
24 24
 
Please login to merge, or discard this patch.
lib/Phile/Core/Utility.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
         $result = array();
129 129
         foreach ($files as $file) {
130 130
             /**
131
- * @var \SplFileInfo $file
131
+             * @var \SplFileInfo $file
132 132
 */
133 133
             $result[] = $file->getPathname();
134 134
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
     {
160 160
         $config = Registry::get('Phile_Settings');
161 161
 
162
-        return md5($config['encryptionKey'] . $value);
162
+        return md5($config['encryptionKey'].$value);
163 163
     }
164 164
 
165 165
     /**
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * resolve a file path by replace the mod: prefix
57 57
      *
58
-     * @param $path
58
+     * @param string $path
59 59
      *
60 60
      * @return string|null the full filepath or null if file does not exists
61 61
      */
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * load files e.g. config files
78 78
      *
79
-     * @param $file
79
+     * @param null|string $file
80 80
      *
81 81
      * @return mixed|null
82 82
      */
@@ -202,6 +202,11 @@  discard block
 block discarded – undo
202 202
      * @return mixed
203 203
      */
204 204
     // @codingStandardsIgnoreStart
205
+
206
+    /**
207
+     * @param integer $min
208
+     * @param integer $max
209
+     */
205 210
     public static function crypto_rand_secure($min, $max)
206 211
     {
207 212
         // @codingStandardsIgnoreEnd
Please login to merge, or discard this patch.
lib/Phile/Core/Session.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 class Session
16 16
 {
17 17
     /**
18
- * @var bool mark if session is started
18
+     * @var bool mark if session is started
19 19
 */
20 20
     static public $isStarted = false;
21 21
 
22 22
     /**
23
- * @var string the session id
23
+     * @var string the session id
24 24
 */
25 25
     static public $sessionId = '';
26 26
 
Please login to merge, or discard this patch.
lib/Phile/Core/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     public function send()
120 120
     {
121 121
         if (!isset($this->headers['Content-Type'])) {
122
-            $this->setHeader('Content-Type', 'text/html; charset=' . $this->charset);
122
+            $this->setHeader('Content-Type', 'text/html; charset='.$this->charset);
123 123
         }
124 124
         $this->outputHeader();
125 125
         http_response_code($this->statusCode);
Please login to merge, or discard this patch.
lib/Phile/Core/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         if (isset($this->server['HTTP_HOST'])) {
84 84
             $host = $this->server['HTTP_HOST'];
85 85
             $protocol = $this->getProtocol();
86
-            $url = $protocol . '://' . $host . $url;
86
+            $url = $protocol.'://'.$host.$url;
87 87
         }
88 88
 
89 89
         $url = rtrim($url, '/');
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function url($url)
120 120
     {
121
-        return $this->getBaseUrl() . '/' . ltrim($url, '/');
121
+        return $this->getBaseUrl().'/'.ltrim($url, '/');
122 122
     }
123 123
 
124 124
     /**
Please login to merge, or discard this patch.
plugins/mycompany/demoPlugin/Classes/Plugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $settings = $this->settings;
52 52
 
53 53
         $content = $data['content'];
54
-        $content = $this->printPhpAsMarkdown($settings) . $content;
54
+        $content = $this->printPhpAsMarkdown($settings).$content;
55 55
 
56 56
         $page = $data['page'];
57 57
         $page->setContent($content);
@@ -62,6 +62,6 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function printPhpAsMarkdown($input)
64 64
     {
65
-        return "\n```php\n" . trim(print_r($input, true), "\n") . "\n```\n";
65
+        return "\n```php\n".trim(print_r($input, true), "\n")."\n```\n";
66 66
     }
67 67
 }
Please login to merge, or discard this patch.
plugins/phile/setupCheck/Classes/Plugin.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     {
90 90
         $content = $page->getRawContent();
91 91
         foreach ($vars as $key => $value) {
92
-            $regex = '/\{\{(\s*?)' . $key . '(\s*?)\}\}/';
92
+            $regex = '/\{\{(\s*?)'.$key.'(\s*?)\}\}/';
93 93
             $content = preg_replace($regex, $value, $content);
94 94
         }
95 95
         $page->setContent($content);
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@
 block discarded – undo
20 20
 {
21 21
 
22 22
     /**
23
- * @var global Phile config
23
+     * @var global Phile config
24 24
 */
25 25
     protected $config;
26 26
 
27 27
     /**
28
- * @var bool Phile installation needs setup
28
+     * @var bool Phile installation needs setup
29 29
 */
30 30
     protected $needsSetup = true;
31 31
 
32 32
     /**
33
- * @var array event subscription
33
+     * @var array event subscription
34 34
 */
35 35
     protected $events = [
36 36
         'config_loaded' => 'onConfigLoaded',
Please login to merge, or discard this patch.
plugins/phile/errorHandler/Classes/Development.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 {
21 21
 
22 22
     /**
23
- * @var array settings
23
+     * @var array settings
24 24
 */
25 25
     protected $settings;
26 26
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
     /**
291 291
      * link the class or method to the API or return the method name
292
-  *
292
+     *
293 293
      * @param $class
294 294
      * @param $method
295 295
      *
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     'a',
139 139
                     'Exception-Wiki',
140 140
                     [
141
-                        'href' => 'https://github.com/PhileCMS/Phile/wiki/Exception_' . $code,
141
+                        'href' => 'https://github.com/PhileCMS/Phile/wiki/Exception_'.$code,
142 142
                         'target_' => 'blank'
143 143
                     ]
144 144
                 );
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
         }
154 154
 
155 155
         $DS = DIRECTORY_SEPARATOR;
156
-        $pluginPath = realpath(dirname(__FILE__) . $DS . '..') . $DS;
157
-        $tplPath = $pluginPath . 'template.php';
156
+        $pluginPath = realpath(dirname(__FILE__).$DS.'..').$DS;
157
+        $tplPath = $pluginPath.'template.php';
158 158
 
159 159
         ob_start();
160 160
         extract($marker);
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
             $backtrace .= ' ';
182 182
 
183 183
             if (isset($step['class'])) {
184
-                $class = $this->linkClass($step['class']) . '<span class="divider">::</span>';
185
-                $backtrace .= $class . $this->linkClass($step['class'], $step['function']);
184
+                $class = $this->linkClass($step['class']).'<span class="divider">::</span>';
185
+                $backtrace .= $class.$this->linkClass($step['class'], $step['function']);
186 186
             } elseif (isset($step['function'])) {
187 187
                 $backtrace .= $this->tag('span', $step['function'], ['class' => 'function']);
188 188
             }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         if (!file_exists($filename)) {
252 252
             return '';
253 253
         }
254
-        $html = $this->tag('span', $filename . ':<br/>', ['class' => 'filename']);
254
+        $html = $this->tag('span', $filename.':<br/>', ['class' => 'filename']);
255 255
 
256 256
         $code = file_get_contents($filename);
257 257
         $lines = explode("\n", $code);
@@ -302,14 +302,14 @@  discard block
 block discarded – undo
302 302
             return $title;
303 303
         }
304 304
 
305
-        $filename = 'docs/classes/' . str_replace('\\', '.', $class) . '.html';
305
+        $filename = 'docs/classes/'.str_replace('\\', '.', $class).'.html';
306 306
         if (file_exists(Utility::resolveFilePath($filename))) {
307 307
             return $title;
308 308
         }
309 309
 
310
-        $href = $this->settings['base_url'] . '/' . $filename;
310
+        $href = $this->settings['base_url'].'/'.$filename;
311 311
         if ($method) {
312
-            $href .= '#method_' . $method;
312
+            $href .= '#method_'.$method;
313 313
         }
314 314
         return $this->tag('a', $title, ['href' =>  $href, 'target' => '_blank']);
315 315
     }
@@ -324,11 +324,11 @@  discard block
 block discarded – undo
324 324
      */
325 325
     protected function tag($tag, $content = '', array $attributes = [])
326 326
     {
327
-        $html = '<' . $tag;
327
+        $html = '<'.$tag;
328 328
         foreach ($attributes as $key => $value) {
329
-            $html .= ' ' . $key . '="' . htmlspecialchars($value) . '"';
329
+            $html .= ' '.$key.'="'.htmlspecialchars($value).'"';
330 330
         }
331
-        $html .= '>' . $content . '</' . $tag . '>';
331
+        $html .= '>'.$content.'</'.$tag.'>';
332 332
         return $html;
333 333
     }
334 334
 }
Please login to merge, or discard this patch.