Skip to content

Commit dc3fdb3

Browse files
committed
✅ adjusted tests
1 parent d5f0a84 commit dc3fdb3

18 files changed

+701
-550
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
return (new PhpCsFixer\Config())
1515
->setRules([
16-
'@PSR2' => true,
16+
'@PSR12' => true,
1717
])
1818
->setFinder($finder)
1919
;

classes/Fingerprint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private function write(array $lookup): bool
220220
*/
221221
public static function css($url, $attrs = []): string
222222
{
223-
if (is_string( $attrs)) {
223+
if (is_string($attrs)) {
224224
$attrs = ['media' => $attrs];
225225
}
226226

classes/FingerprintFile.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ public function integrity(bool $openssl = true): ?string
153153
if (is_array($output) && count($output) >= 1) {
154154
return 'sha384-' . $output[0];
155155
}
156-
} catch (\Exception $ex) {}
156+
} catch (\Exception $ex) {
157+
}
157158

158159
return null; // @codeCoverageIgnore
159160
}

composer.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-fingerprint",
33
"type": "kirby-plugin",
4-
"version": "3.1.1",
4+
"version": "3.1.2",
55
"description": "File Method and css/js helper to add cachebusting hash and optional Subresource Integrity to file",
66
"license": "MIT",
77
"authors": [
@@ -30,10 +30,13 @@
3030
},
3131
"config": {
3232
"optimize-autoloader": true,
33-
"sort-packages": true
33+
"sort-packages": true,
34+
"allow-plugins": {
35+
"getkirby/composer-installer": true
36+
}
3437
},
3538
"require": {
36-
"php": ">=7.3.0",
39+
"php": ">=7.4.0",
3740
"getkirby/composer-installer": "^1.2"
3841
},
3942
"require-dev": {
@@ -52,6 +55,12 @@
5255
"dist": [
5356
"composer install --no-dev --optimize-autoloader",
5457
"git rm -rf --cached .; git add .;"
58+
],
59+
"kirby": [
60+
"composer install",
61+
"composer update",
62+
"composer install --working-dir=tests/kirby --no-dev --optimize-autoloader",
63+
"composer update --working-dir=tests/kirby"
5564
]
5665
},
5766
"extra": {

0 commit comments

Comments
 (0)