Skip to content

Commit 2341a97

Browse files
#12 Remove all phpstan ignoreErrors. Fix code.
1 parent 5adb4df commit 2341a97

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

phpstan.neon

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,3 @@ parameters:
33
paths:
44
- src
55
- tests
6-
ignoreErrors:
7-
- '#type has no value type specified in iterable type#'
8-
- '#has parameter .* with no value type specified in iterable type#'
9-
- '#has no value type specified in iterable type array#'
10-
- '#configureOptions\(\) has no return type specified.#'
11-
- '#configure\(\) has no return type specified#'
12-
- '#process\(\) has no return type specified#'
13-
- '#should return Iterator but returns Traversable#'
14-
- '#Negated boolean expression is always false#'
15-
checkGenericClassInNonGenericObjectType: false
16-
reportUnmatchedIgnoredErrors: false
17-
inferPrivatePropertyTypeFromConstructor: true
18-
treatPhpDocTypesAsCertain: false

src/Task/FileFetchTask.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use CleverAge\ProcessBundle\Model\AbstractConfigurableTask;
1717
use CleverAge\ProcessBundle\Model\IterableTaskInterface;
1818
use CleverAge\ProcessBundle\Model\ProcessState;
19-
use League\Flysystem\Filesystem;
2019
use League\Flysystem\FilesystemException;
2120
use League\Flysystem\FilesystemOperator;
2221
use Symfony\Component\DependencyInjection\ServiceLocator;
@@ -32,6 +31,9 @@ class FileFetchTask extends AbstractConfigurableTask implements IterableTaskInte
3231

3332
protected FilesystemOperator $destinationFS;
3433

34+
/**
35+
* @var array<int, string>
36+
*/
3537
protected array $matchingFiles = [];
3638

3739
/**

src/Task/ListContentTask.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
*/
2727
class ListContentTask extends AbstractConfigurableTask implements IterableTaskInterface
2828
{
29+
/**
30+
* @var list<\League\Flysystem\StorageAttributes>|null
31+
*/
2932
protected ?array $fsContent = null;
3033

3134
/**
@@ -76,6 +79,8 @@ public function next(ProcessState $state): bool
7679
}
7780

7881
/**
82+
* @return list<\League\Flysystem\StorageAttributes>
83+
*
7984
* @throws FilesystemException
8085
*/
8186
protected function getFilteredFilesystemContents(FilesystemOperator $filesystem, ?string $pattern = null): array

0 commit comments

Comments
 (0)