Passed
Push — main ( 66245a...80ccfb )
by Dimitri
12:45 queued 12s
created
src/Annotations/Http/RequestMappingAnnotation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             if (isset($properties[1])) {
61 61
                 $this->method = (array) $properties[0];
62 62
 
63
-                if (! is_string($properties[1])) {
63
+                if (!is_string($properties[1])) {
64 64
                     throw new AnnotationException('RequestMappingAnnotation requires a string as path property');
65 65
                 }
66 66
 
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
         if ($this->method === ['*']) {
86 86
             $this->method = null;
87 87
         }
88
-        if (! empty($this->method)) {
88
+        if (!empty($this->method)) {
89 89
             $this->method = array_map('strtoupper', $this->method);
90 90
 
91 91
             foreach ($this->method as $method) {
92
-                if (! in_array($method, self::VALID_METHODS, true)) {
92
+                if (!in_array($method, self::VALID_METHODS, true)) {
93 93
                     throw new AnnotationException('`' . $method . '` is not a valid method for RequestMappingAnnotation');
94 94
                 }
95 95
             }
Please login to merge, or discard this patch.
src/Annotations/AnnotationReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public static function instance()
40 40
     {
41
-        if (! (static::$_instance instanceof static)) {
41
+        if (!(static::$_instance instanceof static)) {
42 42
             $params            = func_get_args();
43 43
             static::$_instance = new static(...$params);
44 44
         }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     protected function __construct()
53 53
     {
54 54
         $cacheDir = rtrim(sys_get_temp_dir(), '/\\') . DIRECTORY_SEPARATOR . 'blitz-php' . DIRECTORY_SEPARATOR . 'annotations';
55
-        if (! is_dir($cacheDir)) {
55
+        if (!is_dir($cacheDir)) {
56 56
             mkdir($cacheDir, 0777, true);
57 57
         }
58 58
         Annotations::$config['cache'] = new AnnotationCache($cacheDir);
Please login to merge, or discard this patch.
src/Cli/Commands/Generators/Command.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@
 block discarded – undo
84 84
         $command = is_string($command) ? $command : 'command:name';
85 85
         $type    = is_string($type) ? $type : 'basic';
86 86
 
87
-        if (! in_array($type, ['basic', 'generator'], true)) {
87
+        if (!in_array($type, ['basic', 'generator'], true)) {
88 88
             // @codeCoverageIgnoreStart
89 89
             $type = $this->choice(lang('CLI.generator.commandType'), ['basic', 'generator'], 'basic');
90 90
             $this->eol();
91 91
             // @codeCoverageIgnoreEnd
92 92
         }
93 93
 
94
-        if (! is_string($group)) {
94
+        if (!is_string($group)) {
95 95
             $group = $type === 'generator' ? 'Generators' : 'BlitzPHP';
96 96
         }
97 97
 
Please login to merge, or discard this patch.
src/Cli/Console/GeneratorTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             // @codeCoverageIgnoreStart
95 95
             $this->colorize(lang('CLI.generator.usingCINamespace'), 'yellow');
96 96
 
97
-            if (! $this->confirm('Are you sure you want to continue?')) {
97
+            if (!$this->confirm('Are you sure you want to continue?')) {
98 98
                 $this->eol();
99 99
                 $this->colorize(lang('CLI.generator.cancelOperation'), 'yellow');
100 100
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         // Écraser des fichiers sans le savoir est une gêne sérieuse, nous allons donc vérifier si nous dupliquons des choses,
122 122
         // si l'option "forcer" n'est pas fournie, nous renvoyons.
123
-        if (! $this->getOption('force') && $isFile) {
123
+        if (!$this->getOption('force') && $isFile) {
124 124
             $this->io->error(lang('CLI.generator.fileExist', [clean_path($path)]), true);
125 125
 
126 126
             return;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         // Vérifie si le répertoire pour enregistrer le fichier existe.
130 130
         $dir = dirname($path);
131 131
 
132
-        if (! is_dir($dir)) {
132
+        if (!is_dir($dir)) {
133 133
             mkdir($dir, 0755, true);
134 134
         }
135 135
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         // Construisez la classe en fonction des détails dont nous disposons.
139 139
         // Nous obtiendrons le contenu de notre fichier à partir du modèle,
140 140
         // puis nous effectuerons les remplacements nécessaires.
141
-        if (! write_file($path, $this->buildContent($class))) {
141
+        if (!write_file($path, $this->buildContent($class))) {
142 142
             // @codeCoverageIgnoreStart
143 143
             $this->io->error(lang('CLI.generator.fileError', [clean_path($path)]), true);
144 144
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             $class = $matches[1] . ucfirst($matches[2]);
203 203
         }
204 204
 
205
-        if ($this->enabledSuffixing && $this->getOption('suffix') && ! strripos($class, $component)) {
205
+        if ($this->enabledSuffixing && $this->getOption('suffix') && !strripos($class, $component)) {
206 206
             $class .= ucfirst($component);
207 207
         }
208 208
 
Please login to merge, or discard this patch.
src/Traits/SingletonTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public static function instance()
39 39
     {
40
-        if (! (static::$_instance instanceof static)) {
40
+        if (!(static::$_instance instanceof static)) {
41 41
             $params            = func_get_args();
42 42
             static::$_instance = new static(...$params);
43 43
         }
Please login to merge, or discard this patch.
src/Constants/constants.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -80,49 +80,49 @@  discard block
 block discarded – undo
80 80
  */
81 81
 defined('LAYOUT_PATH') || define('LAYOUT_PATH', VIEW_PATH . 'layouts' . DS);
82 82
 
83
-if (! defined('SERVICE_PATH')) {
83
+if (!defined('SERVICE_PATH')) {
84 84
     /**
85 85
      * Services directory path
86 86
      */
87 87
     define('SERVICE_PATH', APP_PATH . 'services' . DS);
88 88
 }
89 89
 
90
-if (! defined('LOG_PATH')) {
90
+if (!defined('LOG_PATH')) {
91 91
     /**
92 92
      * Application logs files storage path
93 93
      */
94 94
     define('LOG_PATH', STORAGE_PATH . 'logs' . DS);
95 95
 }
96 96
 
97
-if (! defined('DATABASE_PATH')) {
97
+if (!defined('DATABASE_PATH')) {
98 98
     /**
99 99
      * Database storage directory path
100 100
      */
101 101
     define('DATABASE_PATH', STORAGE_PATH . 'database' . DS);
102 102
 }
103 103
 
104
-if (! defined('DB_MIGRATION_PATH')) {
104
+if (!defined('DB_MIGRATION_PATH')) {
105 105
     /**
106 106
      * Database migrations storage path
107 107
      */
108 108
     define('DB_MIGRATION_PATH', RESOURCE_PATH . 'database' . DS . 'migrations' . DS);
109 109
 }
110 110
 
111
-if (! defined('DB_SEED_PATH')) {
111
+if (!defined('DB_SEED_PATH')) {
112 112
     /**
113 113
      * Database seeds storage path
114 114
      */
115 115
     define('DB_SEED_PATH', RESOURCE_PATH . 'database' . DS . 'seeds' . DS);
116 116
 }
117 117
 
118
-if (! defined('DB_DUMP_PATH')) {
118
+if (!defined('DB_DUMP_PATH')) {
119 119
     /**
120 120
      * Database backup storage path
121 121
      */
122 122
     define('DB_DUMP_PATH', DATABASE_PATH . 'dump' . DS);
123 123
 }
124 124
 
125
-if (! defined('DB_CACHE_PATH')) {
125
+if (!defined('DB_CACHE_PATH')) {
126 126
     /**
127 127
      * Database cache directory path
128 128
      */
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
  */
145 145
 defined('SECOND') || define('SECOND', 1);
146 146
 defined('MINUTE') || define('MINUTE', 60);
147
-defined('HOUR')   || define('HOUR', 3600);
148
-defined('DAY')    || define('DAY', 86400);
149
-defined('WEEK')   || define('WEEK', 604800);
150
-defined('MONTH')  || define('MONTH', 2592000);
151
-defined('YEAR')   || define('YEAR', 31536000);
147
+defined('HOUR') || define('HOUR', 3600);
148
+defined('DAY') || define('DAY', 86400);
149
+defined('WEEK') || define('WEEK', 604800);
150
+defined('MONTH') || define('MONTH', 2592000);
151
+defined('YEAR') || define('YEAR', 31536000);
152 152
 defined('DECADE') || define('DECADE', 315360000);
153 153
 
154 154
 /**
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
  * - BSD sysexits.h: http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
170 170
  * - Bash scripting: http://tldp.org/LDP/abs/html/exitcodes.html
171 171
  */
172
-defined('EXIT_SUCCESS')        || define('EXIT_SUCCESS', 0); // pas d'erreurs
173
-defined('EXIT_ERROR')          || define('EXIT_ERROR', 1); // erreur generique
174
-defined('EXIT_CONFIG')         || define('EXIT_CONFIG', 3); // erreur de configuration
175
-defined('EXIT_UNKNOWN_FILE')   || define('EXIT_UNKNOWN_FILE', 4); // fichier non trouvé
176
-defined('EXIT_UNKNOWN_CLASS')  || define('EXIT_UNKNOWN_CLASS', 5); // classe inconnue
172
+defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // pas d'erreurs
173
+defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // erreur generique
174
+defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // erreur de configuration
175
+defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // fichier non trouvé
176
+defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // classe inconnue
177 177
 defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // membre de classe inconnu
178
-defined('EXIT_USER_INPUT')     || define('EXIT_USER_INPUT', 7); // saisie utilisateur invalide
179
-defined('EXIT_DATABASE')       || define('EXIT_DATABASE', 8); // erreur de base de données
180
-defined('EXIT__AUTO_MIN')      || define('EXIT__AUTO_MIN', 9); // code d'erreur attribué automatiquement le plus bas
181
-defined('EXIT__AUTO_MAX')      || define('EXIT__AUTO_MAX', 125); // code d'erreur attribué automatiquement le plus élevé
178
+defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // saisie utilisateur invalide
179
+defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // erreur de base de données
180
+defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // code d'erreur attribué automatiquement le plus bas
181
+defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // code d'erreur attribué automatiquement le plus élevé
Please login to merge, or discard this patch.
src/Utilities/Str.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 use InvalidArgumentException;
16 16
 use Transliterator;
17 17
 
18
-if (! defined('MB_ENABLED')) {
18
+if (!defined('MB_ENABLED')) {
19 19
     if (extension_loaded('mbstring')) {
20 20
         define('MB_ENABLED', true);
21 21
         // mbstring.internal_encoding est obsolète à partir de PHP 5.6
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         define('MB_ENABLED', false);
29 29
     }
30 30
 }
31
-if (! defined('ICONV_ENABLED')) {
31
+if (!defined('ICONV_ENABLED')) {
32 32
     if (extension_loaded('iconv')) {
33 33
         define('ICONV_ENABLED', true);
34 34
         // iconv.internal_encoding est obsolète à partir de PHP 5.6
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $converter = preg_replace('#Case$#i', '', $converter);
108 108
         $converter = str_replace('to', '', strtolower($converter));
109 109
 
110
-        if (! in_array($converter, $available_case, true)) {
110
+        if (!in_array($converter, $available_case, true)) {
111 111
             throw new InvalidArgumentException("Invalid converter type: `{$converter}`");
112 112
         }
113 113
 
@@ -160,13 +160,13 @@  discard block
 block discarded – undo
160 160
     public static function cleanInsert(string $str, array $options): string
161 161
     {
162 162
         $clean = $options['clean'];
163
-        if (! $clean) {
163
+        if (!$clean) {
164 164
             return $str;
165 165
         }
166 166
         if ($clean === true) {
167 167
             $clean = ['method' => 'text'];
168 168
         }
169
-        if (! is_array($clean)) {
169
+        if (!is_array($clean)) {
170 170
             $clean = ['method' => $options['clean']];
171 171
         }
172 172
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     public static function containsAll(string $haystack, array $needles): bool
260 260
     {
261 261
         foreach ($needles as $needle) {
262
-            if (! static::contains($haystack, $needle)) {
262
+            if (!static::contains($haystack, $needle)) {
263 263
                 return false;
264 264
             }
265 265
         }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             return $options['clean'] ? static::cleanInsert($str, $options) : $str;
460 460
         }
461 461
 
462
-        if (! isset($format)) {
462
+        if (!isset($format)) {
463 463
             $format = sprintf(
464 464
                 '/(?<!%s)%s%%s%s/',
465 465
                 preg_quote($options['escape'], '/'),
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
             $str      = str_replace($tmpHash, $tmpValue, $str);
497 497
         }
498 498
 
499
-        if (! isset($options['format']) && isset($options['before'])) {
499
+        if (!isset($options['format']) && isset($options['before'])) {
500 500
             $str = str_replace($options['escape'] . $options['before'], $options['before'], $str);
501 501
         }
502 502
 
@@ -797,8 +797,8 @@  discard block
 block discarded – undo
797 797
         $pattern = '/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i';
798 798
         $replace = preg_replace_callback(
799 799
             $pattern,
800
-            static function ($match) use ($strlen) {
801
-                $utf8 = html_entity_decode($match[0], ENT_HTML5 | ENT_QUOTES, 'UTF-8');
800
+            static function($match) use ($strlen) {
801
+                $utf8 = html_entity_decode($match[0], ENT_HTML5|ENT_QUOTES, 'UTF-8');
802 802
 
803 803
                 return str_repeat(' ', $strlen($utf8, 'UTF-8'));
804 804
             },
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
         $result      = '';
859 859
 
860 860
         $pattern = '/(&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};)/i';
861
-        $parts   = preg_split($pattern, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
861
+        $parts   = preg_split($pattern, $text, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
862 862
 
863 863
         foreach ($parts as $part) {
864 864
             $offset = 0;
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
             if ($offset !== 0 || $totalLength + $len > $length) {
880 880
                 if (
881 881
                     strpos($part, '&') === 0 && preg_match($pattern, $part)
882
-                    && $part !== html_entity_decode($part, ENT_HTML5 | ENT_QUOTES, 'UTF-8')
882
+                    && $part !== html_entity_decode($part, ENT_HTML5|ENT_QUOTES, 'UTF-8')
883 883
                 ) {
884 884
                     // Entities cannot be passed substr.
885 885
                     continue;
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
         }
935 935
 
936 936
         $truncate = mb_substr($text, mb_strlen($text) - $length + mb_strlen($ellipsis));
937
-        if (! $exact) {
937
+        if (!$exact) {
938 938
             $spacepos = mb_strpos($truncate, ' ');
939 939
             $truncate = $spacepos === false ? '' : trim(mb_substr($truncate, $spacepos));
940 940
         }
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
             }
990 990
             if ($tmpOffset !== -1) {
991 991
                 $buffer .= substr($data, $offset, ($tmpOffset - $offset));
992
-                if (! $depth && $data[$tmpOffset] === $separator) {
992
+                if (!$depth && $data[$tmpOffset] === $separator) {
993 993
                     $results[] = $buffer;
994 994
                     $buffer    = '';
995 995
                 } else {
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
                     }
1005 1005
                 } else {
1006 1006
                     if ($data[$tmpOffset] === $leftBound) {
1007
-                        if (! $open) {
1007
+                        if (!$open) {
1008 1008
                             $depth++;
1009 1009
                             $open = true;
1010 1010
                         } else {
@@ -1018,11 +1018,11 @@  discard block
 block discarded – undo
1018 1018
                 $offset    = $length + 1;
1019 1019
             }
1020 1020
         }
1021
-        if (empty($results) && ! empty($buffer)) {
1021
+        if (empty($results) && !empty($buffer)) {
1022 1022
             $results[] = $buffer;
1023 1023
         }
1024 1024
 
1025
-        if (! empty($results)) {
1025
+        if (!empty($results)) {
1026 1026
             return array_map('trim', $results);
1027 1027
         }
1028 1028
 
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
      */
1063 1063
     public static function transliterate(string $string, $transliterator = null)
1064 1064
     {
1065
-        if (! $transliterator) {
1065
+        if (!$transliterator) {
1066 1066
             $transliterator = static::$_defaultTransliterator ?: static::$_defaultTransliteratorId;
1067 1067
         }
1068 1068
 
@@ -1093,7 +1093,7 @@  discard block
 block discarded – undo
1093 1093
         $default = [
1094 1094
             'ellipsis' => '...', 'exact' => true, 'html' => false, 'trimWidth' => false,
1095 1095
         ];
1096
-        if (! empty($options['html']) && strtolower(mb_internal_encoding()) === 'utf-8') {
1096
+        if (!empty($options['html']) && strtolower(mb_internal_encoding()) === 'utf-8') {
1097 1097
             $default['ellipsis'] = "\xe2\x80\xa6";
1098 1098
         }
1099 1099
         $options += $default;
@@ -1113,12 +1113,12 @@  discard block
 block discarded – undo
1113 1113
 
1114 1114
             foreach ($tags as $tag) {
1115 1115
                 $contentLength = 0;
1116
-                if (! in_array($tag[2], static::$_defaultHtmlNoCount, true)) {
1116
+                if (!in_array($tag[2], static::$_defaultHtmlNoCount, true)) {
1117 1117
                     $contentLength = self::strlen($tag[3], $options);
1118 1118
                 }
1119 1119
 
1120 1120
                 if ($truncate === '') {
1121
-                    if (! preg_match('/img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param/i', $tag[2])) {
1121
+                    if (!preg_match('/img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param/i', $tag[2])) {
1122 1122
                         if (preg_match('/<[\w]+[^>]*>/', $tag[0])) {
1123 1123
                             array_unshift($openTags, $tag[2]);
1124 1124
                         } elseif (preg_match('/<\/([\w]+)[^>]*>/', $tag[0], $closeTag)) {
@@ -1164,13 +1164,13 @@  discard block
 block discarded – undo
1164 1164
 
1165 1165
         $result = self::substr($text, 0, $length - $ellipsisLength, $options);
1166 1166
 
1167
-        if (! $options['exact']) {
1167
+        if (!$options['exact']) {
1168 1168
             if (self::substr($text, $length - $ellipsisLength, 1, $options) !== ' ') {
1169 1169
                 $result = self::removeLastWord($result);
1170 1170
             }
1171 1171
 
1172 1172
             // If result is empty, then we don't need to count ellipsis in the cut.
1173
-            if (! strlen($result)) {
1173
+            if (!strlen($result)) {
1174 1174
                 $result = self::substr($text, 0, $length, $options);
1175 1175
             }
1176 1176
         }
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
     {
1202 1202
         preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $value, $matches);
1203 1203
 
1204
-        if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) {
1204
+        if (!isset($matches[0]) || static::length($value) === static::length($matches[0])) {
1205 1205
             return $value;
1206 1206
         }
1207 1207
 
@@ -1351,7 +1351,7 @@  discard block
 block discarded – undo
1351 1351
     {
1352 1352
         static $languageSpecific;
1353 1353
 
1354
-        if (! isset($languageSpecific)) {
1354
+        if (!isset($languageSpecific)) {
1355 1355
             $languageSpecific = [
1356 1356
                 'bg' => [
1357 1357
                     ['х', 'Х', 'щ', 'Щ', 'ъ', 'Ъ', 'ь', 'Ь'],
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
                     ['ae', 'oe', 'aa', 'Ae', 'Oe', 'Aa'],
1363 1363
                 ],
1364 1364
                 'de' => [
1365
-                    ['ä',  'ö',  'ü',  'Ä',  'Ö',  'Ü'],
1365
+                    ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'],
1366 1366
                     ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'],
1367 1367
                 ],
1368 1368
                 'he' => [
Please login to merge, or discard this patch.
src/Utilities/Inflector.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
         '/us$/i'                                                             => 'uses',
46 46
         '/(alias)$/i'                                                        => '\1es',
47 47
         '/(ax|cris|test)is$/i'                                               => '\1es',
48
-        '/(m)an$/'                                                           => '\1en',        // man, woman, spokesman
49
-        '/(bu|campu)s$/'                                                     => '\1\2ses',     // bus, campus
50
-        '/(octop)us$/'                                                       => '\1i',         // octopus
48
+        '/(m)an$/'                                                           => '\1en', // man, woman, spokesman
49
+        '/(bu|campu)s$/'                                                     => '\1\2ses', // bus, campus
50
+        '/(octop)us$/'                                                       => '\1i', // octopus
51 51
         '/s$/'                                                               => 's',
52 52
         '/^$/'                                                               => '',
53 53
         '/$/'                                                                => 's',
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 
433 433
             return $value;
434 434
         }
435
-        if (! isset(static::$_cache[$type][$key])) {
435
+        if (!isset(static::$_cache[$type][$key])) {
436 436
             return false;
437 437
         }
438 438
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
             return static::$_cache['pluralize'][$word];
513 513
         }
514 514
 
515
-        if (! isset(static::$_cache['irregular']['pluralize'])) {
515
+        if (!isset(static::$_cache['irregular']['pluralize'])) {
516 516
             static::$_cache['irregular']['pluralize'] = '(?:' . implode('|', array_keys(static::$_irregular)) . ')';
517 517
         }
518 518
 
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
             return static::$_cache['pluralize'][$word];
524 524
         }
525 525
 
526
-        if (! isset(static::$_cache['uninflected'])) {
526
+        if (!isset(static::$_cache['uninflected'])) {
527 527
             static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')';
528 528
         }
529 529
 
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
             return static::$_cache['singularize'][$word];
558 558
         }
559 559
 
560
-        if (! isset(static::$_cache['irregular']['singular'])) {
560
+        if (!isset(static::$_cache['irregular']['singular'])) {
561 561
             static::$_cache['irregular']['singular'] = '(?:' . implode('|', static::$_irregular) . ')';
562 562
         }
563 563
 
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
             return static::$_cache['singularize'][$word];
569 569
         }
570 570
 
571
-        if (! isset(static::$_cache['uninflected'])) {
571
+        if (!isset(static::$_cache['uninflected'])) {
572 572
             static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')';
573 573
         }
574 574
 
Please login to merge, or discard this patch.
src/Loader/Load.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
 
40 40
         // services système
41 41
         $filename = SYST_PATH . 'Constants' . DS . 'providers.php';
42
-        if (! file_exists($filename)) {
42
+        if (!file_exists($filename)) {
43 43
             throw LoadException::providersDefinitionDontExist($filename);
44 44
         }
45
-        if (! in_array($filename, get_included_files(), true)) {
45
+        if (!in_array($filename, get_included_files(), true)) {
46 46
             $providers = array_merge($providers, require $filename);
47 47
         }
48 48
 
49 49
         // services de l'application
50 50
         $filename = CONFIG_PATH . 'providers.php';
51
-        if (file_exists($filename) && ! in_array($filename, get_included_files(), true)) {
51
+        if (file_exists($filename) && !in_array($filename, get_included_files(), true)) {
52 52
             $providers = array_merge($providers, require $filename);
53 53
         }
54 54
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             return $models;
98 98
         }
99 99
 
100
-        if (! self::isLoaded('models', $model)) {
100
+        if (!self::isLoaded('models', $model)) {
101 101
             self::loaded('models', $model, FileLocator::model($model, $options, $connection));
102 102
         }
103 103
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $locale ??= config('app.language');
113 113
 
114
-        if (! self::isLoaded('langs', $file . $locale)) {
114
+        if (!self::isLoaded('langs', $file . $locale)) {
115 115
             self::loaded('langs', $file . $locale, FileLocator::lang($file, $locale));
116 116
         }
117 117
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     private static function isLoaded(string $module, $element): bool
127 127
     {
128
-        if (! isset(self::$loads[$module]) || ! is_array(self::$loads[$module])) {
128
+        if (!isset(self::$loads[$module]) || !is_array(self::$loads[$module])) {
129 129
             return false;
130 130
         }
131 131
 
Please login to merge, or discard this patch.