diff --git a/libs/Console/DauxCommand.php b/libs/Console/DauxCommand.php index ec19c8e..fd16eb6 100644 --- a/libs/Console/DauxCommand.php +++ b/libs/Console/DauxCommand.php @@ -27,7 +27,7 @@ class DauxCommand extends SymfonyCommand $keys = explode('.', $key); while (count($keys) > 1) { $key = array_shift($keys); - if (! isset($array[$key]) || ! is_array($array[$key])) { + if (!isset($array[$key]) || !is_array($array[$key])) { $array[$key] = []; } $array = &$array[$key]; @@ -39,7 +39,7 @@ class DauxCommand extends SymfonyCommand private function applyConfiguration(array $options, Daux $daux) { $values = array_map( - function ($value) { + function($value) { return array_map("trim", explode('=', $value)); }, $options diff --git a/libs/Console/Serve.php b/libs/Console/Serve.php index 2a16863..1fb7deb 100755 --- a/libs/Console/Serve.php +++ b/libs/Console/Serve.php @@ -40,7 +40,7 @@ class Serve extends DauxCommand putenv('DAUX_SOURCE=' . $daux->getParams()->getDocumentationDirectory()); putenv('DAUX_THEME=' . $daux->getParams()->getThemesPath()); putenv('DAUX_CONFIGURATION=' . $daux->getParams()->getConfigurationOverrideFile()); - putenv('DAUX_EXTENSION=' . DAUX_EXTENSION); + putenv('DAUX_EXTENSION=' . DAUX_EXTENSION); $base = ProcessUtils::escapeArgument(__DIR__ . '/../../'); $binary = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)); diff --git a/libs/Format/Base/EmbedImages.php b/libs/Format/Base/EmbedImages.php index 8cc440d..f729e7e 100644 --- a/libs/Format/Base/EmbedImages.php +++ b/libs/Format/Base/EmbedImages.php @@ -25,7 +25,7 @@ class EmbedImages { return preg_replace_callback( "/]*src=['\"]([^\"]*)['\"][^>]*>/", - function ($matches) use ($file, $callback) { + function($matches) use ($file, $callback) { if ($result = $this->findImage($matches[1], $matches[0], $file, $callback)) { return $result; } diff --git a/libs/Format/Confluence/ContentPage.php b/libs/Format/Confluence/ContentPage.php index 43aa8bb..abddf52 100644 --- a/libs/Format/Confluence/ContentPage.php +++ b/libs/Format/Confluence/ContentPage.php @@ -19,7 +19,7 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage ->embed( $content, $this->file, - function ($src, array $attributes, Entry $file) { + function($src, array $attributes, Entry $file) { //Add the attachment for later upload if ($file instanceof Raw) { diff --git a/libs/Format/Confluence/Generator.php b/libs/Format/Confluence/Generator.php index 030f08a..037fd61 100644 --- a/libs/Format/Confluence/Generator.php +++ b/libs/Format/Confluence/Generator.php @@ -81,7 +81,7 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator 'Generating Tree ...', $output, $width, - function () use ($params) { + function() use ($params) { $tree = $this->generateRecursive($this->daux->tree, $params); $tree['title'] = $this->prefix . $params['title']; diff --git a/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php b/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php index cbf0507..d66be7d 100644 --- a/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php +++ b/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php @@ -114,7 +114,7 @@ class Processor implements DocumentProcessorInterface // If the node has an ID, no need to generate it, just check it's unique $attributes = $node->getData('attributes', []); if (array_key_exists('id', $attributes) && !empty($attributes['id'])) { - $node->data['attributes']['id'] = $this->getUniqueId($document, $attributes['id']); + $node->data['attributes']['id'] = $this->getUniqueId($document, $attributes['id']); return; } @@ -139,7 +139,7 @@ class Processor implements DocumentProcessorInterface } } - $node->data['attributes']['id'] = $this->getUniqueId($document,'page_'. $this->escaped($text)); + $node->data['attributes']['id'] = $this->getUniqueId($document,'page_'. $this->escaped($text)); } /** diff --git a/libs/Format/HTML/Generator.php b/libs/Format/HTML/Generator.php index 20175f2..efa9395 100755 --- a/libs/Format/HTML/Generator.php +++ b/libs/Format/HTML/Generator.php @@ -82,7 +82,7 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator 'Copying Static assets ...', $output, $width, - function () use ($destination, $params) { + function() use ($destination, $params) { $this->ensureEmptyDestination($destination); $this->copyThemes($destination, $params->getThemesPath()); @@ -196,7 +196,7 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator '- ' . $node->getUrl(), $output, $width, - function () use ($node, $output_dir, $key, $params, $index_pages) { + function() use ($node, $output_dir, $key, $params, $index_pages) { if ($node instanceof Raw) { copy($node->getPath(), $output_dir . DIRECTORY_SEPARATOR . $key); diff --git a/libs/Format/HTMLFile/ContentPage.php b/libs/Format/HTMLFile/ContentPage.php index 0587204..e9825f6 100644 --- a/libs/Format/HTMLFile/ContentPage.php +++ b/libs/Format/HTMLFile/ContentPage.php @@ -17,7 +17,7 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage ->embed( $content, $this->file, - function ($src, array $attributes, Raw $file) { + function($src, array $attributes, Raw $file) { $content = base64_encode(file_get_contents($file->getPath())); $attr = ''; foreach ($attributes as $name => $value) { diff --git a/libs/Tree/Directory.php b/libs/Tree/Directory.php index 5a9f28d..d3c6a1f 100644 --- a/libs/Tree/Directory.php +++ b/libs/Tree/Directory.php @@ -32,7 +32,9 @@ class Directory extends Entry implements \ArrayAccess, \IteratorAggregate continue; } - if (!$name) continue; + if (!$name) { + continue; + } if ($name[0] == '-') { if (is_numeric($name[1])) { @@ -82,7 +84,7 @@ class Directory extends Entry implements \ArrayAccess, \IteratorAggregate private function sortBucket($bucket, $final) { - uasort($bucket, function (Entry $a, Entry $b) { + uasort($bucket, function(Entry $a, Entry $b) { return strcasecmp($a->getName(), $b->getName()); });