Skip to content

Commit 25b7957

Browse files
author
Florian Krämer
committed
Fixing things found by phpstan and phpcs
1 parent 642c000 commit 25b7957

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"\\InstituteWeb\\ComposerScripts\\ImprovedScriptExecution::apply",
6262
"./bin/phpcbf ./src ./tests --standard=./phpcs.xml"
6363
],
64-
"stan": [
64+
"analyze": [
6565
"\\InstituteWeb\\ComposerScripts\\ImprovedScriptExecution::apply",
6666
"./bin/phpstan analyse ./src -l 5"
6767
],

src/ImageProcessor.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ class ImageProcessor implements ProcessorInterface
6363
*/
6464
protected PathBuilderInterface $pathBuilder;
6565

66+
/**
67+
* @var \Phauthentic\Infrastructure\Storage\UrlBuilder\UrlBuilderInterface
68+
*/
69+
protected UrlBuilderInterface $urlBuilder;
70+
6671
/**
6772
* @var \Intervention\Image\ImageManager
6873
*/
@@ -258,7 +263,7 @@ public function process(FileInterface $file): FileInterface
258263
$data['path'] = $path;
259264
$file = $file->withVariant($variant, $data);
260265

261-
if ($this->urlBuilder) {
266+
if ($this->urlBuilder !== null) {
262267
$data['url'] = $this->urlBuilder->urlForVariant($file, $variant);
263268
}
264269

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
2-
$ds = DIRECTORY_SEPARATOR;
32

3+
$ds = DIRECTORY_SEPARATOR;
44
include __DIR__ . $ds . '..' . $ds . 'vendor' . $ds . 'autoload.php';

0 commit comments

Comments
 (0)