Completed
Pull Request — develop (#57)
by Tony
06:31
created
app/Settings/DatabaseRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         }
46 46
         elseif (count($results) == 1) {
47 47
             $entry = $results->first();
48
-            if($entry->config_name != $key) { //FIXME: better test
48
+            if ($entry->config_name != $key) { //FIXME: better test
49 49
                 // trim the prefix
50 50
                 $local_key = substr($entry->config_name, strlen($key) + 1);
51 51
                 return [$local_key => $entry->config_value];
Please login to merge, or discard this patch.
app/Models/DbConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
     public function scopeKey($query, $key)
51 51
     {
52
-        return $query->where('config_name', 'LIKE', $key . '%');
52
+        return $query->where('config_name', 'LIKE', $key.'%');
53 53
     }
54 54
 
55 55
     public function scopeExactKey($query, $key)
Please login to merge, or discard this patch.
app/Settings/Settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     private static function recursive_keys(array $array, $prefix = "", array $path = array())
64 64
     {
65 65
         if ($prefix != "") {
66
-            $prefix = trim($prefix, '.') . '.';
66
+            $prefix = trim($prefix, '.').'.';
67 67
         }
68 68
         $result = array();
69 69
         foreach ($array as $key => $val) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 $result = array_merge($result, self::recursive_keys($val, $prefix, $currentPath));
73 73
             }
74 74
             else {
75
-                $result[$prefix . join('.', $currentPath)] = $val;
75
+                $result[$prefix.join('.', $currentPath)] = $val;
76 76
             }
77 77
         }
78 78
         return $result;
@@ -81,18 +81,18 @@  discard block
 block discarded – undo
81 81
     public function get($key, $default = null)
82 82
     {
83 83
         // return value from cache or fetch it and return it
84
-        return Cache::remember($key, $this->cache_time, function () use ($key, $default) {
84
+        return Cache::remember($key, $this->cache_time, function() use ($key, $default) {
85 85
             $value = $this->database->get($key, $default);
86 86
 
87 87
             if (is_array($value)) {
88 88
                 $value = self::pathToArray($value, $key);
89
-                $config = Config::get('config.' . $key, $default);
89
+                $config = Config::get('config.'.$key, $default);
90 90
                 if (!is_null($config)) {
91 91
                     $value = array_replace_recursive($config, $value);
92 92
                 }
93 93
             }
94 94
             elseif (is_null($value)) {
95
-                return Config::get('config.' . $key);
95
+                return Config::get('config.'.$key);
96 96
             }
97 97
 
98 98
             return $value;
Please login to merge, or discard this patch.