Skip to content

Commit

Permalink
refactor: Fix DbalTypesSearcher.php to use str_ends_with() (#376)
Browse files Browse the repository at this point in the history
* Update DbalTypesSearcher.php

Para usar str_ends_with()

* fix: remove unused import

---------

Co-authored-by: Javier Ferrer González <[email protected]>
  • Loading branch information
joanhey and JavierCane authored Dec 11, 2023
1 parent 9d3434e commit 06249af
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace CodelyTv\Mooc\Shared\Infrastructure\Doctrine;

use CodelyTv\Shared\Domain\Utils;

use function Lambdish\Phunctional\filter;
use function Lambdish\Phunctional\map;
use function Lambdish\Phunctional\reduce;
Expand Down Expand Up @@ -51,7 +49,7 @@ private static function dbalClassesSearcher(string $contextName): callable
{
return static function (array $totalNamespaces, string $path) use ($contextName): array {
$possibleFiles = scandir($path);
$files = filter(static fn (string $file): bool => Utils::endsWith('Type.php', $file), $possibleFiles);
$files = filter(static fn (string $file): bool => str_ends_with($file, 'Type.php'), $possibleFiles);

$namespaces = map(
static function (string $file) use ($path, $contextName): string {
Expand Down

0 comments on commit 06249af

Please sign in to comment.