@@ -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 |
@@ -237,9 +237,15 @@ |
||
| 237 | 237 | $exclusions, FileExplorer::$vcsPatterns, array(Configuration::CACHE_FOLDER) |
| 238 | 238 | )) |
| 239 | 239 | ->setIterator($fileExplorer->getExplorer()) |
| 240 | - ->addListener(Create::NAME, function ($e) { $this->watchListenerFunction($e); }) |
|
| 241 | - ->addListener(Modify::NAME, function ($e) { $this->watchListenerFunction($e); }) |
|
| 242 | - ->addListener(Move::NAME, function ($e) { $this->watchListenerFunction($e); }) |
|
| 240 | + ->addListener(Create::NAME, function ($e) |
|
| 241 | + { |
|
| 242 | +$this->watchListenerFunction($e); }) |
|
| 243 | + ->addListener(Modify::NAME, function ($e) |
|
| 244 | + { |
|
| 245 | +$this->watchListenerFunction($e); }) |
|
| 246 | + ->addListener(Move::NAME, function ($e) |
|
| 247 | + { |
|
| 248 | +$this->watchListenerFunction($e); }) |
|
| 243 | 249 | ; |
| 244 | 250 | |
| 245 | 251 | $this->output->writeln('Watch started successfully'); |
@@ -300,7 +300,9 @@ |
||
| 300 | 300 | */ |
| 301 | 301 | foreach ($elements as &$item) |
| 302 | 302 | { |
| 303 | - if (!Service::getParameter(BuildableCommand::USE_DRAFTS) && $item->isDraft()) { continue; } |
|
| 303 | + if (!Service::getParameter(BuildableCommand::USE_DRAFTS) && $item->isDraft()) |
|
| 304 | + { |
|
| 305 | +continue; } |
|
| 304 | 306 | |
| 305 | 307 | if (empty($item->getNamespace())) |
| 306 | 308 | { |
@@ -55,14 +55,20 @@ |
||
| 55 | 55 | |
| 56 | 56 | $headingID = $heading->attributes->getNamedItem('id'); |
| 57 | 57 | |
| 58 | - if ($curr > $last) // If the current level is greater than the last level indent one level |
|
| 58 | + if ($curr > $last) |
|
| 59 | + { |
|
| 60 | + // If the current level is greater than the last level indent one level |
|
| 59 | 61 | { |
| 60 | 62 | $toc .= '<ul>'; |
| 61 | 63 | } |
| 62 | - elseif ($curr < $last) // If the current level is less than the last level go up appropriate amount. |
|
| 64 | + } |
|
| 65 | + elseif ($curr < $last) |
|
| 66 | + { |
|
| 67 | + // If the current level is less than the last level go up appropriate amount. |
|
| 63 | 68 | { |
| 64 | 69 | $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>'; |
| 65 | 70 | } |
| 71 | + } |
|
| 66 | 72 | else // If the current level is equal to the last. |
| 67 | 73 | { |
| 68 | 74 | $toc .= '</li>'; |
@@ -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 | } |
@@ -20,7 +20,8 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public static function array_safe_get(array $array, $key, $default = null) |
| 22 | 22 | { |
| 23 | - if (isset($array[$key])) { |
|
| 23 | + if (isset($array[$key])) |
|
| 24 | + { |
|
| 24 | 25 | return $array[$key]; |
| 25 | 26 | } |
| 26 | 27 | |