Skip to content

Commit

Permalink
fix rector
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Dec 27, 2023
1 parent b816783 commit f72ca7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ public $js = [
'jquery-3.7.1.min.js', 'bootstrap-3.3.7.min.js', 'main.js',
]
];
```

or
// or / and

```php
public $css = [
'all.min.css' => [
'bootstrap-3.3.7.min.css', 'font-awesome-4.7.0.min.css', 'main.css',
Expand Down
3 changes: 2 additions & 1 deletion src/Minifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ protected function getVersion(string $dir): array
*/
protected function setVersion(string $mode, array $files, string $dir): void
{
$dir = rtrim($dir, '/');
$versions = [];
$dir = rtrim($dir, '/');

if (file_exists($dir . '/versions.json')) {
$versions = json_decode(file_get_contents($dir . '/versions.json'), true);
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/CLITestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function removeColorCodes(string $output): string
{
$colors = $this->getPrivateProperty(CLI::class, 'foreground_colors');
$colors = array_values(array_map(static fn ($color) => "\033[" . $color . 'm', $colors));
$colors = array_merge(["\033[0m"], $colors);
$colors = ["\033[0m", ...$colors];

$output = str_replace($colors, '', trim($output));

Expand Down

0 comments on commit f72ca7a

Please sign in to comment.