Fix formatting
This commit is contained in:
bovenliggende
1e23b4ed90
commit
65f0679d7a
@ -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
|
||||
|
@ -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));
|
||||
|
@ -25,7 +25,7 @@ class EmbedImages
|
||||
{
|
||||
return preg_replace_callback(
|
||||
"/<img\\s+[^>]*src=['\"]([^\"]*)['\"][^>]*>/",
|
||||
function ($matches) use ($file, $callback) {
|
||||
function($matches) use ($file, $callback) {
|
||||
if ($result = $this->findImage($matches[1], $matches[0], $file, $callback)) {
|
||||
return $result;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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'];
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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());
|
||||
});
|
||||
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user