Test Failed
Push — master ( ca159c...8f4401 )
by Sebastian
03:00
created
src/FileHelper/FolderInfo.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $pathString = AbstractPathInfo::type2string($path);
32 32
 
33
-        if(!isset(self::$infoCache[$pathString]))
33
+        if (!isset(self::$infoCache[$pathString]))
34 34
         {
35 35
             self::$infoCache[$pathString] = new FolderInfo($pathString);
36 36
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         parent::__construct($path);
61 61
 
62
-        if(!self::is_dir($this->path))
62
+        if (!self::is_dir($this->path))
63 63
         {
64 64
             throw new FileHelper_Exception(
65 65
                 'Not a folder',
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $path = trim($path);
83 83
 
84
-        if($path === '' || $path === '.' || $path === '..')
84
+        if ($path === '' || $path === '.' || $path === '..')
85 85
         {
86 86
             return false;
87 87
         }
88 88
 
89
-        if(is_dir($path))
89
+        if (is_dir($path))
90 90
         {
91 91
             return true;
92 92
         }
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public function delete() : FolderInfo
106 106
     {
107
-        if(!$this->exists())
107
+        if (!$this->exists())
108 108
         {
109 109
             return $this;
110 110
         }
111 111
 
112
-        if(rmdir($this->path))
112
+        if (rmdir($this->path))
113 113
         {
114 114
             return $this;
115 115
         }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function create() : FolderInfo
137 137
     {
138
-        if(is_dir($this->path) || mkdir($this->path, 0777, true) || is_dir($this->path))
138
+        if (is_dir($this->path) || mkdir($this->path, 0777, true) || is_dir($this->path))
139 139
         {
140 140
             return $this;
141 141
         }
@@ -185,12 +185,12 @@  discard block
 block discarded – undo
185 185
         return FileHelper::createFolder($this->getPath().'/'.$name);
186 186
     }
187 187
 
188
-    public function saveFile(string $fileName, string $content='') : FileInfo
188
+    public function saveFile(string $fileName, string $content = '') : FileInfo
189 189
     {
190 190
         return FileHelper::saveFile($this.'/'.$fileName, $content);
191 191
     }
192 192
 
193
-    public function saveJSONFile(array $data, string $fileName, bool $pretty=false) : JSONFile
193
+    public function saveJSONFile(array $data, string $fileName, bool $pretty = false) : JSONFile
194 194
     {
195 195
         return FileHelper::saveAsJSON($data, $this.'/'.$fileName, $pretty);
196 196
     }
Please login to merge, or discard this patch.