@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return string |
27 | 27 | */ |
28 | - public function absolutePath($pathFragments) |
|
28 | + public function absolutePath ($pathFragments) |
|
29 | 29 | { |
30 | 30 | if ($this->isAbsolutePath($pathFragments)) |
31 | 31 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @return string |
47 | 47 | */ |
48 | - public function appendPath($pathFragments) |
|
48 | + public function appendPath ($pathFragments) |
|
49 | 49 | { |
50 | 50 | return implode(DIRECTORY_SEPARATOR, func_get_args()); |
51 | 51 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * @throws FileNotFoundException When originFile doesn't exist |
61 | 61 | * @throws IOException When copy fails |
62 | 62 | */ |
63 | - public function copy($originFile, $targetFile, $overwriteNewerFiles = false) |
|
63 | + public function copy ($originFile, $targetFile, $overwriteNewerFiles = false) |
|
64 | 64 | { |
65 | 65 | if ($this->isDir($originFile)) |
66 | 66 | { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * |
98 | 98 | * @return SplFileInfo |
99 | 99 | */ |
100 | - public function createSplFileInfo($filePath) |
|
100 | + public function createSplFileInfo ($filePath) |
|
101 | 101 | { |
102 | 102 | return new SplFileInfo( |
103 | 103 | $this->absolutePath($filePath), |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @return string |
115 | 115 | */ |
116 | - public function getRelativePath($path) |
|
116 | + public function getRelativePath ($path) |
|
117 | 117 | { |
118 | 118 | return str_replace(getcwd() . DIRECTORY_SEPARATOR, '', $path); |
119 | 119 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @return string |
127 | 127 | */ |
128 | - public function getBaseName($filePath) |
|
128 | + public function getBaseName ($filePath) |
|
129 | 129 | { |
130 | 130 | return pathinfo($filePath, PATHINFO_FILENAME); |
131 | 131 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * |
138 | 138 | * @return string |
139 | 139 | */ |
140 | - public function getFileName($filePath) |
|
140 | + public function getFileName ($filePath) |
|
141 | 141 | { |
142 | 142 | return pathinfo($filePath, PATHINFO_BASENAME); |
143 | 143 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @return string |
151 | 151 | */ |
152 | - public function getFolderPath($filePath) |
|
152 | + public function getFolderPath ($filePath) |
|
153 | 153 | { |
154 | 154 | return pathinfo($filePath, PATHINFO_DIRNAME); |
155 | 155 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * |
162 | 162 | * @return string The extension of the file |
163 | 163 | */ |
164 | - public function getExtension($filename) |
|
164 | + public function getExtension ($filename) |
|
165 | 165 | { |
166 | 166 | return pathinfo($filename, PATHINFO_EXTENSION); |
167 | 167 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * |
174 | 174 | * @return bool |
175 | 175 | */ |
176 | - public function isDir($folderPath) |
|
176 | + public function isDir ($folderPath) |
|
177 | 177 | { |
178 | 178 | return is_dir($folderPath); |
179 | 179 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * |
186 | 186 | * @return string |
187 | 187 | */ |
188 | - public function removeExtension($filename) |
|
188 | + public function removeExtension ($filename) |
|
189 | 189 | { |
190 | 190 | return $this->appendPath( |
191 | 191 | $this->getFolderPath($filename), |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * |
203 | 203 | * @return SplFileInfo A reference to the newly created file |
204 | 204 | */ |
205 | - public function writeFile($targetDir, $fileName, $content) |
|
205 | + public function writeFile ($targetDir, $fileName, $content) |
|
206 | 206 | { |
207 | 207 | $outputFolder = $this->getFolderPath($this->absolutePath($targetDir, $fileName)); |
208 | 208 | $targetFile = $this->getFileName($fileName); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | private static $fs; |
16 | 16 | |
17 | - public static function getResource($fileName) |
|
17 | + public static function getResource ($fileName) |
|
18 | 18 | { |
19 | 19 | self::initFileSystem(); |
20 | 20 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | ); |
24 | 24 | } |
25 | 25 | |
26 | - private static function initFileSystem() |
|
26 | + private static function initFileSystem () |
|
27 | 27 | { |
28 | 28 | if (is_null(self::$fs)) |
29 | 29 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @param array $includes |
68 | 68 | * @param int|null $flags |
69 | 69 | */ |
70 | - public function __construct(\RecursiveIterator $iterator, array $excludes = array(), array $includes = array(), $flags = null) |
|
70 | + public function __construct (\RecursiveIterator $iterator, array $excludes = array(), array $includes = array(), $flags = null) |
|
71 | 71 | { |
72 | 72 | parent::__construct($iterator); |
73 | 73 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * @return string |
81 | 81 | */ |
82 | - public function __toString() |
|
82 | + public function __toString () |
|
83 | 83 | { |
84 | 84 | return $this->current()->getFilename(); |
85 | 85 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * {@inheritdoc} |
89 | 89 | */ |
90 | - public function accept() |
|
90 | + public function accept () |
|
91 | 91 | { |
92 | 92 | $filePath = $this->current()->getRelativePathname(); |
93 | 93 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @return SplFileInfo |
101 | 101 | */ |
102 | - public function current() |
|
102 | + public function current () |
|
103 | 103 | { |
104 | 104 | /** @var \SplFileInfo $current */ |
105 | 105 | $current = parent::current(); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * {@inheritdoc} |
116 | 116 | */ |
117 | - public function getChildren() |
|
117 | + public function getChildren () |
|
118 | 118 | { |
119 | 119 | return new self( |
120 | 120 | $this->getInnerIterator()->getChildren(), |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return \RecursiveIteratorIterator |
131 | 131 | */ |
132 | - public function getExplorer() |
|
132 | + public function getExplorer () |
|
133 | 133 | { |
134 | 134 | return new \RecursiveIteratorIterator($this); |
135 | 135 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * |
142 | 142 | * @return bool |
143 | 143 | */ |
144 | - public function matchesPattern($filePath) |
|
144 | + public function matchesPattern ($filePath) |
|
145 | 145 | { |
146 | 146 | if (self::strpos_array($filePath, $this->includes)) |
147 | 147 | { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * |
172 | 172 | * @return FileExplorer |
173 | 173 | */ |
174 | - public static function create($folder, $excludes = array(), $includes = array(), $flags = null) |
|
174 | + public static function create ($folder, $excludes = array(), $includes = array(), $flags = null) |
|
175 | 175 | { |
176 | 176 | $folder = self::realpath($folder); |
177 | 177 | $iterator = new \RecursiveDirectoryIterator($folder, \RecursiveDirectoryIterator::SKIP_DOTS); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * |
189 | 189 | * @return bool True if an element from the given array was found in the string |
190 | 190 | */ |
191 | - private static function strpos_array($haystack, $needle, $offset = 0) |
|
191 | + private static function strpos_array ($haystack, $needle, $offset = 0) |
|
192 | 192 | { |
193 | 193 | if (!is_array($needle)) |
194 | 194 | { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * |
219 | 219 | * @return string |
220 | 220 | */ |
221 | - private static function getRelativePath($path) |
|
221 | + private static function getRelativePath ($path) |
|
222 | 222 | { |
223 | 223 | return str_replace(getcwd() . DIRECTORY_SEPARATOR, '', $path); |
224 | 224 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | * |
231 | 231 | * @return string |
232 | 232 | */ |
233 | - private static function realpath($path) |
|
233 | + private static function realpath ($path) |
|
234 | 234 | { |
235 | 235 | if (substr($path, 0, 6) == 'vfs://') |
236 | 236 | { |
@@ -203,7 +203,8 @@ |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | if (strpos($haystack, $query, $offset) !== false) |
206 | - { // stop on first true result |
|
206 | + { |
|
207 | +// stop on first true result |
|
207 | 208 | return true; |
208 | 209 | } |
209 | 210 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | protected $absolutePath; |
22 | 22 | protected $targetDirectories; |
23 | 23 | |
24 | - public function __construct($folderPath) |
|
24 | + public function __construct ($folderPath) |
|
25 | 25 | { |
26 | 26 | $this->fs = new Filesystem(); |
27 | 27 | $this->targetDirectories = array(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | - public function __toString() |
|
53 | + public function __toString () |
|
54 | 54 | { |
55 | 55 | return rtrim($this->absolutePath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @since 0.1.0 |
64 | 64 | */ |
65 | - public function setTargetDirectory($folderName) |
|
65 | + public function setTargetDirectory ($folderName) |
|
66 | 66 | { |
67 | 67 | if (is_null($folderName) || empty($folderName)) |
68 | 68 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @since 0.1.0 |
84 | 84 | */ |
85 | - public function copyFile($absolutePath, $targetPath) |
|
85 | + public function copyFile ($absolutePath, $targetPath) |
|
86 | 86 | { |
87 | 87 | $targetPath = ltrim($targetPath, DIRECTORY_SEPARATOR); |
88 | 88 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @return SplFileInfo |
105 | 105 | */ |
106 | - public function writeFile($relativePath, $content) |
|
106 | + public function writeFile ($relativePath, $content) |
|
107 | 107 | { |
108 | 108 | $outputFolder = $this->fs->getFolderPath($relativePath); |
109 | 109 | $targetFileName = $this->fs->getFileName($outputFolder); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * |
133 | 133 | * @return string |
134 | 134 | */ |
135 | - private function buildPath($pathFragments) |
|
135 | + private function buildPath ($pathFragments) |
|
136 | 136 | { |
137 | 137 | $paths = func_get_args(); |
138 | 138 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * |
145 | 145 | * @return string |
146 | 146 | */ |
147 | - private function getCwd() |
|
147 | + private function getCwd () |
|
148 | 148 | { |
149 | 149 | $location = array_merge(array($this->absolutePath), $this->targetDirectories); |
150 | 150 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | class Application extends \Symfony\Component\Console\Application |
9 | 9 | { |
10 | - public function doRun(InputInterface $input, OutputInterface $output) |
|
10 | + public function doRun (InputInterface $input, OutputInterface $output) |
|
11 | 11 | { |
12 | 12 | if (extension_loaded('xdebug') && !getenv('COMPOSER_DISABLE_XDEBUG_WARN')) |
13 | 13 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @param OutputInterface $output |
71 | 71 | */ |
72 | - public function __construct(OutputInterface $output) |
|
72 | + public function __construct (OutputInterface $output) |
|
73 | 73 | { |
74 | 74 | $this->output = $output; |
75 | 75 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * |
80 | 80 | * @return OutputInterface |
81 | 81 | */ |
82 | - public function getOutputInterface() |
|
82 | + public function getOutputInterface () |
|
83 | 83 | { |
84 | 84 | return $this->output; |
85 | 85 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @param string $message |
92 | 92 | * @param array $context |
93 | 93 | */ |
94 | - public function log($level, $message, array $context = array()) |
|
94 | + public function log ($level, $message, array $context = array()) |
|
95 | 95 | { |
96 | 96 | if (!isset($this->verbosityLevelMap[$level])) |
97 | 97 | { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered |
128 | 128 | * the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL |
129 | 129 | */ |
130 | - public function writeln($messages, $options = 0) |
|
130 | + public function writeln ($messages, $options = 0) |
|
131 | 131 | { |
132 | 132 | $this->output->writeln($messages, $options); |
133 | 133 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * |
143 | 143 | * @return string |
144 | 144 | */ |
145 | - private function interpolate($message, array $context) |
|
145 | + private function interpolate ($message, array $context) |
|
146 | 146 | { |
147 | 147 | // build a replacement array with braces around the context keys |
148 | 148 | $replace = array(); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | abstract class ArrayUtilities |
11 | 11 | { |
12 | - public static function is_multidimensional(array &$array) |
|
12 | + public static function is_multidimensional (array &$array) |
|
13 | 13 | { |
14 | 14 | foreach ($array as $element) |
15 | 15 | { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | return false; |
23 | 23 | } |
24 | 24 | |
25 | - public static function array_merge_defaults(array &$array1, array &$array2, $keyField) |
|
25 | + public static function array_merge_defaults (array &$array1, array &$array2, $keyField) |
|
26 | 26 | { |
27 | 27 | $merged = $array1; |
28 | 28 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | class RstEngine extends Parser implements ParsingEngine |
14 | 14 | { |
15 | - public function __construct($environment = null, $kernel = null) |
|
15 | + public function __construct ($environment = null, $kernel = null) |
|
16 | 16 | { |
17 | 17 | parent::__construct($environment, $kernel); |
18 | 18 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class SyntaxBlock extends CodeBlock |
10 | 10 | { |
11 | - public function process(Parser $parser, $node, $variable, $data, array $options) |
|
11 | + public function process (Parser $parser, $node, $variable, $data, array $options) |
|
12 | 12 | { |
13 | 13 | parent::process($parser, $node, $variable, $data, $options); |
14 | 14 |