mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
[Rector] Apply PrivatizeFinalClassPropertyRector
This commit is contained in:
parent
39679705dc
commit
4fef2bc5af
@ -43,6 +43,7 @@ use Rector\Php71\Rector\FuncCall\CountOnNullRector;
|
||||
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
|
||||
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
|
||||
use Rector\PHPUnit\Set\PHPUnitSetList;
|
||||
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
|
||||
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
@ -162,6 +163,7 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
'stdClass',
|
||||
'SQLite3',
|
||||
]);
|
||||
$rectorConfig->rule(PrivatizeFinalClassPropertyRector::class);
|
||||
|
||||
$parameters = $rectorConfig->parameters();
|
||||
$parameters->set(Option::PARALLEL_TIMEOUT_IN_SECONDS, 180);
|
||||
|
@ -27,9 +27,9 @@ use stdClass;
|
||||
*/
|
||||
final class ResponseTraitTest extends CIUnitTestCase
|
||||
{
|
||||
protected $request;
|
||||
protected $response;
|
||||
protected ?FormatterInterface $formatter = null;
|
||||
private $request;
|
||||
private $response;
|
||||
private ?FormatterInterface $formatter = null;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -23,8 +23,8 @@ use UnnamespacedClass;
|
||||
*/
|
||||
final class AutoloaderTest extends CIUnitTestCase
|
||||
{
|
||||
protected Autoloader $loader;
|
||||
protected string $filesPath = SUPPORTPATH . 'Autoloader/';
|
||||
private Autoloader $loader;
|
||||
private string $filesPath = SUPPORTPATH . 'Autoloader/';
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ use Config\Modules;
|
||||
*/
|
||||
final class FileLocatorTest extends CIUnitTestCase
|
||||
{
|
||||
protected FileLocator $locator;
|
||||
private FileLocator $locator;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ use Tests\Support\Filters\Customfilter;
|
||||
*/
|
||||
final class CodeIgniterTest extends CIUnitTestCase
|
||||
{
|
||||
protected CodeIgniter $codeigniter;
|
||||
private CodeIgniter $codeigniter;
|
||||
protected $routes;
|
||||
|
||||
protected function setUp(): void
|
||||
|
@ -21,8 +21,8 @@ use Tests\Support\Commands\AppInfo;
|
||||
*/
|
||||
final class BaseCommandTest extends CIUnitTestCase
|
||||
{
|
||||
protected $logger;
|
||||
protected $runner;
|
||||
private $logger;
|
||||
private $runner;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Config\Services;
|
||||
*/
|
||||
final class ClearCacheTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,8 +19,8 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class ClearDebugbarTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
protected $time;
|
||||
private $streamFilter;
|
||||
private $time;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,8 +19,8 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class ClearLogsTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
protected $date;
|
||||
private $streamFilter;
|
||||
private $date;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class CommandGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -22,8 +22,8 @@ use Tests\Support\Commands\ParamsReveal;
|
||||
final class CommandTest extends CIUnitTestCase
|
||||
{
|
||||
private $streamFilter;
|
||||
protected $logger;
|
||||
protected $commands;
|
||||
private $logger;
|
||||
private $commands;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class ConfigGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class ConfigurableSortImportsTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class ControllerGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -24,8 +24,8 @@ use Config\Database;
|
||||
*/
|
||||
final class CreateDatabaseTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
protected BaseConnection $connection;
|
||||
private $streamFilter;
|
||||
private BaseConnection $connection;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class DatabaseCommandsTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class EntityGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class FilterGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class GeneratorsTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Config\Services;
|
||||
*/
|
||||
final class InfoCacheTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class MigrationGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,8 +21,8 @@ use Config\Services;
|
||||
final class RoutesTest extends CIUnitTestCase
|
||||
{
|
||||
private $streamFilter;
|
||||
protected $logger;
|
||||
protected $commands;
|
||||
private $logger;
|
||||
private $commands;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ use Config\Services;
|
||||
*/
|
||||
final class ScaffoldGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class SeederGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\Filters\CITestStreamFilter;
|
||||
*/
|
||||
final class ValidationGeneratorTest extends CIUnitTestCase
|
||||
{
|
||||
protected $streamFilter;
|
||||
private $streamFilter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ use Tests\Support\Config\TestRegistrar;
|
||||
*/
|
||||
final class BaseConfigTest extends CIUnitTestCase
|
||||
{
|
||||
protected $fixturesFolder;
|
||||
private $fixturesFolder;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use org\bovigo\vfs\vfsStream;
|
||||
*/
|
||||
final class DotEnvTest extends CIUnitTestCase
|
||||
{
|
||||
protected $fixturesFolder;
|
||||
private $fixturesFolder;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -51,8 +51,8 @@ use Tests\Support\Config\Services;
|
||||
*/
|
||||
final class ServicesTest extends CIUnitTestCase
|
||||
{
|
||||
protected $config;
|
||||
protected $original;
|
||||
private $config;
|
||||
private $original;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -33,24 +33,24 @@ use Psr\Log\LoggerInterface;
|
||||
*/
|
||||
final class ControllerTest extends CIUnitTestCase
|
||||
{
|
||||
protected CodeIgniter $codeigniter;
|
||||
private CodeIgniter $codeigniter;
|
||||
|
||||
/**
|
||||
* @var Controller
|
||||
*/
|
||||
protected $controller;
|
||||
private $controller;
|
||||
|
||||
/**
|
||||
* Current request.
|
||||
*/
|
||||
protected Request $request;
|
||||
private Request $request;
|
||||
|
||||
/**
|
||||
* Current response.
|
||||
*/
|
||||
protected Response $response;
|
||||
private Response $response;
|
||||
|
||||
protected LoggerInterface $logger;
|
||||
private LoggerInterface $logger;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Throwable;
|
||||
*/
|
||||
final class BaseConnectionTest extends CIUnitTestCase
|
||||
{
|
||||
protected array $options = [
|
||||
private array $options = [
|
||||
'DSN' => '',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'first',
|
||||
@ -39,7 +39,7 @@ final class BaseConnectionTest extends CIUnitTestCase
|
||||
'strictOn' => true,
|
||||
'failover' => [],
|
||||
];
|
||||
protected array $failoverOptions = [
|
||||
private array $failoverOptions = [
|
||||
'DSN' => '',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'failover',
|
||||
|
@ -21,7 +21,7 @@ final class ConfigTest extends CIUnitTestCase
|
||||
{
|
||||
use ReflectionHelper;
|
||||
|
||||
protected array $group = [
|
||||
private array $group = [
|
||||
'DSN' => '',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'first',
|
||||
@ -40,7 +40,7 @@ final class ConfigTest extends CIUnitTestCase
|
||||
'failover' => [],
|
||||
'port' => 3306,
|
||||
];
|
||||
protected array $dsnGroup = [
|
||||
private array $dsnGroup = [
|
||||
'DSN' => 'MySQLi://user:pass@localhost:3306/dbname?DBPrefix=test_&pConnect=true&charset=latin1&DBCollat=latin1_swedish_ci',
|
||||
'hostname' => '',
|
||||
'username' => '',
|
||||
@ -59,7 +59,7 @@ final class ConfigTest extends CIUnitTestCase
|
||||
'failover' => [],
|
||||
'port' => 3306,
|
||||
];
|
||||
protected array $dsnGroupPostgre = [
|
||||
private array $dsnGroupPostgre = [
|
||||
'DSN' => 'Postgre://user:pass@localhost:5432/dbname?DBPrefix=test_&connect_timeout=5&sslmode=1',
|
||||
'hostname' => '',
|
||||
'username' => '',
|
||||
@ -78,7 +78,7 @@ final class ConfigTest extends CIUnitTestCase
|
||||
'failover' => [],
|
||||
'port' => 5432,
|
||||
];
|
||||
protected array $dsnGroupPostgreNative = [
|
||||
private array $dsnGroupPostgreNative = [
|
||||
'DSN' => 'pgsql:host=localhost;port=5432;dbname=database_name',
|
||||
'hostname' => '',
|
||||
'username' => '',
|
||||
|
@ -26,7 +26,7 @@ final class DatabaseTestCaseTest extends CIUnitTestCase
|
||||
{
|
||||
use DatabaseTestTrait;
|
||||
|
||||
protected static bool $loaded = false;
|
||||
private static bool $loaded = false;
|
||||
|
||||
/**
|
||||
* Should the db be refreshed before
|
||||
|
@ -27,7 +27,7 @@ final class BadQueryTest extends CIUnitTestCase
|
||||
|
||||
protected $refresh = true;
|
||||
protected $seed = CITestSeeder::class;
|
||||
protected static $origDebug;
|
||||
private static $origDebug;
|
||||
|
||||
/**
|
||||
* This test must run first to store the inital debug value before we tinker with it below
|
||||
|
@ -26,9 +26,9 @@ final class ConnectTest extends CIUnitTestCase
|
||||
{
|
||||
use DatabaseTestTrait;
|
||||
|
||||
protected $group1;
|
||||
protected $group2;
|
||||
protected $tests;
|
||||
private $group1;
|
||||
private $group2;
|
||||
private $tests;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ final class DbUtilsTest extends CIUnitTestCase
|
||||
|
||||
protected $refresh = true;
|
||||
protected $seed = CITestSeeder::class;
|
||||
protected static $origDebug;
|
||||
private static $origDebug;
|
||||
|
||||
/**
|
||||
* This test must run first to store the inital debug value before we tinker with it below
|
||||
|
@ -24,7 +24,7 @@ final class EscapeTest extends CIUnitTestCase
|
||||
use DatabaseTestTrait;
|
||||
|
||||
protected $refresh = false;
|
||||
protected $char;
|
||||
private $char;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ final class ForgeTest extends CIUnitTestCase
|
||||
|
||||
protected $refresh = true;
|
||||
protected $seed = CITestSeeder::class;
|
||||
protected Forge $forge;
|
||||
private Forge $forge;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ final class MetadataTest extends CIUnitTestCase
|
||||
/**
|
||||
* Array of expected tables.
|
||||
*/
|
||||
protected array $expectedTables;
|
||||
private array $expectedTables;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -35,14 +35,14 @@ final class AlterTableTest extends CIUnitTestCase
|
||||
*/
|
||||
protected $migrate = false;
|
||||
|
||||
protected Table $table;
|
||||
private Table $table;
|
||||
|
||||
/**
|
||||
* @var Connection
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
protected Forge $forge;
|
||||
private Forge $forge;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -39,9 +39,9 @@ final class MigrationRunnerTest extends CIUnitTestCase
|
||||
|
||||
// Use specific migration files for this test case.
|
||||
protected $namespace = 'Tests\Support\MigrationTestMigrations';
|
||||
protected $root;
|
||||
protected $start;
|
||||
protected $config;
|
||||
private $root;
|
||||
private $start;
|
||||
private $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Config\Services;
|
||||
*/
|
||||
final class EncryptionTest extends CIUnitTestCase
|
||||
{
|
||||
protected Encryption $encryption;
|
||||
private Encryption $encryption;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Config\Encryption as EncryptionConfig;
|
||||
*/
|
||||
final class OpenSSLHandlerTest extends CIUnitTestCase
|
||||
{
|
||||
protected Encryption $encryption;
|
||||
private Encryption $encryption;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,8 +21,8 @@ use Config\Encryption as EncryptionConfig;
|
||||
*/
|
||||
final class SodiumHandlerTest extends CIUnitTestCase
|
||||
{
|
||||
protected Encryption $encryption;
|
||||
protected EncryptionConfig $config;
|
||||
private Encryption $encryption;
|
||||
private EncryptionConfig $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ final class EventsTest extends CIUnitTestCase
|
||||
/**
|
||||
* Accessible event manager instance
|
||||
*/
|
||||
protected MockEvents $manager;
|
||||
private MockEvents $manager;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -20,10 +20,10 @@ use org\bovigo\vfs\vfsStream;
|
||||
final class FileWithVfsTest extends CIUnitTestCase
|
||||
{
|
||||
// For VFS stuff
|
||||
protected $root;
|
||||
protected $path;
|
||||
protected $start;
|
||||
protected File $file;
|
||||
private $root;
|
||||
private $path;
|
||||
private $start;
|
||||
private File $file;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,9 +21,9 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class CSRFTest extends CIUnitTestCase
|
||||
{
|
||||
protected $config;
|
||||
protected $request;
|
||||
protected $response;
|
||||
private $config;
|
||||
private $request;
|
||||
private $response;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -22,8 +22,8 @@ use Config\Filters as FilterConfig;
|
||||
*/
|
||||
final class DebugToolbarTest extends CIUnitTestCase
|
||||
{
|
||||
protected $request;
|
||||
protected $response;
|
||||
private $request;
|
||||
private $response;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -23,10 +23,10 @@ use Config\Honeypot;
|
||||
*/
|
||||
final class HoneypotTest extends CIUnitTestCase
|
||||
{
|
||||
protected $config;
|
||||
protected $honey;
|
||||
protected $request;
|
||||
protected $response;
|
||||
private $config;
|
||||
private $honey;
|
||||
private $request;
|
||||
private $response;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,8 +19,8 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class SecureHeadersTest extends CIUnitTestCase
|
||||
{
|
||||
protected $request;
|
||||
protected $response;
|
||||
private $request;
|
||||
private $response;
|
||||
|
||||
public function testAfter()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class FormatTest extends CIUnitTestCase
|
||||
{
|
||||
protected Format $format;
|
||||
private Format $format;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use RuntimeException;
|
||||
*/
|
||||
final class JSONFormatterTest extends CIUnitTestCase
|
||||
{
|
||||
protected $jsonFormatter;
|
||||
private $jsonFormatter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use DOMDocument;
|
||||
*/
|
||||
final class XMLFormatterTest extends CIUnitTestCase
|
||||
{
|
||||
protected $xmlFormatter;
|
||||
private $xmlFormatter;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ use Config\App;
|
||||
*/
|
||||
final class CLIRequestTest extends CIUnitTestCase
|
||||
{
|
||||
protected CLIRequest $request;
|
||||
private CLIRequest $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ use CURLFile;
|
||||
*/
|
||||
final class CURLRequestDoNotShareOptionsTest extends CIUnitTestCase
|
||||
{
|
||||
protected MockCURLRequest $request;
|
||||
private MockCURLRequest $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ use CURLFile;
|
||||
*/
|
||||
final class CURLRequestTest extends CIUnitTestCase
|
||||
{
|
||||
protected MockCURLRequest $request;
|
||||
private MockCURLRequest $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Config\App;
|
||||
*/
|
||||
final class IncomingRequestDetectingTest extends CIUnitTestCase
|
||||
{
|
||||
protected IncomingRequest $request;
|
||||
private IncomingRequest $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ use Config\App;
|
||||
*/
|
||||
final class IncomingRequestTest extends CIUnitTestCase
|
||||
{
|
||||
protected Request $request;
|
||||
private Request $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class MessageTest extends CIUnitTestCase
|
||||
{
|
||||
protected ?Message $message;
|
||||
private ?Message $message;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -20,8 +20,8 @@ use Config\App;
|
||||
*/
|
||||
final class NegotiateTest extends CIUnitTestCase
|
||||
{
|
||||
protected ?Request $request;
|
||||
protected ?Negotiate $negotiate;
|
||||
private ?Request $request;
|
||||
private ?Negotiate $negotiate;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -31,8 +31,8 @@ final class RedirectResponseTest extends CIUnitTestCase
|
||||
*/
|
||||
protected $routes;
|
||||
|
||||
protected $request;
|
||||
protected $config;
|
||||
private $request;
|
||||
private $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ use Config\App;
|
||||
*/
|
||||
final class RequestTest extends CIUnitTestCase
|
||||
{
|
||||
protected Request $request;
|
||||
private Request $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ use DateTimeZone;
|
||||
*/
|
||||
final class ResponseTest extends CIUnitTestCase
|
||||
{
|
||||
protected $server;
|
||||
private $server;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -18,9 +18,9 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class UserAgentTest extends CIUnitTestCase
|
||||
{
|
||||
protected string $_user_agent = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27';
|
||||
protected string $_mobile_ua = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7';
|
||||
protected UserAgent $agent;
|
||||
private string $_user_agent = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27';
|
||||
private string $_mobile_ua = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7';
|
||||
private UserAgent $agent;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -23,10 +23,10 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class HoneypotTest extends CIUnitTestCase
|
||||
{
|
||||
protected $config;
|
||||
protected $honeypot;
|
||||
protected $request;
|
||||
protected $response;
|
||||
private $config;
|
||||
private $honeypot;
|
||||
private $request;
|
||||
private $response;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ use org\bovigo\vfs\vfsStream;
|
||||
*/
|
||||
final class ImageTest extends CIUnitTestCase
|
||||
{
|
||||
protected string $path = 'tests/_support/ci-logo.png';
|
||||
private string $path = 'tests/_support/ci-logo.png';
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class PagerRendererTest extends CIUnitTestCase
|
||||
{
|
||||
protected URI $uri;
|
||||
private URI $uri;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -28,8 +28,8 @@ use Config\Services;
|
||||
*/
|
||||
final class PagerTest extends CIUnitTestCase
|
||||
{
|
||||
protected ?\CodeIgniter\Pager\Pager $pager = null;
|
||||
protected $config;
|
||||
private ?\CodeIgniter\Pager\Pager $pager = null;
|
||||
private $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ use Tests\Support\RESTful\Worker;
|
||||
*/
|
||||
final class ResourceControllerTest extends CIUnitTestCase
|
||||
{
|
||||
protected CodeIgniter $codeigniter;
|
||||
private CodeIgniter $codeigniter;
|
||||
|
||||
/**
|
||||
* @var RouteCollection
|
||||
|
@ -36,7 +36,7 @@ use Tests\Support\RESTful\Worker2;
|
||||
*/
|
||||
final class ResourcePresenterTest extends CIUnitTestCase
|
||||
{
|
||||
protected CodeIgniter $codeigniter;
|
||||
private CodeIgniter $codeigniter;
|
||||
|
||||
/**
|
||||
* @var RouteCollection
|
||||
|
@ -25,16 +25,16 @@ use Tests\Support\Filters\Customfilter;
|
||||
*/
|
||||
final class RouterTest extends CIUnitTestCase
|
||||
{
|
||||
protected RouteCollection $collection;
|
||||
private RouteCollection $collection;
|
||||
|
||||
/**
|
||||
* vfsStream root directory
|
||||
*
|
||||
* @var
|
||||
*/
|
||||
protected $root;
|
||||
private $root;
|
||||
|
||||
protected IncomingRequest $request;
|
||||
private IncomingRequest $request;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ final class FabricatorTest extends CIUnitTestCase
|
||||
/**
|
||||
* Default formatters to use for UserModel. Should match detected version.
|
||||
*/
|
||||
protected array $formatters = [
|
||||
private array $formatters = [
|
||||
'name' => 'name',
|
||||
'email' => 'email',
|
||||
'country' => 'country',
|
||||
|
@ -23,12 +23,12 @@ use PHPUnit\Framework\AssertionFailedError;
|
||||
*/
|
||||
final class TestResponseTest extends CIUnitTestCase
|
||||
{
|
||||
protected ?TestResponse $testResponse = null;
|
||||
private ?TestResponse $testResponse = null;
|
||||
|
||||
/**
|
||||
* @var ResponseInterface
|
||||
*/
|
||||
protected $response;
|
||||
private $response;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
*/
|
||||
final class TypographyTest extends CIUnitTestCase
|
||||
{
|
||||
protected $typography;
|
||||
private $typography;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -21,8 +21,8 @@ use CodeIgniter\View\Exceptions\ViewException;
|
||||
*/
|
||||
final class CellTest extends CIUnitTestCase
|
||||
{
|
||||
protected $cache;
|
||||
protected Cell $cell;
|
||||
private $cache;
|
||||
private Cell $cell;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -23,9 +23,9 @@ use Tests\Support\View\WorldDecorator;
|
||||
*/
|
||||
final class DecoratorsTest extends CIUnitTestCase
|
||||
{
|
||||
protected $loader;
|
||||
protected $viewsDir;
|
||||
protected $config;
|
||||
private $loader;
|
||||
private $viewsDir;
|
||||
private $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -20,9 +20,9 @@ use Config\View;
|
||||
*/
|
||||
final class ParserFilterTest extends CIUnitTestCase
|
||||
{
|
||||
protected $loader;
|
||||
protected $viewsDir;
|
||||
protected $config;
|
||||
private $loader;
|
||||
private $viewsDir;
|
||||
private $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -20,8 +20,8 @@ use Config\Services;
|
||||
*/
|
||||
final class ParserPluginTest extends CIUnitTestCase
|
||||
{
|
||||
protected Parser $parser;
|
||||
protected Validation $validator;
|
||||
private Parser $parser;
|
||||
private Validation $validator;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -22,9 +22,9 @@ use RuntimeException;
|
||||
*/
|
||||
final class ViewTest extends CIUnitTestCase
|
||||
{
|
||||
protected $loader;
|
||||
protected $viewsDir;
|
||||
protected $config;
|
||||
private $loader;
|
||||
private $viewsDir;
|
||||
private $config;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user