Skip to content

Commit d2d7412

Browse files
committed
Fix styles
1 parent 8db3be9 commit d2d7412

File tree

4 files changed

+38
-39
lines changed

4 files changed

+38
-39
lines changed

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
SetList::DEAD_CODE,
4646
LevelSetList::UP_TO_PHP_74,
4747
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
48-
//PHPUnitSetList::PHPUNIT_100,
48+
// PHPUnitSetList::PHPUNIT_100,
4949
]);
5050

5151
$rectorConfig->parallel();

tests/EntityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
final class EntityTest extends TestCase
1010
{
1111
/**
12-
* @dataProvider ipAddressProvider
12+
* @dataProvider provideIpAddressCasts
1313
*
1414
* @param mixed $input
1515
*/
@@ -25,7 +25,7 @@ public function testIpAddressCasts($input, ?int $stored, ?string $retrieved): vo
2525
$this->assertSame($retrieved, $result);
2626
}
2727

28-
public function ipAddressProvider(): array
28+
public static function provideIpAddressCasts(): iterable
2929
{
3030
return [
3131
['127.0.0.1', 2_130_706_433, '127.0.0.1'],

tests/FilterTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -176,28 +176,28 @@ public function testShortCircuitsTransformers(): void
176176
$this->seeNumRecords(0, 'visits', []);
177177
}
178178

179-
/*
180-
Temporarily disabled because request handling doesn't work like this anymore
179+
/*
180+
Temporarily disabled because request handling doesn't work like this anymore
181181
182-
public function testRequiresIncomingRequest(): void
183-
{
184-
$this->expectException(RuntimeException::class);
185-
$this->expectExceptionMessage(VisitsFilter::class . ' requires an IncomingRequest object.');
182+
public function testRequiresIncomingRequest(): void
183+
{
184+
$this->expectException(RuntimeException::class);
185+
$this->expectExceptionMessage(VisitsFilter::class . ' requires an IncomingRequest object.');
186186
187-
$this->request = service('clirequest');
187+
$this->request = service('clirequest');
188188
189-
$this->call();
190-
}
189+
$this->call();
190+
}
191191
192-
// Temporarily disabled because config injection isn't working anymore
193-
public function testRequiresValidVisit(): void
194-
{
195-
$this->expectException(RuntimeException::class);
196-
$this->expectExceptionMessage('Failed to create visit record: The host field is required.');
192+
// Temporarily disabled because config injection isn't working anymore
193+
public function testRequiresValidVisit(): void
194+
{
195+
$this->expectException(RuntimeException::class);
196+
$this->expectExceptionMessage('Failed to create visit record: The host field is required.');
197197
198-
config('App')->baseURL = '0';
198+
config('App')->baseURL = '0';
199199
200-
$this->call();
201-
}
202-
*/
200+
$this->call();
201+
}
202+
*/
203203
}

tests/ModelTest.php

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
use CodeIgniter\Config\Services;
43
use CodeIgniter\Test\DatabaseTestTrait;
54
use Tatter\Visits\Entities\Visit;
65
use Tatter\Visits\Models\VisitModel;
@@ -23,7 +22,7 @@ protected function setUp(): void
2322
}
2423

2524
/**
26-
* @dataProvider findSimilarNullProvider
25+
* @dataProvider provideFindSimilarNull
2726
*/
2827
public function testFindSimilarNull(string $field): void
2928
{
@@ -39,7 +38,7 @@ public function testFindSimilarNull(string $field): void
3938
$this->assertNull($result);
4039
}
4140

42-
public function findSimilarNullProvider(): array
41+
public static function provideFindSimilarNull(): iterable
4342
{
4443
return [
4544
['host'],
@@ -94,26 +93,26 @@ public function testMakeFromRequestUsesUserId(): void
9493
$this->assertSame(42, $result->user_id);
9594
}
9695

97-
/*
98-
Temporarily disabled because config injection isn't working anymore
96+
/*
97+
Temporarily disabled because config injection isn't working anymore
9998
100-
public function testMakeFromRequestRespectsBaseUrl(): void
101-
{
102-
$config = config('App');
99+
public function testMakeFromRequestRespectsBaseUrl(): void
100+
{
101+
$config = config('App');
103102
104-
$config->baseURL = 'http://foo.bar/folder/';
105-
$config->indexPage = '';
103+
$config->baseURL = 'http://foo.bar/folder/';
104+
$config->indexPage = '';
106105
107-
$request = service('request', $config)->setPath('fruits/banana#ripe');
106+
$request = service('request', $config)->setPath('fruits/banana#ripe');
108107
109-
$result = $this->model->makeFromRequest($request);
108+
$result = $this->model->makeFromRequest($request);
110109
111-
$this->assertSame('http', $result->scheme);
112-
$this->assertSame('foo.bar', $result->host);
113-
$this->assertSame('/folder/fruits/banana', $result->path);
114-
$this->assertSame('ripe', $result->fragment);
115-
}
116-
*/
110+
$this->assertSame('http', $result->scheme);
111+
$this->assertSame('foo.bar', $result->host);
112+
$this->assertSame('/folder/fruits/banana', $result->path);
113+
$this->assertSame('ripe', $result->fragment);
114+
}
115+
*/
117116

118117
public function testMakeFromRequestIgnoresPass(): void
119118
{

0 commit comments

Comments
 (0)