Passed
Push — master ( bc891b...4af831 )
by Georgi
03:08
created
src/Database/Models/Module.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 	private static $cache;
16 16
 	
17 17
 	private static function cache() {
18
-		if(isset(self::$cache) || ! Schema::hasTable('modules')) return [];
18
+		if (isset(self::$cache) || !Schema::hasTable('modules')) return [];
19 19
 		
20 20
 		self::$cache = self::pluck('class', 'alias');
21 21
 	}
22 22
 	
23 23
 	public static function isInstalled($classOrAlias) {
24
-		return self::getClass($classOrAlias)? 1: 0;
24
+		return self::getClass($classOrAlias) ? 1 : 0;
25 25
 	}
26 26
 	
27 27
 	public static function getClass($classOrAlias) {
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		$ret = [];
50 50
 		foreach (self::getInstalled() as $module) {
51
-			if (! $list = $module::$method()) continue;
51
+			if (!$list = $module::$method()) continue;
52 52
 			
53
-			$ret = array_merge($ret, is_array($list)? $list: [$list]);
53
+			$ret = array_merge($ret, is_array($list) ? $list : [$list]);
54 54
 		}
55 55
 		
56 56
 		return $ret;
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@  discard block
 block discarded – undo
15 15
 	private static $cache;
16 16
 	
17 17
 	private static function cache() {
18
-		if(isset(self::$cache) || ! Schema::hasTable('modules')) return [];
18
+		if(isset(self::$cache) || ! Schema::hasTable('modules')) {
19
+			return [];
20
+		}
19 21
 		
20 22
 		self::$cache = self::pluck('class', 'alias');
21 23
 	}
@@ -27,7 +29,9 @@  discard block
 block discarded – undo
27 29
 	public static function getClass($classOrAlias) {
28 30
 		self::cache();
29 31
 		
30
-		if (self::$cache->contains($classOrAlias)) return $classOrAlias;
32
+		if (self::$cache->contains($classOrAlias)) {
33
+			return $classOrAlias;
34
+		}
31 35
 		
32 36
 		return self::$cache[$classOrAlias]?? null;
33 37
 	}
@@ -48,7 +52,9 @@  discard block
 block discarded – undo
48 52
 	{
49 53
 		$ret = [];
50 54
 		foreach (self::getInstalled() as $module) {
51
-			if (! $list = $module::$method()) continue;
55
+			if (! $list = $module::$method()) {
56
+				continue;
57
+			}
52 58
 			
53 59
 			$ret = array_merge($ret, is_array($list)? $list: [$list]);
54 60
 		}
Please login to merge, or discard this patch.