Skip to content

Commit 3f06b23

Browse files
Merge pull request #3559 from bolt/implicit-nullable-parameter
Fix implicitly nullable parameters
2 parents f272957 + e8dbcd5 commit 3f06b23

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Repository/UserRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function findOneByCredentials(string $username): ?User
5050
return $user instanceof User ? $user : null;
5151
}
5252

53-
public function findUsers(string $like, string $orderBy = null)
53+
public function findUsers(string $like, ?string $orderBy = null)
5454
{
5555
$alias = 'user';
5656
$qb = $this->createQueryBuilder($alias);

src/Security/AuthenticationEntryPointRedirector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(TranslatorInterface $translator, UrlGeneratorInterfa
2222
$this->urlGenerator = $urlGenerator;
2323
}
2424

25-
public function start(Request $request, AuthenticationException $authException = null): RedirectResponse
25+
public function start(Request $request, ?AuthenticationException $authException = null): RedirectResponse
2626
{
2727
// add a custom flash message and redirect to the login page
2828
/** @var Session $session */

src/Twig/AssetsExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getFunctions(): array
4141
* If the package used to generate the path is an instance of
4242
* UrlPackage, you will always get a URL and not a path.
4343
*/
44-
public function getAssetUrl(string $path, string $packageName = null): string
44+
public function getAssetUrl(string $path, ?string $packageName = null): string
4545
{
4646
$url = $this->assets->getAssetUrl($path, $packageName);
4747
$original = $url;

src/Utils/FilesIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function get(string $path, string $type, string $baseUrlPath, string $bas
4848
return new Collection($files);
4949
}
5050

51-
private function findFiles(string $path, string $glob = null): Finder
51+
private function findFiles(string $path, ?string $glob = null): Finder
5252
{
5353
$finder = new Finder();
5454
$finder->in($path)->depth('0')->sortByType()->files();

0 commit comments

Comments
 (0)