Skip to content

Commit

Permalink
Fixed static analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtronics committed Dec 2, 2023
1 parent 0445b87 commit d976865
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Controller/KiCADAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@
class KiCADAPIController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $em,
private readonly KiCADHelper $kiCADHelper,

)
{

}

#[Route('/', name: 'kicad_api_root')]
public function root(): Response
{
$this->denyAccessUnlessGranted('HAS_ACCESS_PERMISSIONS');

//The API documentation says this can be either blank or the URL to the endpoints
return $this->json([
'categories' => '',
Expand Down
1 change: 1 addition & 0 deletions src/Form/Part/EDA/KicadFieldAutocompleteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function configureOptions(OptionsResolver $resolver): void
'file' => fn(Options $options) => match ($options['type']) {
self::TYPE_FOOTPRINT => self::FOOTPRINT_PATH,
self::TYPE_SYMBOL => self::SYMBOL_PATH,
default => throw new \InvalidArgumentException('Invalid type'),
}
]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Cache/ElementCacheTagGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getElementTypeCacheTag(string|object $element): string
}

//If the element is a proxy, then get the real class name of the underlying object
if ($element instanceof Proxy || str_starts_with($element, 'Proxies\\')) {
if (is_a($element, Proxy::class, true) || str_starts_with($element, 'Proxies\\')) {
$element = get_parent_class($element);
}

Expand Down

0 comments on commit d976865

Please sign in to comment.