style: Coding Standard (phpcbf)

pull/27/head
Matthieu Marcillaud 7 months ago
parent 8868a03b10
commit b221b5b93a

@ -53,11 +53,11 @@ class Build {
}
public function showResults() {
$climate = new CLImate;
$climate = new CLImate();
$climate->out('');
$climate->underline()->out('Results');
$climate->out('');
foreach($this->stats as $item => $value) {
foreach ($this->stats as $item => $value) {
$climate->infoInline("$item: ");
$climate->out($value);
}
@ -65,7 +65,7 @@ class Build {
}
public function showCopyTo(string $prodDirectory) {
$climate = new CLImate;
$climate = new CLImate();
if ($this->copyTo($prodDirectory)) {
$climate->info('> Fichiers copiés en prod');
} else {

@ -36,16 +36,16 @@ class PharArchive {
'app.css',
];
return (new Finder())->files()
->in($this->sourceDirectory. '/public/assets')
->in($this->sourceDirectory . '/public/assets')
->name('*.css')
->sort(function($a, $b) use ($order) {
->sort(function ($a, $b) use ($order) {
return array_search($a->getFilename(), $order) <=> array_search($b->getFilename(), $order);
});
}
public function getAssetsFiles(): IteratorAggregate {
return (new Finder())->files()
->in($this->sourceDirectory. '/public/assets')
->in($this->sourceDirectory . '/public/assets')
->notName('*.css');
}
@ -129,8 +129,8 @@ class PharArchive {
$lines = array_filter($lines);
$content = implode("\n", $lines);
$content = preg_replace("# \s+#", " ", $content); # /!\ casse des content: " " (y en a pas)
$content = preg_replace("#\/\*(.*)\*\/#sU", '', $content);
$content = preg_replace('# \s+#', ' ', $content); # /!\ casse des content: " " (y en a pas)
$content = preg_replace('#\/\*(.*)\*\/#sU', '', $content);
return $content;
}

Loading…
Cancel
Save