@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * |
37 | 37 | * @param array $contentRows |
38 | - * @param unknown $delimiter |
|
38 | + * @param string $delimiter |
|
39 | 39 | * @param unknown $keys |
40 | 40 | * @param string $generateHeader |
41 | 41 | * @return string |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @param array $row |
98 | 98 | * @param unknown $delimiter |
99 | - * @param unknown $enclose |
|
99 | + * @param string $enclose |
|
100 | 100 | * @return string |
101 | 101 | */ |
102 | 102 | protected static function generateRow(array $row, $delimiter, $enclose) |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | |
84 | 84 | $output = null; |
85 | 85 | if ($generateHeader) { |
86 | - $output.= self::generateRow($header, $delimiter, '"'); |
|
86 | + $output .= self::generateRow($header, $delimiter, '"'); |
|
87 | 87 | } |
88 | 88 | foreach ($rows as $row) { |
89 | - $output.= self::generateRow($row, $delimiter, '"'); |
|
89 | + $output .= self::generateRow($row, $delimiter, '"'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | return $output; |
@@ -101,10 +101,10 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected static function generateRow(array $row, $delimiter, $enclose) |
103 | 103 | { |
104 | - array_walk($row, function (&$item) use ($enclose) { |
|
104 | + array_walk($row, function(&$item) use ($enclose) { |
|
105 | 105 | $item = $enclose.Html::encode($item).$enclose; |
106 | 106 | }); |
107 | 107 | |
108 | - return implode($delimiter, $row) . PHP_EOL; |
|
108 | + return implode($delimiter, $row).PHP_EOL; |
|
109 | 109 | } |
110 | 110 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $info = pathinfo($file); |
52 | 52 | if (!isset($info['extension']) || empty($info['extension'])) { |
53 | - $file = rtrim($file, '.') . '.' . $extension; |
|
53 | + $file = rtrim($file, '.').'.'.$extension; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | return $file; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'extension' => (isset($path['extension']) && !empty($path['extension'])) ? $path['extension'] : false, |
71 | 71 | 'name' => (isset($path['filename']) && !empty($path['filename'])) ? $path['filename'] : false, |
72 | 72 | 'source' => $sourceFile, |
73 | - 'sourceFilename' => (isset($path['dirname']) && isset($path['filename'])) ? $path['dirname'] . DIRECTORY_SEPARATOR . $path['filename'] : false, |
|
73 | + 'sourceFilename' => (isset($path['dirname']) && isset($path['filename'])) ? $path['dirname'].DIRECTORY_SEPARATOR.$path['filename'] : false, |
|
74 | 74 | ]; |
75 | 75 | } |
76 | 76 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | if (!isset($this->migrationPath[$module])) { |
46 | - throw new Exception("The module \"$module\" does not exist in the application modules configuration."); |
|
46 | + throw new Exception("The module \"$module\" does not exist in the application modules configuration."); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | // apply custom migration code to generate new migrations for a module specific path |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | |
59 | 59 | $file = $migrationPath . DIRECTORY_SEPARATOR . $className . '.php'; |
60 | 60 | if ($this->confirm("Create new migration '$file'?")) { |
61 | - $content = $this->generateMigrationSourceCode([ |
|
62 | - 'name' => $name, |
|
63 | - 'className' => $className, |
|
64 | - 'namespace' => null, |
|
65 | - ]); |
|
66 | - FileHelper::createDirectory($migrationPath); |
|
67 | - file_put_contents($file, $content); |
|
68 | - $this->stdout("New migration created successfully.\n", Console::FG_GREEN); |
|
61 | + $content = $this->generateMigrationSourceCode([ |
|
62 | + 'name' => $name, |
|
63 | + 'className' => $className, |
|
64 | + 'namespace' => null, |
|
65 | + ]); |
|
66 | + FileHelper::createDirectory($migrationPath); |
|
67 | + file_put_contents($file, $content); |
|
68 | + $this->stdout("New migration created successfully.\n", Console::FG_GREEN); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | $migrationPath = $this->migrationPath[$module]; |
58 | 58 | |
59 | - $file = $migrationPath . DIRECTORY_SEPARATOR . $className . '.php'; |
|
59 | + $file = $migrationPath.DIRECTORY_SEPARATOR.$className.'.php'; |
|
60 | 60 | if ($this->confirm("Create new migration '$file'?")) { |
61 | 61 | $content = $this->generateMigrationSourceCode([ |
62 | 62 | 'name' => $name, |