Passed
Push — master ( 9ef119...6b563b )
by Prateek
01:58
created
src/Generators/BaseGenerator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
     }
52 52
 
53 53
     public function initializeFile($fullFilePath, $stub, $initializeWithText = false) {
54
-        if(file_exists($fullFilePath)){
54
+        if (file_exists($fullFilePath)) {
55 55
             $this->fileSystem->remove($fullFilePath);
56 56
         }
57
-        $seederTemplate = ($initializeWithText===false) ? $this->buildTemplate($stub) : $initializeWithText;
57
+        $seederTemplate = ($initializeWithText === false) ? $this->buildTemplate($stub) : $initializeWithText;
58 58
         $this->fileSystem->dumpFile($fullFilePath, $seederTemplate);
59 59
         return $fullFilePath;
60 60
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
     public function insertIntoFile($file_path, $insert_marker, $text, $after = true) {
79
-        $contents = str_replace("\r",'', file_get_contents($file_path));
79
+        $contents = str_replace("\r", '', file_get_contents($file_path));
80 80
         $new_contents = ($after) ? str_replace($insert_marker, $insert_marker.$text, $contents) : str_replace($insert_marker, $text.$insert_marker, $contents); 
81 81
         $this->fileSystem->dumpFile($file_path, $new_contents);
82 82
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@
 block discarded – undo
39 39
     {
40 40
         $dir = base_path($path);
41 41
 
42
-        if (!is_dir($dir))
43
-            $this->fileSystem->mkdir($dir, 0755);
42
+        if (!is_dir($dir)) {
43
+                    $this->fileSystem->mkdir($dir, 0755);
44
+        }
44 45
 
45 46
         return $dir;
46 47
     }
Please login to merge, or discard this patch.
src/Models/FileSystem.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
 
6 6
 class FileSystem extends SymphonyFilesystem
7 7
 {
8
-	public function clone($src, $dest){
9
-		$src = $this->getFullSourcePath($src);
8
+    public function clone($src, $dest){
9
+        $src = $this->getFullSourcePath($src);
10 10
 
11
-		$dest = base_path($dest);
11
+        $dest = base_path($dest);
12 12
 
13
-		if (is_dir($src)) {
14
-			$this->mirror($src, $dest."/".basename($src));
15
-		}else{
16
-			$this->copy($src, $dest);
17
-		}
18
-	}
13
+        if (is_dir($src)) {
14
+            $this->mirror($src, $dest."/".basename($src));
15
+        }else{
16
+            $this->copy($src, $dest);
17
+        }
18
+    }
19 19
 
20
-	public function getFullSourcePath($path){
21
-		return realpath(__DIR__ . "/../resources/" . $path);
22
-	}
20
+    public function getFullSourcePath($path){
21
+        return realpath(__DIR__ . "/../resources/" . $path);
22
+    }
23 23
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@
 block discarded – undo
12 12
 
13 13
 		if (is_dir($src)) {
14 14
 			$this->mirror($src, $dest."/".basename($src));
15
-		}else{
15
+		} else {
16 16
 			$this->copy($src, $dest);
17 17
 		}
18 18
 	}
19 19
 
20
-	public function getFullSourcePath($path){
21
-		return realpath(__DIR__ . "/../resources/" . $path);
20
+	public function getFullSourcePath($path) {
21
+		return realpath(__DIR__."/../resources/".$path);
22 22
 	}
23 23
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 		if (is_dir($src)) {
14 14
 			$this->mirror($src, $dest."/".basename($src));
15
-		}else{
15
+		} else{
16 16
 			$this->copy($src, $dest);
17 17
 		}
18 18
 	}
Please login to merge, or discard this patch.