cs: Fix code-style (using PHPCSFixer and PHPCS).

This commit is contained in:
Pol Dellaiera
2021-12-21 10:59:23 +01:00
parent b7360955f7
commit 8401ce2656
280 changed files with 742 additions and 319 deletions

View File

@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Search;
use DateTime;
use function array_key_exists;
use function strpos;

View File

@@ -14,6 +14,7 @@ namespace Chill\MainBundle\Search\Entity;
use Chill\MainBundle\Repository\UserRepository;
use Chill\MainBundle\Search\SearchApiInterface;
use Chill\MainBundle\Search\SearchApiQuery;
use function array_map;
use function in_array;

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Serializer\Model\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query\ResultSetMappingBuilder;
use function array_map;
use function array_merge;
use function count;

View File

@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Search;
use RuntimeException;
use Throwable;
use function implode;
class SearchApiNoQueryException extends RuntimeException

View File

@@ -276,8 +276,10 @@ class SearchProvider
//remove from search pattern
$this->mustBeExtracted[] = $matches[0][$key];
//strip parenthesis
if (mb_substr($match, 0, 1) === '"'
&& mb_substr($match, mb_strlen($match) - 1) === '"') {
if (
mb_substr($match, 0, 1) === '"'
&& mb_substr($match, mb_strlen($match) - 1) === '"'
) {
$match = trim(mb_substr($match, 1, mb_strlen($match) - 2));
}
$terms[$matches[1][$key]] = $match;

View File

@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Search\Utils;
use DateTimeImmutable;
use function preg_match_all;
use function strtr;
use function trim;

View File

@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Search\Utils;
use LogicException;
use function count;
use function implode;
use function preg_match;