Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
StyleCIBot committed Oct 18, 2024
1 parent 9049f21 commit bbccdfa
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 21 deletions.
3 changes: 2 additions & 1 deletion src/DetailedError.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public function __construct(
protected int $errorCode,
protected string $errorMessage,
protected ?string $diagnosticMessage
) {}
) {
}

/**
* Get the LDAP error code.
Expand Down
4 changes: 3 additions & 1 deletion src/Events/NullDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public function until(string|object $event, mixed $payload = []): ?array
/**
* Fire an event and call the listeners.
*/
public function fire(string|object $event, mixed $payload = [], bool $halt = false): void {}
public function fire(string|object $event, mixed $payload = [], bool $halt = false): void
{
}

/**
* Fire an event and call the listeners.
Expand Down
3 changes: 2 additions & 1 deletion src/LdapResultResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public function __construct(
public readonly ?string $errorMessage = null,
public readonly ?array $referrals = null,
public readonly ?array $controls = null,
) {}
) {
}

/**
* Determine if the LDAP response indicates a successful status.
Expand Down
4 changes: 3 additions & 1 deletion src/Models/Concerns/CanAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public function getRememberToken(): string
/**
* Set the token value for the "remember me" session.
*/
public function setRememberToken($value): void {}
public function setRememberToken($value): void
{
}

/**
* Get the column name for the "remember me" token.
Expand Down
4 changes: 3 additions & 1 deletion src/Query/Filter/ParserException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

use LdapRecord\LdapRecordException;

class ParserException extends LdapRecordException {}
class ParserException extends LdapRecordException
{
}
4 changes: 3 additions & 1 deletion src/Query/MultipleObjectsFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

use LdapRecord\LdapRecordException;

class MultipleObjectsFoundException extends LdapRecordException {}
class MultipleObjectsFoundException extends LdapRecordException
{
}
4 changes: 3 additions & 1 deletion src/Query/ObjectsNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

use LdapRecord\LdapRecordException;

class ObjectsNotFoundException extends LdapRecordException {}
class ObjectsNotFoundException extends LdapRecordException
{
}
4 changes: 3 additions & 1 deletion src/Testing/AuthGuardFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ class AuthGuardFake extends Guard
/**
* Always allow binding as configured user.
*/
public function bindAsConfiguredUser(): void {}
public function bindAsConfiguredUser(): void
{
}
}
4 changes: 3 additions & 1 deletion src/Testing/LdapExpectationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

use Exception;

class LdapExpectationException extends Exception {}
class LdapExpectationException extends Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ public function test_detach_clears_users_primary_group_id()

class UserSaveModelStub extends User
{
public function save(array $attributes = []): void {}
public function save(array $attributes = []): void
{
}
}
8 changes: 6 additions & 2 deletions tests/Unit/Models/ActiveDirectory/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ public function test_correct_auth_identifier_is_returned()

class UserPasswordTestStub extends User
{
protected function assertSecureConnection(): void {}
protected function assertSecureConnection(): void
{
}
}

class NonUserPasswordTestStub extends Model {}
class NonUserPasswordTestStub extends Model
{
}
6 changes: 4 additions & 2 deletions tests/Unit/Models/ModelHasManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public function test_chunk()
return true;
}));

$relation->chunk(1000, function () {});
$relation->chunk(1000, function () {
});
}

public function test_recursive_chunk()
Expand Down Expand Up @@ -136,7 +137,8 @@ public function test_recursive_chunk()
return true;
}));

$relation->recursive()->chunk(1000, function () {});
$relation->recursive()->chunk(1000, function () {
});
}

public function test_page_size_can_be_set()
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Models/ModelScopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ protected static function boot(): void
{
parent::boot();

static::addGlobalScope('foo', function () {});
static::addGlobalScope('foo', function () {
});
static::addGlobalScope(new ScopeTestStub);
}

Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Models/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,9 @@ public function test_morph_into_with_custom_resolver_callback()

class ModelCreateTestStub extends Model
{
public function save(array $attributes = []): void {}
public function save(array $attributes = []): void
{
}
}

class ModelWithDatesStub extends Model
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Models/OpenLDAP/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ public function test_correct_auth_identifier_is_returned()

class OpenLDAPUserTestStub extends User
{
protected function assertSecureConnection(): void {}
protected function assertSecureConnection(): void
{
}
}
9 changes: 6 additions & 3 deletions tests/Unit/Query/Model/BuilderScopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public function test_scopes_can_be_removed_after_being_added()
{
$b = new Builder(new Connection);

$b->withGlobalScope('foo', function () {});
$b->withGlobalScope('foo', function () {
});

$b->withoutGlobalScope('foo');

Expand All @@ -53,8 +54,10 @@ public function test_many_scopes_can_be_removed_after_being_applied()
{
$b = new Builder(new Connection);

$b->withGlobalScope('foo', function () {});
$b->withGlobalScope('bar', function () {});
$b->withGlobalScope('foo', function () {
});
$b->withGlobalScope('bar', function () {
});

$b->withoutGlobalScopes(['foo', 'bar']);

Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Testing/ConnectionFakeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ public function testActingAsWithDn()
}
}

class ExtendedLdapFake extends LdapFake {}
class ExtendedLdapFake extends LdapFake
{
}

0 comments on commit bbccdfa

Please sign in to comment.