Apply suggestions from code review #42
Annotations
10 errors and 1 warning
phpstan:
src/Dockerfile.php#L10
Class Kiboko\Component\Dockerfile\Dockerfile implements generic interface IteratorAggregate but does not specify its types: TKey, TValue
|
phpstan:
src/Dockerfile.php#L17
Property Kiboko\Component\Dockerfile\Dockerfile::$layers (iterable<Kiboko\Component\Dockerfile\Dockerfile\LayerInterface>) does not accept array<int|string, Kiboko\Component\Dockerfile\Dockerfile\LayerInterface|null>.
|
phpstan:
src/Dockerfile.php#L22
Parameter #1 $array of function array_push expects array, iterable<Kiboko\Component\Dockerfile\Dockerfile\LayerInterface> given.
|
phpstan:
src/Dockerfile.php#L27
Parameter #2 $array of function array_map expects array, iterable<Kiboko\Component\Dockerfile\Dockerfile\LayerInterface> given.
|
phpstan:
src/Dockerfile.php#L30
Method Kiboko\Component\Dockerfile\Dockerfile::getIterator() return type with generic class ArrayIterator does not specify its types: TKey, TValue
|
phpstan:
src/Dockerfile.php#L32
Parameter #1 $array of class ArrayIterator constructor expects array<TKey of (int|string), TValue>, iterable<Kiboko\Component\Dockerfile\Dockerfile\LayerInterface> given.
|
phpstan:
src/Dockerfile.php#L37
Parameter #1 $value of function count expects array|Countable, iterable<Kiboko\Component\Dockerfile\Dockerfile\LayerInterface> given.
|
phpstan:
src/Dockerfile.php#L43
Parameter #1 $stream of function fwrite expects resource, resource|false given.
|
phpstan:
src/Dockerfile.php#L44
Parameter #1 $stream of function fseek expects resource, resource|false given.
|
phpstan:
src/Dockerfile.php#L46
Method Kiboko\Component\Dockerfile\Dockerfile::asResource() should return resource but returns resource|false.
|
phpstan
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|