mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-28 20:39:35 +00:00
Fixed phpstan issues
This commit is contained in:
parent
be767fcacf
commit
b1b66e8b4f
2 changed files with 8 additions and 2 deletions
|
|
@ -75,8 +75,6 @@ class ScanController extends AbstractController
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected BarcodeScanResultHandler $resultHandler,
|
protected BarcodeScanResultHandler $resultHandler,
|
||||||
protected BarcodeScanHelper $barcodeNormalizer,
|
protected BarcodeScanHelper $barcodeNormalizer,
|
||||||
private readonly ProviderRegistry $providerRegistry,
|
|
||||||
private readonly PartInfoRetriever $infoRetriever,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
#[Route(path: '', name: 'scan_dialog')]
|
#[Route(path: '', name: 'scan_dialog')]
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,14 @@ namespace App\Services\InfoProviderSystem;
|
||||||
|
|
||||||
use App\Entity\Parts\Part;
|
use App\Entity\Parts\Part;
|
||||||
use App\Exceptions\InfoProviderNotActiveException;
|
use App\Exceptions\InfoProviderNotActiveException;
|
||||||
|
use App\Exceptions\OAuthReconnectRequiredException;
|
||||||
use App\Services\InfoProviderSystem\DTOs\PartDetailDTO;
|
use App\Services\InfoProviderSystem\DTOs\PartDetailDTO;
|
||||||
use App\Services\InfoProviderSystem\DTOs\SearchResultDTO;
|
use App\Services\InfoProviderSystem\DTOs\SearchResultDTO;
|
||||||
use App\Services\InfoProviderSystem\Providers\InfoProviderInterface;
|
use App\Services\InfoProviderSystem\Providers\InfoProviderInterface;
|
||||||
|
use Psr\Http\Client\ClientExceptionInterface;
|
||||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||||
|
use Symfony\Component\HttpClient\Exception\ClientException;
|
||||||
|
use Symfony\Component\HttpClient\Exception\TransportException;
|
||||||
use Symfony\Contracts\Cache\CacheInterface;
|
use Symfony\Contracts\Cache\CacheInterface;
|
||||||
use Symfony\Contracts\Cache\ItemInterface;
|
use Symfony\Contracts\Cache\ItemInterface;
|
||||||
|
|
||||||
|
|
@ -51,6 +55,10 @@ final class PartInfoRetriever
|
||||||
* @param string $keyword The keyword to search for
|
* @param string $keyword The keyword to search for
|
||||||
* @return SearchResultDTO[] The search results
|
* @return SearchResultDTO[] The search results
|
||||||
* @throws InfoProviderNotActiveException if any of the given providers is not active
|
* @throws InfoProviderNotActiveException if any of the given providers is not active
|
||||||
|
* @throws ClientException if any of the providers throws an exception during the search
|
||||||
|
* @throws \InvalidArgumentException if any of the given providers is not a valid provider key or instance
|
||||||
|
* @throws TransportException if any of the providers throws an exception during the search
|
||||||
|
* @throws OAuthReconnectRequiredException if any of the providers throws an exception during the search that indicates that the OAuth token needs to be refreshed
|
||||||
*/
|
*/
|
||||||
public function searchByKeyword(string $keyword, array $providers): array
|
public function searchByKeyword(string $keyword, array $providers): array
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue