Skip to content

Commit 48f64f4

Browse files
stevebaumangithub-actions[bot]
authored andcommitted
Fix code style
1 parent e5b9699 commit 48f64f4

32 files changed

+81
-81
lines changed

src/Auth/BindFailureListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function usingLaravelUi(string $controller = 'App\Http\Controllers
3333
/**
3434
* Register the bind failure listener upon resolving the given class.
3535
*/
36-
protected static function whenResolving(string $class, Closure $callback = null): void
36+
protected static function whenResolving(string $class, ?Closure $callback = null): void
3737
{
3838
if (! class_exists($class)) {
3939
return;

src/Auth/ListensForLdapBindFailure.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function listenForLdapBindFailure(): void
6565
*
6666
* @throws ValidationException
6767
*/
68-
protected function ldapBindFailed(string $errorMessage, string $diagnosticMessage = null): void
68+
protected function ldapBindFailed(string $errorMessage, ?string $diagnosticMessage = null): void
6969
{
7070
switch (true) {
7171
case $this->causedByLostConnection($errorMessage):
@@ -98,7 +98,7 @@ protected function ldapBindFailed(string $errorMessage, string $diagnosticMessag
9898
*
9999
* @throws ValidationException
100100
*/
101-
protected function handleLdapBindError(string $message, string $code = null): void
101+
protected function handleLdapBindError(string $message, ?string $code = null): void
102102
{
103103
logger()->error($message, compact('code'));
104104

src/Auth/Rule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ interface Rule
1010
/**
1111
* Determine if the rule passes validation.
1212
*/
13-
public function passes(LdapRecord $user, Eloquent $model = null): bool;
13+
public function passes(LdapRecord $user, ?Eloquent $model = null): bool;
1414
}

src/Auth/Rules/OnlyImported.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class OnlyImported implements Rule
1111
/**
1212
* {@inheritdoc}
1313
*/
14-
public function passes(LdapRecord $user, Eloquent $model = null): bool
14+
public function passes(LdapRecord $user, ?Eloquent $model = null): bool
1515
{
1616
return $model?->exists;
1717
}

src/Auth/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(iterable $rules = [])
2929
/**
3030
* Determine if all rules pass validation.
3131
*/
32-
public function passes(LdapRecord $user, Eloquent $model = null): bool
32+
public function passes(LdapRecord $user, ?Eloquent $model = null): bool
3333
{
3434
foreach ($this->rules as $rule) {
3535
if (! $rule->passes($user, $model)) {

src/Events/Auth/Event.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class Event
2020
/**
2121
* Constructor.
2222
*/
23-
public function __construct(LdapModel $object, EloquentModel $eloquent = null)
23+
public function __construct(LdapModel $object, ?EloquentModel $eloquent = null)
2424
{
2525
$this->object = $object;
2626
$this->eloquent = $eloquent;

src/Events/Auth/RuleEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ abstract class RuleEvent extends Event
1616
/**
1717
* Constructor.
1818
*/
19-
public function __construct(Rule $rule, LdapModel $object, EloquentModel $eloquent = null)
19+
public function __construct(Rule $rule, LdapModel $object, ?EloquentModel $eloquent = null)
2020
{
2121
parent::__construct($object, $eloquent);
2222

src/Import/LdapUserImporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function trashDisabledUsers(): static
9090
/**
9191
* Load the import's objects from the LDAP repository.
9292
*/
93-
public function loadObjectsFromRepository(string $username = null): Collection
93+
public function loadObjectsFromRepository(?string $username = null): Collection
9494
{
9595
$query = $this->applyLdapQueryConstraints(
9696
$this->repository->query()

src/Import/Synchronizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected function getSyncScopeOperatorAndValue(LdapModel $ldap, array|string $c
166166
/**
167167
* Get the sync scope option from the config array.
168168
*/
169-
protected function getSyncScopeOption(array|string $config, string $option, array|string $default = null): array|string
169+
protected function getSyncScopeOption(array|string $config, string $option, array|string|null $default = null): array|string
170170
{
171171
return is_array($config) ? $config[$option] : $default;
172172
}

src/LdapUserAuthenticator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(array $rules = [])
4949
/**
5050
* Set the authenticating eloquent model.
5151
*/
52-
public function setEloquentModel(Eloquent $model = null): static
52+
public function setEloquentModel(?Eloquent $model = null): static
5353
{
5454
$this->eloquentModel = $model;
5555

@@ -59,7 +59,7 @@ public function setEloquentModel(Eloquent $model = null): static
5959
/**
6060
* Attempt authenticating against the LDAP domain.
6161
*/
62-
public function attempt(Model $user, string $password = null): bool
62+
public function attempt(Model $user, ?string $password = null): bool
6363
{
6464
$this->attempting($user);
6565

@@ -95,7 +95,7 @@ public function attempt(Model $user, string $password = null): bool
9595
/**
9696
* Attempt authentication using the given callback once.
9797
*/
98-
public function attemptOnceUsing(Closure $callback, Model $user, string $password = null): bool
98+
public function attemptOnceUsing(Closure $callback, Model $user, ?string $password = null): bool
9999
{
100100
$authenticator = $this->authenticator;
101101

0 commit comments

Comments
 (0)