Passed
Pull Request — master (#182)
by Arman
03:14
created
src/Libraries/Database/Sleekdb/Statements/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function get(): array
42 42
     {
43
-        return array_map(function ($element) {
43
+        return array_map(function($element) {
44 44
             $item = clone $this;
45 45
             $item->data = $element;
46 46
             $item->modifiedFields = $element;
Please login to merge, or discard this patch.
src/Libraries/Database/BasePaginator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
      */
138 138
     public function lastPageNumber(): int
139 139
     {
140
-        return (int)ceil($this->total() / $this->perPage);
140
+        return (int) ceil($this->total() / $this->perPage);
141 141
     }
142 142
 
143 143
     /**
Please login to merge, or discard this patch.
src/Http/Request/Header.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
      * @param string $key
33 33
      * @return bool
34 34
      */
35
-	  public static function hasHeader(string $key): bool
36
-	  {
37
-	  	  list($keyWithHyphens, $keyWithUnderscores) = self::normalizeHeaderKey($key);
35
+        public static function hasHeader(string $key): bool
36
+        {
37
+            list($keyWithHyphens, $keyWithUnderscores) = self::normalizeHeaderKey($key);
38 38
 
39
-	  	  return isset(self::$__headers[$keyWithHyphens]) || isset(self::$__headers[$keyWithUnderscores]);
40
-	  }
39
+            return isset(self::$__headers[$keyWithHyphens]) || isset(self::$__headers[$keyWithUnderscores]);
40
+        }
41 41
 
42 42
     /**
43 43
      * Gets the request header by given key
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public static function getHeader(string $key): ?string
48 48
     {
49
-	      if (self::hasHeader($key)) {
50
-		        list($keyWithHyphens, $keyWithUnderscores) = self::normalizeHeaderKey($key);
51
-		        return self::$__headers[$keyWithHyphens] ?? self::$__headers[$keyWithUnderscores];
52
-	      }
49
+            if (self::hasHeader($key)) {
50
+                list($keyWithHyphens, $keyWithUnderscores) = self::normalizeHeaderKey($key);
51
+                return self::$__headers[$keyWithHyphens] ?? self::$__headers[$keyWithUnderscores];
52
+            }
53 53
 
54
-				return null;
54
+                return null;
55 55
     }
56 56
 
57 57
     /**
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
         }
85 85
     }
86 86
 
87
-	  /**
88
-	   * @param string $key
89
-	   * @return array
90
-	   */
91
-	  private static function normalizeHeaderKey(string $key): array
92
-	  {
93
-	  	$keyWithHyphens = str_replace('_', '-', strtolower($key));
94
-	  	$keyWithUnderscores = str_replace('-', '_', $key);
95
-	  	return [$keyWithHyphens, $keyWithUnderscores];
96
-	  }
87
+        /**
88
+         * @param string $key
89
+         * @return array
90
+         */
91
+        private static function normalizeHeaderKey(string $key): array
92
+        {
93
+            $keyWithHyphens = str_replace('_', '-', strtolower($key));
94
+            $keyWithUnderscores = str_replace('-', '_', $key);
95
+            return [$keyWithHyphens, $keyWithUnderscores];
96
+        }
97 97
 }
98 98
\ No newline at end of file
Please login to merge, or discard this patch.
src/Libraries/Validation/Rules/General.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@
 block discarded – undo
82 82
         if (!empty($value)) {
83 83
             $captcha = CaptchaManager::getHandler();
84 84
 
85
-            if (!$captcha->verify($value)){
85
+            if (!$captcha->verify($value)) {
86 86
                 $errorCode = $captcha->getErrorMessage();
87
-                $this->addError($field, 'captcha.'.$errorCode, $param);
87
+                $this->addError($field, 'captcha.' . $errorCode, $param);
88 88
             }
89 89
         }
90 90
     }
Please login to merge, or discard this patch.
src/Libraries/Storage/Adapters/GoogleDrive/GoogleDriveApp.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
                 'Content-Type' => $contentType
164 164
             ];
165 165
             return $this->sendRequest($url, $params, $headers, $method);
166
-        }catch (Exception $e){
166
+        } catch (Exception $e){
167 167
             throw new Exception($e->getMessage(), (int)$e->getCode());
168 168
         }
169 169
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
                 'Content-Type' => $contentType
218 218
             ];
219 219
             return $this->sendRequest($url, $params, $headers, $method);
220
-        }catch (Exception $e){
221
-            throw new Exception($e->getMessage(), (int)$e->getCode());
220
+        } catch (Exception $e) {
221
+            throw new Exception($e->getMessage(), (int) $e->getCode());
222 222
         }
223 223
     }
224 224
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      * @return mixed|null
231 231
      * @throws Exception
232 232
      */
233
-    public function getFileInfo(string $fileId, bool $media = false, array $params = []){
233
+    public function getFileInfo(string $fileId, bool $media = false, array $params = []) {
234 234
         $queryParam = $media ? '?alt=media' : '?fields=*';
235 235
         return $this->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '/' . $fileId . $queryParam, $params, 'GET');
236 236
     }
Please login to merge, or discard this patch.
src/Libraries/Storage/Adapters/GoogleDrive/GoogleDriveFileSystemAdapter.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         try {
83 83
             if($this->isFile($filename)){
84 84
                 return $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_MEDIA_URL . '/' . $filename . '?uploadType=media', $content, 'PATCH', 'application/octet-stream');
85
-            }else{
85
+            } else{
86 86
                 $data = [
87 87
                     'name' => $filename,
88 88
                     'parents' => $parentId ? [$parentId] : ['root']
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function makeDirectory(string $dirname, ?string $parentId = null): bool
48 48
     {
49
-        try{
49
+        try {
50 50
             $data = [
51 51
                 'name' => $dirname,
52 52
                 'mimeType' => GoogleDriveApp::FOLDER_MIMETYPE,
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function get(string $filename)
75 75
     {
76 76
         try {
77
-            return (string)$this->googleDriveApp->getFileInfo($filename, true);
77
+            return (string) $this->googleDriveApp->getFileInfo($filename, true);
78 78
         } catch (Exception $e) {
79 79
             return false;
80 80
         }
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
     public function put(string $filename, string $content, ?string $parentId = null)
87 87
     {
88 88
         try {
89
-            if($this->isFile($filename)){
89
+            if ($this->isFile($filename)) {
90 90
                 return $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_MEDIA_URL . '/' . $filename . '?uploadType=media', $content, 'PATCH', 'application/octet-stream');
91
-            }else{
91
+            } else {
92 92
                 $data = [
93 93
                     'name' => $filename,
94 94
                     'parents' => $parentId ? [$parentId] : ['root']
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     public function size(string $filename)
162 162
     {
163 163
         try {
164
-            $meta = (array)$this->googleDriveApp->getFileInfo($filename);
164
+            $meta = (array) $this->googleDriveApp->getFileInfo($filename);
165 165
             return $meta['size'];
166 166
         } catch (Exception $e) {
167 167
             return false;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function lastModified(string $filename)
175 175
     {
176 176
         try {
177
-            $meta = (array)$this->googleDriveApp->getFileInfo($filename);
177
+            $meta = (array) $this->googleDriveApp->getFileInfo($filename);
178 178
             return !empty($meta['modifiedTime']) ? strtotime($meta['modifiedTime']) : false;
179 179
         } catch (Exception $e) {
180 180
             return false;
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     public function isFile(string $filename): bool
203 203
     {
204 204
         try {
205
-            $meta = (array)$this->googleDriveApp->getFileInfo($filename);
205
+            $meta = (array) $this->googleDriveApp->getFileInfo($filename);
206 206
 
207 207
             return $meta['kind'] === GoogleDriveApp::DRIVE_FILE_KIND && $meta['mimeType'] != GoogleDriveApp::FOLDER_MIMETYPE;
208 208
         } catch (Exception $e) {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     public function isDirectory(string $dirname): bool
217 217
     {
218 218
         try {
219
-            $meta = (array)$this->googleDriveApp->getFileInfo($dirname);
219
+            $meta = (array) $this->googleDriveApp->getFileInfo($dirname);
220 220
 
221 221
             return $meta['kind'] === GoogleDriveApp::DRIVE_FILE_KIND && $meta['mimeType'] === GoogleDriveApp::FOLDER_MIMETYPE;
222 222
         } catch (Exception $e) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                 'q' => "'$dirname' in parents and trashed = false",
235 235
                 'fields' => '*'
236 236
             ];
237
-            $response = (array)$this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '?' . http_build_query($params), [], 'GET');
237
+            $response = (array) $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '?' . http_build_query($params), [], 'GET');
238 238
             return $response["files"];
239 239
         } catch (Exception $e) {
240 240
             return false;
Please login to merge, or discard this patch.
src/Console/Commands/ResourceCacheClearCommand.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 			$this->importConfig();
100 100
 			$this->initModule($this->getOption('module'));
101 101
 			$this->initType($this->getOption('type'));
102
-		}catch (Exception $e){
102
+		} catch (Exception $e){
103 103
 			$this->error($e->getMessage());
104 104
 			return;
105 105
 		}
Please login to merge, or discard this patch.
Indentation   +210 added lines, -210 removed lines patch added patch discarded remove patch
@@ -30,214 +30,214 @@
 block discarded – undo
30 30
 class ResourceCacheClearCommand extends QtCommand
31 31
 {
32 32
 
33
-	/**
34
-	 * Command name
35
-	 * @var string
36
-	 */
37
-	protected $name = 'cache:clear';
38
-
39
-	/**
40
-	 * Command description
41
-	 * @var string
42
-	 */
43
-	protected $description = 'Clears resource cache';
44
-
45
-	/**
46
-	 * Command help text
47
-	 * @var string
48
-	 */
49
-	protected $help = 'The command will clear the resource cache';
50
-
51
-	/**
52
-	 * Command options
53
-	 * @var array
54
-	 */
55
-	protected $options = [
56
-		['all', 'all', 'none', ''],
57
-		['type', 't', 'required', ''],
58
-		['module', 'm', 'required', '']
59
-	];
60
-
61
-	/**
62
-	 * @var array
63
-	 */
64
-	protected $types = ['views', 'asserts'];
65
-
66
-	/**
67
-	 * @var array
68
-	 */
69
-	protected $modules;
70
-
71
-	/**
72
-	 * @var string|null
73
-	 */
74
-	protected $type = null;
75
-
76
-	/**
77
-	 * @var string|null
78
-	 */
79
-	protected $module = null;
80
-
81
-	/**
82
-	 * @var string
83
-	 */
84
-	protected $cacheDir;
85
-
86
-	/**
87
-	 * @var object
88
-	 */
89
-	protected $fs;
90
-
91
-	/**
92
-	 * @return void
93
-	 * @throws DiException
94
-	 * @throws ReflectionException
95
-	 */
96
-	public function exec()
97
-	{
98
-		try {
99
-			$this->importConfig();
100
-			$this->initModule($this->getOption('module'));
101
-			$this->initType($this->getOption('type'));
102
-		}catch (Exception $e){
103
-			$this->error($e->getMessage());
104
-			return;
105
-		}
106
-
107
-		$this->fs = Di::get(FileSystem::class);
108
-
109
-		if (!$this->fs->isDirectory($this->cacheDir)) {
110
-			$this->error('Cache directory does not exist or is not accessible.');
111
-			return;
112
-		}
113
-
114
-		if ($this->module || $this->type) {
115
-			$this->clearResourceModuleAndType($this->module, $this->type);
116
-		} elseif (!empty($this->getOption('all'))) {
117
-			$this->removeFilesFromDirectory($this->cacheDir);
118
-		} else {
119
-			$this->error('Please specify at least one of the following options: --all, --module=moduleName or --type=typeName!');
120
-			return;
121
-		}
122
-
123
-		$this->info('Resource cache cleared successfully.');
124
-	}
125
-
126
-	/**
127
-	 * @return void
128
-	 */
129
-	private function importModules()
130
-	{
131
-		try {
132
-			if (!config()->has('modules')) {
133
-				config()->import(new Setup('config', 'modules'));
134
-			}
135
-
136
-			if (config()->has('modules') && is_array(config()->get('modules.modules'))){
137
-				$this->modules = array_keys(array_change_key_case(config()->get('modules.modules')));
138
-			}
139
-		} catch (ConfigException|DiException|ReflectionException $e) {
140
-			$this->error($e->getMessage());
141
-			return;
142
-		}
143
-	}
144
-
145
-	/**
146
-	 * @return void
147
-	 * @throws ConfigException
148
-	 * @throws DiException
149
-	 * @throws ReflectionException
150
-	 */
151
-	private function importConfig(): void
152
-	{
153
-		if (!config()->has('view_cache')) {
154
-			config()->import(new Setup('config', 'view_cache'));
155
-		}
156
-
157
-		$this->cacheDir = base_dir() . DS . config()->get('view_cache.cache_dir', 'cache');
158
-	}
159
-
160
-	/**
161
-	 * @param string|null $moduleOption
162
-	 * @return void
163
-	 * @throws Exception
164
-	 */
165
-	private function initModule(?string $moduleOption): void
166
-	{
167
-		if (!empty($moduleOption)) {
168
-			$this->importModules();
169
-			$module = strtolower($moduleOption);
170
-
171
-			if (in_array($module, $this->modules)) {
172
-				$this->module = $module;
173
-			} else {
174
-				throw new Exception('Module {'. $module .'} does not exist.');
175
-			}
176
-		}
177
-	}
178
-
179
-	/**
180
-	 * @param string|null $typeOption
181
-	 * @return void
182
-	 * @throws Exception
183
-	 */
184
-	private function initType(?string $typeOption): void
185
-	{
186
-		if (!empty($typeOption)) {
187
-			$type = strtolower($typeOption);
188
-
189
-			if (in_array($type, $this->types)) {
190
-				$this->type = $type;
191
-			} else {
192
-				throw new Exception('Cache type {'. $type .'} is invalid.');
193
-			}
194
-		}
195
-	}
196
-
197
-	/**
198
-	 * @param string|null $moduleName
199
-	 * @param string|null $type
200
-	 * @return void
201
-	 */
202
-	private function clearResourceModuleAndType(?string $moduleName = null, ?string $type = null): void
203
-	{
204
-		$dir = $this->cacheDir;
205
-
206
-		if ($type) {
207
-			$dir = $dir . DS . strtolower($type);
208
-		}
209
-
210
-		if ($moduleName) {
211
-			if (!$type) {
212
-				$dir = $dir . DS . '*';
213
-			}
214
-
215
-			$dir = $dir . DS . strtolower($moduleName);
216
-		}
217
-
218
-		$this->removeFilesFromDirectory($dir);
219
-	}
220
-
221
-	/**
222
-	 * @param string $dir
223
-	 * @return void
224
-	 */
225
-	private function removeFilesFromDirectory(string $dir): void
226
-	{
227
-		$entries = $this->fs->glob($dir . DS . '*');
228
-
229
-		foreach ($entries as $entry) {
230
-			if ($this->fs->isDirectory($entry)) {
231
-				$this->removeFilesFromDirectory($entry);
232
-
233
-				if ($this->fs->fileName($entry) !== config()->get('view_cache.cache_dir', 'cache') &&
234
-					count($this->fs->glob($entry . DS . '*')) === 0
235
-				) {
236
-					$this->fs->removeDirectory($entry);
237
-				}
238
-			} else {
239
-				$this->fs->remove($entry);
240
-			}
241
-		}
242
-	}
33
+    /**
34
+     * Command name
35
+     * @var string
36
+     */
37
+    protected $name = 'cache:clear';
38
+
39
+    /**
40
+     * Command description
41
+     * @var string
42
+     */
43
+    protected $description = 'Clears resource cache';
44
+
45
+    /**
46
+     * Command help text
47
+     * @var string
48
+     */
49
+    protected $help = 'The command will clear the resource cache';
50
+
51
+    /**
52
+     * Command options
53
+     * @var array
54
+     */
55
+    protected $options = [
56
+        ['all', 'all', 'none', ''],
57
+        ['type', 't', 'required', ''],
58
+        ['module', 'm', 'required', '']
59
+    ];
60
+
61
+    /**
62
+     * @var array
63
+     */
64
+    protected $types = ['views', 'asserts'];
65
+
66
+    /**
67
+     * @var array
68
+     */
69
+    protected $modules;
70
+
71
+    /**
72
+     * @var string|null
73
+     */
74
+    protected $type = null;
75
+
76
+    /**
77
+     * @var string|null
78
+     */
79
+    protected $module = null;
80
+
81
+    /**
82
+     * @var string
83
+     */
84
+    protected $cacheDir;
85
+
86
+    /**
87
+     * @var object
88
+     */
89
+    protected $fs;
90
+
91
+    /**
92
+     * @return void
93
+     * @throws DiException
94
+     * @throws ReflectionException
95
+     */
96
+    public function exec()
97
+    {
98
+        try {
99
+            $this->importConfig();
100
+            $this->initModule($this->getOption('module'));
101
+            $this->initType($this->getOption('type'));
102
+        }catch (Exception $e){
103
+            $this->error($e->getMessage());
104
+            return;
105
+        }
106
+
107
+        $this->fs = Di::get(FileSystem::class);
108
+
109
+        if (!$this->fs->isDirectory($this->cacheDir)) {
110
+            $this->error('Cache directory does not exist or is not accessible.');
111
+            return;
112
+        }
113
+
114
+        if ($this->module || $this->type) {
115
+            $this->clearResourceModuleAndType($this->module, $this->type);
116
+        } elseif (!empty($this->getOption('all'))) {
117
+            $this->removeFilesFromDirectory($this->cacheDir);
118
+        } else {
119
+            $this->error('Please specify at least one of the following options: --all, --module=moduleName or --type=typeName!');
120
+            return;
121
+        }
122
+
123
+        $this->info('Resource cache cleared successfully.');
124
+    }
125
+
126
+    /**
127
+     * @return void
128
+     */
129
+    private function importModules()
130
+    {
131
+        try {
132
+            if (!config()->has('modules')) {
133
+                config()->import(new Setup('config', 'modules'));
134
+            }
135
+
136
+            if (config()->has('modules') && is_array(config()->get('modules.modules'))){
137
+                $this->modules = array_keys(array_change_key_case(config()->get('modules.modules')));
138
+            }
139
+        } catch (ConfigException|DiException|ReflectionException $e) {
140
+            $this->error($e->getMessage());
141
+            return;
142
+        }
143
+    }
144
+
145
+    /**
146
+     * @return void
147
+     * @throws ConfigException
148
+     * @throws DiException
149
+     * @throws ReflectionException
150
+     */
151
+    private function importConfig(): void
152
+    {
153
+        if (!config()->has('view_cache')) {
154
+            config()->import(new Setup('config', 'view_cache'));
155
+        }
156
+
157
+        $this->cacheDir = base_dir() . DS . config()->get('view_cache.cache_dir', 'cache');
158
+    }
159
+
160
+    /**
161
+     * @param string|null $moduleOption
162
+     * @return void
163
+     * @throws Exception
164
+     */
165
+    private function initModule(?string $moduleOption): void
166
+    {
167
+        if (!empty($moduleOption)) {
168
+            $this->importModules();
169
+            $module = strtolower($moduleOption);
170
+
171
+            if (in_array($module, $this->modules)) {
172
+                $this->module = $module;
173
+            } else {
174
+                throw new Exception('Module {'. $module .'} does not exist.');
175
+            }
176
+        }
177
+    }
178
+
179
+    /**
180
+     * @param string|null $typeOption
181
+     * @return void
182
+     * @throws Exception
183
+     */
184
+    private function initType(?string $typeOption): void
185
+    {
186
+        if (!empty($typeOption)) {
187
+            $type = strtolower($typeOption);
188
+
189
+            if (in_array($type, $this->types)) {
190
+                $this->type = $type;
191
+            } else {
192
+                throw new Exception('Cache type {'. $type .'} is invalid.');
193
+            }
194
+        }
195
+    }
196
+
197
+    /**
198
+     * @param string|null $moduleName
199
+     * @param string|null $type
200
+     * @return void
201
+     */
202
+    private function clearResourceModuleAndType(?string $moduleName = null, ?string $type = null): void
203
+    {
204
+        $dir = $this->cacheDir;
205
+
206
+        if ($type) {
207
+            $dir = $dir . DS . strtolower($type);
208
+        }
209
+
210
+        if ($moduleName) {
211
+            if (!$type) {
212
+                $dir = $dir . DS . '*';
213
+            }
214
+
215
+            $dir = $dir . DS . strtolower($moduleName);
216
+        }
217
+
218
+        $this->removeFilesFromDirectory($dir);
219
+    }
220
+
221
+    /**
222
+     * @param string $dir
223
+     * @return void
224
+     */
225
+    private function removeFilesFromDirectory(string $dir): void
226
+    {
227
+        $entries = $this->fs->glob($dir . DS . '*');
228
+
229
+        foreach ($entries as $entry) {
230
+            if ($this->fs->isDirectory($entry)) {
231
+                $this->removeFilesFromDirectory($entry);
232
+
233
+                if ($this->fs->fileName($entry) !== config()->get('view_cache.cache_dir', 'cache') &&
234
+                    count($this->fs->glob($entry . DS . '*')) === 0
235
+                ) {
236
+                    $this->fs->removeDirectory($entry);
237
+                }
238
+            } else {
239
+                $this->fs->remove($entry);
240
+            }
241
+        }
242
+    }
243 243
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 			$this->importConfig();
100 100
 			$this->initModule($this->getOption('module'));
101 101
 			$this->initType($this->getOption('type'));
102
-		}catch (Exception $e){
102
+		} catch (Exception $e) {
103 103
 			$this->error($e->getMessage());
104 104
 			return;
105 105
 		}
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
 				config()->import(new Setup('config', 'modules'));
134 134
 			}
135 135
 
136
-			if (config()->has('modules') && is_array(config()->get('modules.modules'))){
136
+			if (config()->has('modules') && is_array(config()->get('modules.modules'))) {
137 137
 				$this->modules = array_keys(array_change_key_case(config()->get('modules.modules')));
138 138
 			}
139
-		} catch (ConfigException|DiException|ReflectionException $e) {
139
+		} catch (ConfigException | DiException | ReflectionException $e) {
140 140
 			$this->error($e->getMessage());
141 141
 			return;
142 142
 		}
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 			if (in_array($module, $this->modules)) {
172 172
 				$this->module = $module;
173 173
 			} else {
174
-				throw new Exception('Module {'. $module .'} does not exist.');
174
+				throw new Exception('Module {' . $module . '} does not exist.');
175 175
 			}
176 176
 		}
177 177
 	}
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 			if (in_array($type, $this->types)) {
190 190
 				$this->type = $type;
191 191
 			} else {
192
-				throw new Exception('Cache type {'. $type .'} is invalid.');
192
+				throw new Exception('Cache type {' . $type . '} is invalid.');
193 193
 			}
194 194
 		}
195 195
 	}
Please login to merge, or discard this patch.
src/Helpers/mvc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
  */
131 131
 function route_cache_settings(): ?array
132 132
 {
133
-	return RouteController::getCurrentRoute()['cache_settings'] ?? null;
133
+    return RouteController::getCurrentRoute()['cache_settings'] ?? null;
134 134
 }
135 135
 
136 136
 /**
Please login to merge, or discard this patch.
src/Libraries/Mailer/Adapters/SmtpAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         if (config()->get('debug')) {
88 88
             $this->mailer->SMTPDebug = SMTP::DEBUG_SERVER;
89 89
 
90
-            $this->mailer->Debugoutput = function ($message) {
90
+            $this->mailer->Debugoutput = function($message) {
91 91
                 if (Debugger::getInstance()->isEnabled()) {
92 92
                     Debugger::getInstance()->addToStoreCell(Debugger::MAILS, LogLevel::WARNING, $message);
93 93
                 }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function setAttachment(string $attachment): SmtpAdapter
195 195
     {
196
-        $this->attachments[] = $attachment;;
196
+        $this->attachments[] = $attachment; ;
197 197
         return $this;
198 198
     }
199 199
 
Please login to merge, or discard this patch.