Passed
Push — develop ( 2f4ddb...d6a9cc )
by nguereza
01:34
created
src/FileLoader.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 namespace Platine\Config;
50 50
 
51
-class FileLoader implements LoaderInterface
52
-{
51
+class FileLoader implements LoaderInterface {
53 52
 
54 53
     /**
55 54
      * The application base path to use for
@@ -62,8 +61,7 @@  discard block
 block discarded – undo
62 61
      * Create new instance of file loader
63 62
      * @param string $path the base path to use
64 63
      */
65
-    public function __construct(string $path)
66
-    {
64
+    public function __construct(string $path) {
67 65
         $this->path = rtrim($path, '/\\') . DIRECTORY_SEPARATOR;
68 66
     }
69 67
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
      */
129 129
     protected function parse(string $env): array
130 130
     {
131
-        $environments = array_filter((array)preg_split('/(\/|\.)/', $env));
131
+        $environments = array_filter((array) preg_split('/(\/|\.)/', $env));
132 132
         array_unshift($environments, '');
133 133
 
134 134
         return $environments;
Please login to merge, or discard this patch.
src/LoaderInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
 
48 48
 namespace Platine\Config;
49 49
 
50
-interface LoaderInterface
51
-{
50
+interface LoaderInterface {
52 51
 
53 52
     /**
54 53
      * Load the configuration group for the given environment
Please login to merge, or discard this patch.
src/Config.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
      */
107 107
     public function get(string $key, $default = null)
108 108
     {
109
-        list($group, ) = $this->parseKey($key);
109
+        list($group,) = $this->parseKey($key);
110 110
         $this->load($group);
111 111
 
112 112
         return Arr::get($this->items, $key, $default);
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @template T
57 57
  * @implements ArrayAccess<string, mixed>
58 58
  */
59
-class Config implements ArrayAccess
60
-{
59
+class Config implements ArrayAccess {
61 60
 
62 61
     /**
63 62
      * The configuration loader to use
@@ -82,8 +81,7 @@  discard block
 block discarded – undo
82 81
      * @param LoaderInterface $loader the loader to use
83 82
      * @param string          $env    the name of the environment
84 83
      */
85
-    public function __construct(LoaderInterface $loader, string $env = '')
86
-    {
84
+    public function __construct(LoaderInterface $loader, string $env = '') {
87 85
         $this->loader = $loader;
88 86
         $this->env = $env;
89 87
     }
@@ -104,8 +102,7 @@  discard block
 block discarded – undo
104 102
      * @param  mixed $default the default value if can not find the config item
105 103
      * @return mixed
106 104
      */
107
-    public function get(string $key, $default = null)
108
-    {
105
+    public function get(string $key, $default = null) {
109 106
         list($group, ) = $this->parseKey($key);
110 107
         $this->load($group);
111 108
 
@@ -190,16 +187,14 @@  discard block
 block discarded – undo
190 187
     /**
191 188
      * {@inheritdoc}
192 189
      */
193
-    public function offsetExists($key)
194
-    {
190
+    public function offsetExists($key) {
195 191
         return $this->has($key);
196 192
     }
197 193
 
198 194
     /**
199 195
      * {@inheritdoc}
200 196
      */
201
-    public function offsetGet($key)
202
-    {
197
+    public function offsetGet($key) {
203 198
         return $this->get($key);
204 199
     }
205 200
 
@@ -209,16 +204,14 @@  discard block
 block discarded – undo
209 204
      * @param mixed $value
210 205
      * @return void
211 206
      */
212
-    public function offsetSet($key, $value)
213
-    {
207
+    public function offsetSet($key, $value) {
214 208
         $this->set($key, $value);
215 209
     }
216 210
 
217 211
     /**
218 212
      * {@inheritdoc}
219 213
      */
220
-    public function offsetUnset($key)
221
-    {
214
+    public function offsetUnset($key) {
222 215
         $this->set($key, null);
223 216
     }
224 217
 
Please login to merge, or discard this patch.