Completed
Pull Request — develop (#54)
by Tony
12:34
created
app/Http/Controllers/SettingsController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace App\Api\Controllers;
4 4
 
5 5
 use DB;
6
-use App\Http\Requests;
7 6
 use Illuminate\Http\Request;
8 7
 
9 8
 class ApiController extends Controller
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (C) 2016 Tony Murray <[email protected]>
4
- * This program is free software: you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation, either version 3 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
- */
3
+     * Copyright (C) 2016 Tony Murray <[email protected]>
4
+     * This program is free software: you can redistribute it and/or modify
5
+     * it under the terms of the GNU General Public License as published by
6
+     * the Free Software Foundation, either version 3 of the License, or
7
+     * (at your option) any later version.
8
+     *
9
+     * This program is distributed in the hope that it will be useful,
10
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12
+     * GNU General Public License for more details.
13
+     *
14
+     * You should have received a copy of the GNU General Public License
15
+     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
+     */
17 17
 
18 18
 namespace App\Http\Controllers;
19 19
 
Please login to merge, or discard this patch.
app/Settings/Settings.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@
 block discarded – undo
15 15
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16
  */
17 17
 /**
18
- * Settings.php
19
- *
20
- * @package    LibreNMS
21
- * @author     Tony Murray <[email protected]>
22
- * @copyright  2016 Tony Murray
23
- * @license    @license http://opensource.org/licenses/GPL-3.0 GNU Public License v3 or later
24
- */
18
+     * Settings.php
19
+     *
20
+     * @package    LibreNMS
21
+     * @author     Tony Murray <[email protected]>
22
+     * @copyright  2016 Tony Murray
23
+     * @license    @license http://opensource.org/licenses/GPL-3.0 GNU Public License v3 or later
24
+     */
25 25
 namespace App\Settings;
26 26
 
27 27
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
                 $value = self::pathToArray($value);
57 57
             }
58 58
             if (empty($value)) {
59
-                $value = Config::get('config.' . $key);
59
+                $value = Config::get('config.'.$key);
60 60
             }
61 61
 //FIXME            if (!is_null($value)) {
62 62
 //                Cache::put($key, $value);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,8 +113,7 @@
 block discarded – undo
113 113
             $currentPath = array_merge($path, array($key));
114 114
             if (is_array($val)) {
115 115
                 $result = array_merge($result, self::recursive_keys($val, $currentPath));
116
-            }
117
-            else {
116
+            } else {
118 117
                 $result[join('.', $currentPath)] = $val;
119 118
             }
120 119
         }
Please login to merge, or discard this patch.
app/Settings/DatabaseRepository.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function get($key, $default = null)
49 49
     {
50
-        $results = $this->table()->where('key', 'LIKE', $key . '%')->get(['key', 'value']);
50
+        $results = $this->table()->where('key', 'LIKE', $key.'%')->get(['key', 'value']);
51 51
         if (is_array($results))
52 52
         {
53 53
             return $this->objsToArray($results);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         //handle array value
63 63
         if (is_array($value)) {
64 64
             foreach ($value as $subkey => $subval) {
65
-                $this->set($key . '.' . $subkey, $subval);
65
+                $this->set($key.'.'.$subkey, $subval);
66 66
                 return;
67 67
             }
68 68
         }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@
 block discarded – undo
15 15
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16
  */
17 17
 /**
18
- * DatabaseRepository.php
19
- *
20
- * @package    LibreNMS
21
- * @author     Tony Murray <[email protected]>
22
- * @copyright  2016 Tony Murray
23
- * @license    @license http://opensource.org/licenses/GPL-3.0 GNU Public License v3 or later
24
- */
18
+     * DatabaseRepository.php
19
+     *
20
+     * @package    LibreNMS
21
+     * @author     Tony Murray <[email protected]>
22
+     * @copyright  2016 Tony Murray
23
+     * @license    @license http://opensource.org/licenses/GPL-3.0 GNU Public License v3 or later
24
+     */
25 25
 namespace App\Settings;
26 26
 
27 27
 
Please login to merge, or discard this patch.
app/Facades/Settings.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@
 block discarded – undo
15 15
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16
  */
17 17
 /**
18
- * Settings.php
19
- *
20
- * @package    LibreNMS
21
- * @author     Tony Murray <[email protected]>
22
- * @copyright  2016 Tony Murray
23
- * @license    @license http://opensource.org/licenses/GPL-3.0 GNU Public License v3 or later
24
- */
18
+     * Settings.php
19
+     *
20
+     * @package    LibreNMS
21
+     * @author     Tony Murray <[email protected]>
22
+     * @copyright  2016 Tony Murray
23
+     * @license    @license http://opensource.org/licenses/GPL-3.0 GNU Public License v3 or later
24
+     */
25 25
 namespace App\Settings;
26 26
 
27 27
 
Please login to merge, or discard this patch.