Passed
Branch master (eb004c)
by Adrian Florin
02:26
created
example/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once dirname(__FILE__) . '/../vendor/autoload.php';
2
+require_once dirname(__FILE__).'/../vendor/autoload.php';
3 3
 
4 4
 use NeedleProject\FileIo\File;
5 5
 use NeedleProject\FileIo\Content\Content;
6 6
 
7
-$filename = __DIR__ . DIRECTORY_SEPARATOR . 'my_first_file';
7
+$filename = __DIR__.DIRECTORY_SEPARATOR.'my_first_file';
8 8
 
9 9
 /**
10 10
  * Writing content to a file
11 11
  */
12 12
 $content = new Content('Hello world!');
13
-$file = new File(__DIR__ . DIRECTORY_SEPARATOR . 'my_first_file');
13
+$file = new File(__DIR__.DIRECTORY_SEPARATOR.'my_first_file');
14 14
 if (true === $file->write($content)) {
15 15
     echo "I wrote my first file!\n";
16 16
 }
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
  * Verifying file
20 20
  */
21 21
 if (true === $file->exists()) {
22
-    echo sprintf('File %s exists on disk!', $filename) . "\n";
22
+    echo sprintf('File %s exists on disk!', $filename)."\n";
23 23
 }
24 24
 
25 25
 if (true === $file->isWritable()) {
26
-    echo sprintf('File %s can be written!', $filename) . "\n";
26
+    echo sprintf('File %s can be written!', $filename)."\n";
27 27
 }
28 28
 
29 29
 if (true === $file->isReadable()) {
30
-    echo sprintf('File %s can be read!', $filename) . "\n";
30
+    echo sprintf('File %s can be read!', $filename)."\n";
31 31
 }
32 32
 
33 33
 /**
@@ -41,5 +41,5 @@  discard block
 block discarded – undo
41 41
  * Delete the file
42 42
  */
43 43
 if (true === $file->delete()) {
44
-    echo "The file was successfully deleted!" . "\n";
44
+    echo "The file was successfully deleted!"."\n";
45 45
 }
Please login to merge, or discard this patch.
src/Helper/PathHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function normalizePathSeparator(string $path): string
34 34
     {
35 35
         $path = preg_replace('#(\\\|\/)#', DIRECTORY_SEPARATOR, $path);
36
-        return preg_replace('#' . DIRECTORY_SEPARATOR . '{2,}#', DIRECTORY_SEPARATOR, $path);
36
+        return preg_replace('#'.DIRECTORY_SEPARATOR.'{2,}#', DIRECTORY_SEPARATOR, $path);
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
src/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             );
82 82
         }
83 83
         list($this->name, $this->extension) = $pathHelper->splitFilename($filename);
84
-        $this->hasExtension = (bool)$this->extension;
84
+        $this->hasExtension = (bool) $this->extension;
85 85
         $this->errorHandler = new ErrorToExceptionConverter();
86 86
     }
87 87
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         if (false === $this->hasExtension()) {
213 213
             return $this->name;
214 214
         }
215
-        return $this->name . static::EXTENSION_SEPARATOR . $this->extension;
215
+        return $this->name.static::EXTENSION_SEPARATOR.$this->extension;
216 216
     }
217 217
 
218 218
     /**
Please login to merge, or discard this patch.