Skip to content

Commit

Permalink
Merge pull request #787 from datamweb/fix-style-code
Browse files Browse the repository at this point in the history
chore: fix coding style error
  • Loading branch information
kenjis authored Aug 15, 2023
2 parents b3515db + c0bf12e commit 2d0ec09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions tests/Unit/FilterInCliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use CodeIgniter\Shield\Filters\ChainAuth;
use CodeIgniter\Shield\Filters\SessionAuth;
use CodeIgniter\Shield\Filters\TokenAuth;
use Generator;
use Tests\Support\TestCase;

/**
Expand All @@ -19,7 +18,7 @@
final class FilterInCliTest extends TestCase
{
/**
* @dataProvider filterProvider
* @dataProvider provideWhenInCliDoNothing
*/
public function testWhenInCliDoNothing(FilterInterface $filter): void
{
Expand All @@ -31,7 +30,7 @@ public function testWhenInCliDoNothing(FilterInterface $filter): void
$filter->before($clirequest);
}

public static function filterProvider(): Generator
public static function provideWhenInCliDoNothing(): iterable
{
yield from [
[new AuthRates()],
Expand Down
16 changes: 8 additions & 8 deletions tests/Unit/NothingPersonalValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function testFalseForSensibleMatch(): void
*
* $config->maxSimilarity = 50; is the highest setting where all tests pass.
*
* @dataProvider passwordProvider
* @dataProvider provideIsNotPersonalFalsePositivesCaughtByIsNotSimilar
*
* @param mixed $password
*/
Expand All @@ -180,7 +180,7 @@ public function testIsNotPersonalFalsePositivesCaughtByIsNotSimilar($password):
$this->assertNotSame($isNotPersonal, $isNotSimilar);
}

public static function passwordProvider(): array
public static function provideIsNotPersonalFalsePositivesCaughtByIsNotSimilar(): iterable
{
return [
['JoeTheCaptain'],
Expand All @@ -195,7 +195,7 @@ public static function passwordProvider(): array
}

/**
* @dataProvider firstLastNameProvider
* @dataProvider provideConfigPersonalFieldsValues
*
* @param mixed $firstName
* @param mixed $lastName
Expand Down Expand Up @@ -225,7 +225,7 @@ public function testConfigPersonalFieldsValues($firstName, $lastName, $expected)
$this->assertSame($expected, $result->isOK());
}

public static function firstLastNameProvider()
public static function provideConfigPersonalFieldsValues(): iterable
{
return [
[
Expand All @@ -247,7 +247,7 @@ public static function firstLastNameProvider()
}

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

public static function maxSimilarityProvider()
public static function provideMaxSimilarityZeroTurnsOffSimilarityCalculation(): iterable
{
return [
[
Expand All @@ -289,7 +289,7 @@ public static function maxSimilarityProvider()
}

/**
* @dataProvider badEmailsProvider
* @dataProvider provideCheckPasswordWithBadEmail
*/
public function testCheckPasswordWithBadEmail(string $email, bool $expected): void
{
Expand All @@ -308,7 +308,7 @@ public function testCheckPasswordWithBadEmail(string $email, bool $expected): vo
$this->assertSame($expected, $result->isOK());
}

public static function badEmailsProvider()
public static function provideCheckPasswordWithBadEmail(): iterable
{
return [
[
Expand Down

0 comments on commit 2d0ec09

Please sign in to comment.