Skip to content

Commit

Permalink
[Turbo] Upgrading and fixing phpstan & CI
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 24, 2023
1 parent 28b7c6b commit 6e4b01c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Doctrine/EntitySearchUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public function addSearchClause(QueryBuilder $queryBuilder, string $query, strin

// this complex condition is needed to avoid issues on PostgreSQL databases
if (
($isSmallIntegerProperty && $isSmallIntegerQuery) ||
($isIntegerProperty && $isIntegerQuery) ||
($isNumericProperty && $isNumericQuery)
($isSmallIntegerProperty && $isSmallIntegerQuery)
|| ($isIntegerProperty && $isIntegerQuery)
|| ($isNumericProperty && $isNumericQuery)
) {
$expressions[] = $queryBuilder->expr()->eq(sprintf('%s.%s', $entityName, $propertyName), ':query_for_numbers');
$queryBuilder->setParameter('query_for_numbers', $dqlParameters['numeric_query']);
Expand Down
6 changes: 3 additions & 3 deletions src/Form/ParentEntityAutocompleteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public function __construct(
public function buildForm(FormBuilderInterface $builder, array $options)
{
$formType = $builder->getType()->getInnerType();
$attribute = AsEntityAutocompleteField::getInstance(\get_class($formType));
$attribute = AsEntityAutocompleteField::getInstance($formType::class);

if (!$attribute && empty($options['autocomplete_url'])) {
throw new \LogicException(sprintf('You must either provide your own autocomplete_url, or add #[AsEntityAutocompleteField] attribute to %s.', \get_class($formType)));
throw new \LogicException(sprintf('You must either provide your own autocomplete_url, or add #[AsEntityAutocompleteField] attribute to %s.', $formType::class));
}

// Use the provided URL, or auto-generate from the provided alias
$autocompleteUrl = $options['autocomplete_url'] ?? $this->urlGenerator->generate($attribute->getRoute(), [
'alias' => $attribute->getAlias() ?: AsEntityAutocompleteField::shortName(\get_class($formType)),
'alias' => $attribute->getAlias() ?: AsEntityAutocompleteField::shortName($formType::class),
]);

$builder
Expand Down

0 comments on commit 6e4b01c

Please sign in to comment.