Completed
Branch develop (c03385)
by Schlaefer
04:24
created
src/View/Helper/UserHelper.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
      * Translates user types
80 80
      *
81 81
      * @param string $type type
82
-     * @return mixed
82
+     * @return string|null
83 83
      */
84 84
     public function type($type)
85 85
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Identicon\Identicon;
15 15
 use Saito\RememberTrait;
16 16
 use Saito\User\ForumsUserInterface;
17
-use Saito\User\SaitoUser;
18 17
 use Stopwatch\Lib\Stopwatch;
19 18
 
20 19
 /**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             }
73 73
         }
74 74
 
75
-        return '<style type="text/css">' . implode(" ", $styles) . '</style>';
75
+        return '<style type="text/css">'.implode(" ", $styles).'</style>';
76 76
     }
77 77
 
78 78
     /**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $link = $url;
126 126
 
127 127
         if (substr($link, 0, 4) == 'www.') {
128
-            $link = 'http://' . $link;
128
+            $link = 'http://'.$link;
129 129
         }
130 130
         if (substr($link, 0, 4) == 'http') {
131 131
             $text = '<i class="fa fa-home fa-lg"></i>';
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $html = $name;
161 161
         } elseif ($link || ($link instanceof ForumsUserInterface && $link->isLoggedIn())
162 162
         ) {
163
-            return $this->Html->link($name, '/users/view/' . $id, $options);
163
+            return $this->Html->link($name, '/users/view/'.$id, $options);
164 164
         } else {
165 165
             $html = $name;
166 166
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function getAvatar($user, array $options = [])
182 182
     {
183
-        $getAvatar = function () use ($user, $options) {
183
+        $getAvatar = function() use ($user, $options) {
184 184
             Stopwatch::start('UserHelper::getAvatar()');
185 185
             $defaults = [
186 186
                 'class' => 'avatar-image',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 $imgUri = (new Identicon)->getImageDataUri($name, $hdpi);
207 207
             }
208 208
 
209
-            $style = "background-image: url({$imgUri});" . $options['style'];
209
+            $style = "background-image: url({$imgUri});".$options['style'];
210 210
 
211 211
             $html = $this->Html->tag(
212 212
                 $options['tag'],
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         };
228 228
 
229 229
         $name = $user->get('username');
230
-        $hash = 'avatar.' . md5($name . serialize($options));
230
+        $hash = 'avatar.'.md5($name.serialize($options));
231 231
 
232 232
         return $this->remember($hash, $getAvatar);
233 233
     }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,4 +13,4 @@
 block discarded – undo
13 13
  * @license       https://opensource.org/licenses/mit-license.php MIT License
14 14
  */
15 15
 
16
-require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
16
+require 'webroot'.DIRECTORY_SEPARATOR.'index.php';
Please login to merge, or discard this patch.
config/Seeds/SmiliesSeed.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function run()
20 20
     {
21 21
         $data =
22
-          [
22
+            [
23 23
             [
24 24
                 'id' => 1,
25 25
                 'sort' => 1,
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 'sort' => 17,
106 106
                 'icon' => 'angry',
107 107
             ]
108
-          ];
108
+            ];
109 109
 
110 110
         $table = $this->table('smilies');
111 111
         $table->insert($data)->save();
Please login to merge, or discard this patch.
config/saito_config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
          * Is the forum installed? Runs installer if not. Default: run installer.
10 10
          */
11 11
         'installed' => filter_var(
12
-            env('INSTALLED', !file_exists(CONFIG . '/installer')),
12
+            env('INSTALLED', !file_exists(CONFIG.'/installer')),
13 13
             FILTER_VALIDATE_BOOLEAN
14 14
         ),
15 15
         /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             /**
40 40
              * Upload directory root with trailing slash
41 41
              */
42
-            'uploadDirectory' => WWW_ROOT . 'useruploads' . DIRECTORY_SEPARATOR
42
+            'uploadDirectory' => WWW_ROOT.'useruploads'.DIRECTORY_SEPARATOR
43 43
         ],
44 44
 
45 45
         /**
Please login to merge, or discard this patch.
config/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  */
47 47
 Router::defaultRouteClass(DashedRoute::class);
48 48
 
49
-Router::scope('/', function (RouteBuilder $routes) {
49
+Router::scope('/', function(RouteBuilder $routes) {
50 50
     /**
51 51
      * Here, we are connecting '/' (base path) to a controller called 'Pages',
52 52
      * its action called 'display', and we pass a param to select the view file
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     $routes->fallbacks(DashedRoute::class);
97 97
 });
98 98
 
99
-Router::scope('/entries', function ($routes) {
99
+Router::scope('/entries', function($routes) {
100 100
     $routes->setExtensions(['json']);
101 101
     $routes->connect(
102 102
         '/threadLine/*',
Please login to merge, or discard this patch.
config/requirements.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,19 +21,19 @@
 block discarded – undo
21 21
  * You can remove this if you are confident that your PHP version is sufficient.
22 22
  */
23 23
 if (version_compare(PHP_VERSION, '5.6.0') < 0) {
24
-    trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.' . PHP_EOL, E_USER_ERROR);
24
+    trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.'.PHP_EOL, E_USER_ERROR);
25 25
 }
26 26
 
27 27
 /*
28 28
  * You can remove this if you are confident you have intl installed.
29 29
  */
30 30
 if (!extension_loaded('intl')) {
31
-    trigger_error('You must enable the intl extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
31
+    trigger_error('You must enable the intl extension to use CakePHP.'.PHP_EOL, E_USER_ERROR);
32 32
 }
33 33
 
34 34
 /*
35 35
  * You can remove this if you are confident you have mbstring installed.
36 36
  */
37 37
 if (!extension_loaded('mbstring')) {
38
-    trigger_error('You must enable the mbstring extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
38
+    trigger_error('You must enable the mbstring extension to use CakePHP.'.PHP_EOL, E_USER_ERROR);
39 39
 }
Please login to merge, or discard this patch.
config/paths.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,47 +39,47 @@
 block discarded – undo
39 39
 /**
40 40
  * Path to the application's directory.
41 41
  */
42
-define('APP', ROOT . DS . APP_DIR . DS);
42
+define('APP', ROOT.DS.APP_DIR.DS);
43 43
 
44 44
 /**
45 45
  * Path to the config directory.
46 46
  */
47
-define('CONFIG', ROOT . DS . 'config' . DS);
47
+define('CONFIG', ROOT.DS.'config'.DS);
48 48
 
49 49
 /**
50 50
  * File path to the webroot directory.
51 51
  */
52
-define('WWW_ROOT', ROOT . DS . 'webroot' . DS);
52
+define('WWW_ROOT', ROOT.DS.'webroot'.DS);
53 53
 
54 54
 /**
55 55
  * Path to the tests directory.
56 56
  */
57
-define('TESTS', ROOT . DS . 'tests' . DS);
57
+define('TESTS', ROOT.DS.'tests'.DS);
58 58
 
59 59
 /**
60 60
  * Path to the temporary files directory.
61 61
  */
62
-define('TMP', ROOT . DS . 'tmp' . DS);
62
+define('TMP', ROOT.DS.'tmp'.DS);
63 63
 
64 64
 /**
65 65
  * Path to the logs directory.
66 66
  */
67
-define('LOGS', ROOT . DS . 'logs' . DS);
67
+define('LOGS', ROOT.DS.'logs'.DS);
68 68
 
69 69
 /**
70 70
  * Path to the cache files directory. It can be shared between hosts in a multi-server setup.
71 71
  */
72
-define('CACHE', TMP . 'cache' . DS);
72
+define('CACHE', TMP.'cache'.DS);
73 73
 
74 74
 /**
75 75
  * The absolute path to the "cake" directory, WITHOUT a trailing DS.
76 76
  *
77 77
  * CakePHP should always be installed with composer, so look there.
78 78
  */
79
-define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp');
79
+define('CAKE_CORE_INCLUDE_PATH', ROOT.DS.'vendor'.DS.'cakephp'.DS.'cakephp');
80 80
 
81 81
 /**
82 82
  * Path to the cake directory.
83 83
  */
84
-define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
85
-define('CAKE', CORE_PATH . 'src' . DS);
84
+define('CORE_PATH', CAKE_CORE_INCLUDE_PATH.DS);
85
+define('CAKE', CORE_PATH.'src'.DS);
Please login to merge, or discard this patch.
config/app.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         'cssBaseUrl' => 'css/',
61 61
         'jsBaseUrl' => 'js/',
62 62
         'paths' => [
63
-            'plugins' => [ROOT . DS . 'plugins' . DS],
64
-            'templates' => [APP . 'Template' . DS],
65
-            'locales' => [APP . 'Locale' . DS],
63
+            'plugins' => [ROOT.DS.'plugins'.DS],
64
+            'templates' => [APP.'Template'.DS],
65
+            'locales' => [APP.'Locale'.DS],
66 66
         ],
67 67
     ],
68 68
 
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
          */
112 112
         '_cake_core_' => [
113 113
             'className' => $cache['engine'],
114
-            'prefix' => $cache['prefix'] . 'cake_core_',
115
-            'path' => CACHE . 'persistent/',
114
+            'prefix' => $cache['prefix'].'cake_core_',
115
+            'path' => CACHE.'persistent/',
116 116
             'serialize' => true,
117 117
             'duration' => '+1 years',
118 118
             'url' => env('CACHE_CAKECORE_URL', null),
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
          */
126 126
         '_cake_model_' => [
127 127
             'className' => $cache['engine'],
128
-            'prefix' => $cache['prefix'] . 'cake_model_',
129
-            'path' => CACHE . 'models/',
128
+            'prefix' => $cache['prefix'].'cake_model_',
129
+            'path' => CACHE.'models/',
130 130
             'serialize' => true,
131 131
             'duration' => '+1 years',
132 132
             'url' => env('CACHE_CAKEMODEL_URL', null),
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
          */
139 139
         '_cake_routes_' => [
140 140
             'className' => $cache['engine'],
141
-            'prefix' => $cache['prefix'] . 'cake_model_',
141
+            'prefix' => $cache['prefix'].'cake_model_',
142 142
             'path' => CACHE,
143 143
             'serialize' => true,
144 144
             'duration' => '+1 years',
Please login to merge, or discard this patch.
plugins/Api/config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 Router::scope(
9 9
     '/api/v2/',
10 10
     ['plugin' => 'Api'],
11
-    function ($routes) {
11
+    function($routes) {
12 12
     }
13 13
 );
Please login to merge, or discard this patch.