Skip to content

Commit 917597d

Browse files
committed
refactor: run rector
1 parent 22eba04 commit 917597d

18 files changed

+182
-0
lines changed

tests/system/CLI/ConsoleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
*/
2525
final class ConsoleTest extends CIUnitTestCase
2626
{
27+
/**
28+
* @var DotEnv|mixed
29+
*/
30+
public $env;
31+
2732
private $stream_filter;
2833

2934
protected function setUp(): void

tests/system/CommonFunctionsTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@
4343
*/
4444
final class CommonFunctionsTest extends CIUnitTestCase
4545
{
46+
/**
47+
* @var App|mixed
48+
*/
49+
public $config;
50+
51+
public MockIncomingRequest $request;
52+
4653
protected function setUp(): void
4754
{
4855
unset($_ENV['foo'], $_SERVER['foo']);

tests/system/Config/DotEnvTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use CodeIgniter\Test\CIUnitTestCase;
1515
use org\bovigo\vfs\vfsStream;
16+
use org\bovigo\vfs\vfsStreamDirectory;
1617

1718
/**
1819
* @backupGlobals enabled
@@ -23,6 +24,12 @@
2324
*/
2425
final class DotEnvTest extends CIUnitTestCase
2526
{
27+
/**
28+
* @var mixed|vfsStreamDirectory|null
29+
*/
30+
public $root;
31+
32+
public string $path;
2633
private $fixturesFolder;
2734

2835
protected function setUp(): void

tests/system/ControllerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
*/
3434
final class ControllerTest extends CIUnitTestCase
3535
{
36+
/**
37+
* @var App|mixed
38+
*/
39+
public $config;
40+
3641
/**
3742
* @var Controller
3843
*/

tests/system/Database/Live/MetadataTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace CodeIgniter\Database\Live;
1313

14+
use CodeIgniter\Database\Forge;
1415
use CodeIgniter\Test\CIUnitTestCase;
1516
use CodeIgniter\Test\DatabaseTestTrait;
1617
use Config\Database;
@@ -25,6 +26,11 @@ final class MetadataTest extends CIUnitTestCase
2526
{
2627
use DatabaseTestTrait;
2728

29+
/**
30+
* @var Forge|mixed
31+
*/
32+
public $forge;
33+
2834
protected $refresh = true;
2935
protected $seed = CITestSeeder::class;
3036

tests/system/HTTP/ContentSecurityPolicyTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727
*/
2828
final class ContentSecurityPolicyTest extends CIUnitTestCase
2929
{
30+
/**
31+
* @var mixed|Response
32+
*/
33+
public $response;
34+
35+
/**
36+
* @var \CodeIgniter\HTTP\ContentSecurityPolicy|mixed
37+
*/
38+
public $csp;
39+
3040
// Having this method as setUp() doesn't work - can't find Config\App !?
3141
protected function prepare(bool $CSPEnabled = true)
3242
{

tests/system/HTTP/Files/FileMovingTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,30 @@
1414
use CodeIgniter\HTTP\Exceptions\HTTPException;
1515
use CodeIgniter\Test\CIUnitTestCase;
1616
use org\bovigo\vfs\vfsStream;
17+
use org\bovigo\vfs\vfsStreamDirectory;
1718

1819
/**
1920
* @internal
2021
*/
2122
final class FileMovingTest extends CIUnitTestCase
2223
{
24+
/**
25+
* @var mixed|vfsStreamDirectory|null
26+
*/
27+
public $root;
28+
29+
public string $path;
30+
31+
/**
32+
* @var mixed|string
33+
*/
34+
public $start;
35+
36+
/**
37+
* @var mixed|string
38+
*/
39+
public $destination;
40+
2341
protected function setUp(): void
2442
{
2543
parent::setUp();

tests/system/Helpers/CookieHelperTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
final class CookieHelperTest extends CIUnitTestCase
3030
{
31+
public IncomingRequest $request;
3132
private $name;
3233
private string $value;
3334
private int $expire;

tests/system/Helpers/FilesystemHelperTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*/
2121
final class FilesystemHelperTest extends CIUnitTestCase
2222
{
23+
/**
24+
* @var array<string, array<string, mixed[]>>|array<string, array<string, string>>|array<string, mixed>|array<string, mixed[]>|array<string, string>|mixed
25+
*/
26+
public $structure;
27+
2328
protected function setUp(): void
2429
{
2530
parent::setUp();

tests/system/Images/BaseHandlerTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use CodeIgniter\Images\Handlers\BaseHandler;
1818
use CodeIgniter\Test\CIUnitTestCase;
1919
use org\bovigo\vfs\vfsStream;
20+
use org\bovigo\vfs\vfsStreamDirectory;
2021

2122
/**
2223
* Test the common image processing functionality.
@@ -30,6 +31,26 @@
3031
*/
3132
final class BaseHandlerTest extends CIUnitTestCase
3233
{
34+
/**
35+
* @var mixed|vfsStreamDirectory
36+
*/
37+
public $root;
38+
39+
/**
40+
* @var mixed|string
41+
*/
42+
public $origin;
43+
44+
/**
45+
* @var mixed|string
46+
*/
47+
public $start;
48+
49+
/**
50+
* @var mixed|string
51+
*/
52+
public $path;
53+
3354
protected function setUp(): void
3455
{
3556
if (! extension_loaded('gd')) {

0 commit comments

Comments
 (0)