Completed
Push — master ( cb3862...0286b8 )
by Michael
02:24
created
src/Decoders/CustomXmlDecoder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * For instance, if you want to decode Yaml files with the extensions ".yml" and ".yaml",
34 34
      * then you want to set the return array to ['yaml', 'yml'].
35 35
      *
36
-     * @return array
36
+     * @return string[]
37 37
      */
38 38
     public function getMimeType()
39 39
     {
Please login to merge, or discard this patch.
src/FileLoader.php 3 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Michaels\Manager;
3 3
 
4
-use Michaels\Manager\Contracts\DecoderInterface;
4
+use Exception;
5 5
 use Michaels\Manager\Bags\FileBag;
6
-use Michaels\Manager\Exceptions\UnsupportedFilesException;
6
+use Michaels\Manager\Contracts\DecoderInterface;
7 7
 use Michaels\Manager\Exceptions\BadFileDataException;
8
-use Exception;
8
+use Michaels\Manager\Exceptions\UnsupportedFilesException;
9 9
 
10 10
 /**
11 11
  * Loads configuration files and converts them to php arrays using Decoders
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         if (!empty($this->unsupportedFiles)) {
129 129
             $badFiles = implode(", ", $this->unsupportedFiles);
130 130
             throw new UnsupportedFilesException(
131
-                'The file(s) ' . $badFiles . ' are not supported by the available decoders.'
131
+                'The file(s) '.$badFiles.' are not supported by the available decoders.'
132 132
             );
133 133
         }
134 134
 
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
      */
177 177
     protected function checkAndAddDefaultDecoder($mimeType)
178 178
     {
179
-        $decoderClass = ucfirst($mimeType) . "Decoder";
179
+        $decoderClass = ucfirst($mimeType)."Decoder";
180 180
 
181
-        if (file_exists(__DIR__ . '/Decoders/' . $decoderClass . '.php') && !$this->isSupportedMimeType($mimeType)) {
181
+        if (file_exists(__DIR__.'/Decoders/'.$decoderClass.'.php') && !$this->isSupportedMimeType($mimeType)) {
182 182
             $nameSpace = "Michaels\\Manager\\Decoders\\";
183
-            $fullQualifiedClassName = $nameSpace . $decoderClass;
183
+            $fullQualifiedClassName = $nameSpace.$decoderClass;
184 184
             $decoder = new $fullQualifiedClassName();
185 185
             $this->addDecoder($decoder);
186 186
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
         } else {
265 265
             // We are namespacing using the file's name
266
-            $filename = rtrim($file->getBasename(), '.' . $file->getExtension());
266
+            $filename = rtrim($file->getBasename(), '.'.$file->getExtension());
267 267
             $namespace = $this->sanitizeNamespace($filename);
268 268
             return [$namespace, $file];
269 269
         }
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * Process file bag to load into the data manager.
103 103
      * A file bag is an array of SplFileInfo objects.
104 104
      *
105
-     * @param array|FileBag $fileBag
105
+     * @param FileBag $fileBag
106 106
      * @param bool $ns
107 107
      * @param bool $strict
108 108
      * @return array
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      * Default decoder class factory method.
180 180
      * Checks to make sure we have a default decoder available and if so, adds it as a decoder to the file loader.
181 181
      *
182
-     * @param $mimeType
182
+     * @param string $mimeType
183 183
      */
184 184
     protected function checkAndAddDefaultDecoder($mimeType)
185 185
     {
Please login to merge, or discard this patch.
src/Traits/ManagesItemsTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,7 +435,7 @@
 block discarded – undo
435 435
 
436 436
     /**
437 437
      * Cycle through the nests to see if an item is protected
438
-     * @param $item
438
+     * @param string $item
439 439
      */
440 440
     protected function checkIfProtected($item)
441 441
     {
Please login to merge, or discard this patch.
src/Helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             return iterator_to_array($items);
26 26
         }
27 27
 
28
-        return (array)$items;
28
+        return (array) $items;
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
src/Traits/ManagesIocTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     /**
104 104
      * Turns a dependency into a singleton.
105 105
      * @param $alias
106
-     * @return mixed
106
+     * @return ManagesIocTrait
107 107
      */
108 108
     public function share($alias)
109 109
     {
Please login to merge, or discard this patch.
src/Traits/ChainsNestedItemsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $prefix = $this->buildPrefix();
42 42
 
43
-        return $this->get($prefix . $name);
43
+        return $this->get($prefix.$name);
44 44
     }
45 45
 
46 46
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $prefix = $this->buildPrefix();
71 71
 
72
-        return $this->add($prefix . $key, $value);
72
+        return $this->add($prefix.$key, $value);
73 73
     }
74 74
 
75 75
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             $prefix = $this->currentLevel;
86 86
             $this->currentLevel = false;
87 87
 
88
-            return $prefix . ".";
88
+            return $prefix.".";
89 89
         }
90 90
     }
91 91
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     protected function addToChain($name)
98 98
     {
99 99
         $dot = ($this->currentLevel === false) ? '' : '.';
100
-        $this->currentLevel .= $dot . $name;
100
+        $this->currentLevel .= $dot.$name;
101 101
 
102 102
         return $this;
103 103
     }
Please login to merge, or discard this patch.
src/Traits/CollectionTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             } else {
78 78
                 throw new \BadMethodCallException(
79 79
                     "Call to undefined method. `$method` does not exist in "
80
-                    . get_called_class() . " and it is not part of the Collection API"
80
+                    . get_called_class()." and it is not part of the Collection API"
81 81
                 );
82 82
             }
83 83
         }
Please login to merge, or discard this patch.
sami.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $iterator = Finder::create()
6 6
     ->files()
7 7
     ->name('*.php')
8
-    ->in(__DIR__ . '/src')
8
+    ->in(__DIR__.'/src')
9 9
 ;
10 10
 
11 11
 return new Sami($iterator, array(
Please login to merge, or discard this patch.