Skip to content

Commit 93ffd1d

Browse files
authored
Merge pull request #435 from datamweb/style-fix
style: fix code style
2 parents 6a8a7dc + 029e1e7 commit 93ffd1d

File tree

11 files changed

+15
-25
lines changed

11 files changed

+15
-25
lines changed

src/Authorization/Traits/Authorizable.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public function removeGroup(string ...$groups): self
7878
* so only those groups are valid for this user, removing
7979
* all groups not in this list.
8080
*
81-
* @throws AuthorizationException
82-
*
8381
* @return $this
82+
*
83+
* @throws AuthorizationException
8484
*/
8585
public function syncGroups(string ...$groups): self
8686
{
@@ -124,9 +124,9 @@ public function getPermissions(): ?array
124124
/**
125125
* Adds one or more permissions to the current user.
126126
*
127-
* @throws AuthorizationException
128-
*
129127
* @return $this
128+
*
129+
* @throws AuthorizationException
130130
*/
131131
public function addPermission(string ...$permissions): self
132132
{
@@ -187,9 +187,9 @@ public function removePermission(string ...$permissions): self
187187
* so only those permissions are valid for this user, removing
188188
* all permissions not in this list.
189189
*
190-
* @throws AuthorizationException
191-
*
192190
* @return $this
191+
*
192+
* @throws AuthorizationException
193193
*/
194194
public function syncPermissions(string ...$permissions): self
195195
{
@@ -342,7 +342,6 @@ private function savePermissions(): void
342342

343343
/**
344344
* @phpstan-param 'group'|'permission' $type
345-
*
346345
* @param GroupModel|PermissionModel $model
347346
*/
348347
private function saveGroupsOrPermissions(string $type, $model, array $cache): void

src/Config/Auth.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ class Auth extends BaseConfig
122122
* If no match is found, then the next in the chain will be checked.
123123
*
124124
* @var string[]
125-
*
126125
* @phpstan-var list<string>
127126
*/
128127
public array $authenticationChain = [
@@ -213,7 +212,7 @@ class Auth extends BaseConfig
213212
'CodeIgniter\Shield\Authentication\Passwords\CompositionValidator',
214213
'CodeIgniter\Shield\Authentication\Passwords\NothingPersonalValidator',
215214
'CodeIgniter\Shield\Authentication\Passwords\DictionaryValidator',
216-
//'CodeIgniter\Shield\Authentication\Passwords\PwnedValidator',
215+
// 'CodeIgniter\Shield\Authentication\Passwords\PwnedValidator',
217216
];
218217

219218
/**

src/Database/Migrations/2020-12-28-223112_create_auth_tables.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function up(): void
132132
$this->forge->createTable('auth_permissions_users');
133133
}
134134

135-
//--------------------------------------------------------------------
135+
// --------------------------------------------------------------------
136136

137137
public function down(): void
138138
{

src/Entities/Entity.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ abstract class Entity extends FrameworkEntity
1616
* Custom convert handlers
1717
*
1818
* @var array<string, string>
19-
*
2019
* @phpstan-var array<string, class-string>
2120
*/
2221
protected $castHandlers = [

src/Entities/User.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ class User extends Entity
3535

3636
/**
3737
* @var string[]
38-
*
3938
* @phpstan-var list<string>
40-
*
4139
* @psalm-var list<string>
4240
*/
4341
protected $dates = [

src/Entities/UserIdentity.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ class UserIdentity extends Entity
3535

3636
/**
3737
* @var string[]
38-
*
3938
* @phpstan-var list<string>
40-
*
4139
* @psalm-var list<string>
4240
*/
4341
protected $dates = [

src/Models/UserIdentityModel.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public function createEmailIdentity(User $user, array $credentials): void
7676
* Create an identity with 6 digits code for auth action
7777
*
7878
* @phpstan-param array{type: string, name: string, extra: string} $data
79-
*
8079
* @param callable $codeGenerator generate secret code
8180
*
8281
* @return string secret

src/Models/UserModel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ protected function fetchIdentities(array $data): array
9999
* @param UserIdentity[] $identities
100100
*
101101
* @return User[] UserId => User object
102-
*
103102
* @phpstan-return array<int|string, User> UserId => User object
104103
*/
105104
private function assignIdentities(array $data, array $identities): array
@@ -220,9 +219,9 @@ public function activate(User $user): void
220219
*
221220
* @param array|User $data
222221
*
223-
* @throws ValidationException
224-
*
225222
* @return int|string|true Insert ID if $returnID is true
223+
*
224+
* @throws ValidationException
226225
*/
227226
public function insert($data = null, bool $returnID = true)
228227
{

src/Result.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class Result
2626

2727
/**
2828
* @phpstan-param array{success: bool, reason?: string|null, extraInfo?: string|User} $details
29-
*
3029
* @psalm-param array{success: bool, reason?: string|null, extraInfo?: string|User} $details
3130
*/
3231
public function __construct(array $details)

tests/Language/AbstractTranslationTestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ abstract class AbstractTranslationTestCase extends TestCase
9191
*/
9292
protected array $excludedLocaleKeyTranslations = [];
9393

94-
//-------------------------------------------------------------------------
94+
// -------------------------------------------------------------------------
9595
// TESTS
96-
//-------------------------------------------------------------------------
96+
// -------------------------------------------------------------------------
9797

9898
/**
9999
* This tests that all language files configured in the main CI4 repository
@@ -328,9 +328,9 @@ final public function testLocaleHasCorrespondingTestCaseFile(string $locale): vo
328328
));
329329
}
330330

331-
//-------------------------------------------------------------------------
331+
// -------------------------------------------------------------------------
332332
// UTILITIES
333-
//-------------------------------------------------------------------------
333+
// -------------------------------------------------------------------------
334334

335335
/**
336336
* Get all the ISO 639-1 and 639-2 locale codes.

0 commit comments

Comments
 (0)