Skip to content

Commit 2d0ec09

Browse files
authored
Merge pull request #787 from datamweb/fix-style-code
chore: fix coding style error
2 parents b3515db + c0bf12e commit 2d0ec09

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

tests/Unit/FilterInCliTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use CodeIgniter\Shield\Filters\ChainAuth;
1111
use CodeIgniter\Shield\Filters\SessionAuth;
1212
use CodeIgniter\Shield\Filters\TokenAuth;
13-
use Generator;
1413
use Tests\Support\TestCase;
1514

1615
/**
@@ -19,7 +18,7 @@
1918
final class FilterInCliTest extends TestCase
2019
{
2120
/**
22-
* @dataProvider filterProvider
21+
* @dataProvider provideWhenInCliDoNothing
2322
*/
2423
public function testWhenInCliDoNothing(FilterInterface $filter): void
2524
{
@@ -31,7 +30,7 @@ public function testWhenInCliDoNothing(FilterInterface $filter): void
3130
$filter->before($clirequest);
3231
}
3332

34-
public static function filterProvider(): Generator
33+
public static function provideWhenInCliDoNothing(): iterable
3534
{
3635
yield from [
3736
[new AuthRates()],

tests/Unit/NothingPersonalValidatorTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function testFalseForSensibleMatch(): void
158158
*
159159
* $config->maxSimilarity = 50; is the highest setting where all tests pass.
160160
*
161-
* @dataProvider passwordProvider
161+
* @dataProvider provideIsNotPersonalFalsePositivesCaughtByIsNotSimilar
162162
*
163163
* @param mixed $password
164164
*/
@@ -180,7 +180,7 @@ public function testIsNotPersonalFalsePositivesCaughtByIsNotSimilar($password):
180180
$this->assertNotSame($isNotPersonal, $isNotSimilar);
181181
}
182182

183-
public static function passwordProvider(): array
183+
public static function provideIsNotPersonalFalsePositivesCaughtByIsNotSimilar(): iterable
184184
{
185185
return [
186186
['JoeTheCaptain'],
@@ -195,7 +195,7 @@ public static function passwordProvider(): array
195195
}
196196

197197
/**
198-
* @dataProvider firstLastNameProvider
198+
* @dataProvider provideConfigPersonalFieldsValues
199199
*
200200
* @param mixed $firstName
201201
* @param mixed $lastName
@@ -225,7 +225,7 @@ public function testConfigPersonalFieldsValues($firstName, $lastName, $expected)
225225
$this->assertSame($expected, $result->isOK());
226226
}
227227

228-
public static function firstLastNameProvider()
228+
public static function provideConfigPersonalFieldsValues(): iterable
229229
{
230230
return [
231231
[
@@ -247,7 +247,7 @@ public static function firstLastNameProvider()
247247
}
248248

249249
/**
250-
* @dataProvider maxSimilarityProvider
250+
* @dataProvider provideMaxSimilarityZeroTurnsOffSimilarityCalculation
251251
*
252252
* The calculated similarity of 'captnjoe' and 'CaptainJoe' is 88.89.
253253
* With $config->maxSimilarity = 66; the password should be rejected,
@@ -275,7 +275,7 @@ public function testMaxSimilarityZeroTurnsOffSimilarityCalculation($maxSimilarit
275275
$this->assertSame($expected, $result->isOK());
276276
}
277277

278-
public static function maxSimilarityProvider()
278+
public static function provideMaxSimilarityZeroTurnsOffSimilarityCalculation(): iterable
279279
{
280280
return [
281281
[
@@ -289,7 +289,7 @@ public static function maxSimilarityProvider()
289289
}
290290

291291
/**
292-
* @dataProvider badEmailsProvider
292+
* @dataProvider provideCheckPasswordWithBadEmail
293293
*/
294294
public function testCheckPasswordWithBadEmail(string $email, bool $expected): void
295295
{
@@ -308,7 +308,7 @@ public function testCheckPasswordWithBadEmail(string $email, bool $expected): vo
308308
$this->assertSame($expected, $result->isOK());
309309
}
310310

311-
public static function badEmailsProvider()
311+
public static function provideCheckPasswordWithBadEmail(): iterable
312312
{
313313
return [
314314
[

0 commit comments

Comments
 (0)