Issues (121)

src/Provider/LiveCarrierProvider.php (2 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Inspirum\Balikobot\Provider;
6
7
use Inspirum\Balikobot\Model\Carrier\Carrier;
8
use Inspirum\Balikobot\Service\SettingService;
9
use function array_map;
10
11
final class LiveCarrierProvider implements CarrierProvider
12
{
13 3
    public function __construct(
14
        private readonly SettingService $settingService,
15
    ) {
16 3
    }
17
18
    /**
19
     * @return list<string>
0 ignored issues
show
The type Inspirum\Balikobot\Provider\list was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
     *
21
     * @throws \Inspirum\Balikobot\Exception\Exception
22
     */
23 3
    public function getCarriers(): array
24
    {
25 3
        return array_map(static fn (Carrier $carrier): string => $carrier->getCode(), $this->settingService->getCarriers()->getCarriers());
0 ignored issues
show
Bug Best Practice introduced by
The expression return array_map(functio...riers()->getCarriers()) returns the type array which is incompatible with the documented return type Inspirum\Balikobot\Provider\list.
Loading history...
26
    }
27
}
28