@@ -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 | } |
@@ -18,7 +18,8 @@ |
||
18 | 18 | |
19 | 19 | public function filter($in, $out, &$consumed, $closing) |
20 | 20 | { |
21 | - while ($bucket = stream_bucket_make_writeable($in)) { |
|
21 | + while ($bucket = stream_bucket_make_writeable($in)) |
|
22 | + { |
|
22 | 23 | self::$output .= $bucket->data; |
23 | 24 | $consumed += $bucket->datalen; |
24 | 25 | } |
@@ -84,7 +84,8 @@ |
||
84 | 84 | { |
85 | 85 | $results = array(); |
86 | 86 | |
87 | - foreach ($elements as $element) { |
|
87 | + foreach ($elements as $element) |
|
88 | + { |
|
88 | 89 | $filename = (isset($element['filename'])) ? $element['filename'] : hash('sha256', uniqid(mt_rand(), true), false); |
89 | 90 | $frontMatter = (empty($element['frontmatter'])) ? '' : Yaml::dump($element['frontmatter'], 2); |
90 | 91 | $body = (isset($element['body'])) ? $element['body'] : 'Body Text'; |
@@ -185,7 +185,7 @@ |
||
185 | 185 | $this->bodyContentEvaluated = true; |
186 | 186 | } |
187 | 187 | |
188 | - return (string)$this->bodyContent; |
|
188 | + return (string) $this->bodyContent; |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
@@ -78,10 +78,10 @@ |
||
78 | 78 | */ |
79 | 79 | public static function associative_array_split($key, array &$array, $considerOffset = true) |
80 | 80 | { |
81 | - $offset = array_search($key, array_keys($array)) + (int)$considerOffset; |
|
81 | + $offset = array_search($key, array_keys($array)) + (int) $considerOffset; |
|
82 | 82 | $result = array(); |
83 | 83 | |
84 | - $result[0] = array_slice($array, 0 , $offset, true); |
|
84 | + $result[0] = array_slice($array, 0, $offset, true); |
|
85 | 85 | $result[1] = array_slice($array, $offset, null, true); |
86 | 86 | |
87 | 87 | return $result; |
@@ -89,7 +89,7 @@ |
||
89 | 89 | * @param InputInterface $input |
90 | 90 | * @param string $param |
91 | 91 | */ |
92 | - private function setServiceParameter(InputInterface &$input, $param) |
|
92 | + private function setServiceParameter(InputInterface & $input, $param) |
|
93 | 93 | { |
94 | 94 | Service::setParameter($param, $input->getOption($param)); |
95 | 95 | } |
@@ -218,8 +218,12 @@ |
||
218 | 218 | $exclusions, FileExplorer::$vcsPatterns, array(Configuration::CACHE_FOLDER) |
219 | 219 | )) |
220 | 220 | ->setIterator($fileExplorer->getExplorer()) |
221 | - ->addListener(Create::NAME, function ($e) { $this->watchListenerFunction($e); }) |
|
222 | - ->addListener(Modify::NAME, function ($e) { $this->watchListenerFunction($e); }) |
|
221 | + ->addListener(Create::NAME, function ($e) |
|
222 | + { |
|
223 | +$this->watchListenerFunction($e); }) |
|
224 | + ->addListener(Modify::NAME, function ($e) |
|
225 | + { |
|
226 | +$this->watchListenerFunction($e); }) |
|
223 | 227 | ; |
224 | 228 | |
225 | 229 | $this->output->writeln('Watch started successfully'); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function __construct($filePath) |
20 | 20 | { |
21 | 21 | $this->fs = new Filesystem(); |
22 | - $p = $this->filePath = $this->fs->absolutePath((string)$filePath); |
|
22 | + $p = $this->filePath = $this->fs->absolutePath((string) $filePath); |
|
23 | 23 | |
24 | 24 | $this->extension = strtolower($this->fs->getExtension($p)); |
25 | 25 | $this->refreshFileContent(); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | private static function flatten(array $array) |
55 | 55 | { |
56 | 56 | $return = array(); |
57 | - array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); |
|
57 | + array_walk_recursive($array, function ($a) use (&$return) { $return[] = $a; }); |
|
58 | 58 | return $return; |
59 | 59 | } |
60 | 60 | } |
61 | 61 | \ No newline at end of file |
@@ -54,7 +54,9 @@ |
||
54 | 54 | private static function flatten(array $array) |
55 | 55 | { |
56 | 56 | $return = array(); |
57 | - array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); |
|
57 | + array_walk_recursive($array, function($a) use (&$return) |
|
58 | + { |
|
59 | +$return[] = $a; }); |
|
58 | 60 | return $return; |
59 | 61 | } |
60 | 62 | } |
61 | 63 | \ No newline at end of file |