Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\ConstructClassMethodToSetUpTestCaseRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
use Rector\Set\ValueObject\LevelSetList;
Expand All @@ -51,9 +53,8 @@
$rectorConfig->sets([
SetList::DEAD_CODE,
LevelSetList::UP_TO_PHP_74,
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
PHPUnitSetList::PHPUNIT_80,
PHPUnitSetList::REMOVE_MOCKS,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_100,
]);

$rectorConfig->parallel(240, 8, 1);
Expand All @@ -77,12 +78,20 @@
__DIR__ . '/tests/_support',
JsonThrowOnErrorRector::class,
StringifyStrNeedlesRector::class,
YieldDataProviderRector::class,

RemoveUnusedPrivateMethodRector::class => [
// private method called via getPrivateMethodInvoker
__DIR__ . '/tests/system/Test/ReflectionHelperTest.php',
],

ConstructClassMethodToSetUpTestCaseRector::class => [
// breaks the constructor
__DIR__ . '/system/Test/TestResponse.php',
// See https://github.com/rectorphp/rector/issues/8188
__DIR__ . '/system/Test/ControllerResponse.php',
],

RemoveUnusedConstructorParamRector::class => [
// there are deprecated parameters
__DIR__ . '/system/Debug/Exceptions.php',
Expand Down
2 changes: 2 additions & 0 deletions system/Autoloader/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
* // register the autoloader
* $loader->register();
* ```
*
* @see \CodeIgniter\Autoloader\AutoloaderTest
*/
class Autoloader
{
Expand Down
2 changes: 2 additions & 0 deletions system/Autoloader/FileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/**
* Allows loading non-class files in a namespaced manner.
* Works with Helpers, Views, etc.
*
* @see \CodeIgniter\Autoloader\FileLocatorTest
*/
class FileLocator
{
Expand Down
2 changes: 2 additions & 0 deletions system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* The wait() method is mostly testable, as long as you don't give it
* an argument of "0".
* These have been flagged to ignore for code coverage purposes.
*
* @see \CodeIgniter\CLI\CLITest
*/
class CLI
{
Expand Down
2 changes: 2 additions & 0 deletions system/CLI/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Console
*
* @see \CodeIgniter\CLI\ConsoleTest
*/
class Console
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/CacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* A factory for loading the desired
*
* @see \CodeIgniter\Cache\CacheFactoryTest
*/
class CacheFactory
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/Handlers/BaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* Base class for cache handling
*
* @see \CodeIgniter\Cache\Handlers\BaseHandlerTest
*/
abstract class BaseHandler implements CacheInterface
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/Handlers/DummyHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

/**
* Dummy cache handler
*
* @see \CodeIgniter\Cache\Handlers\DummyHandlerTest
*/
class DummyHandler extends BaseHandler
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/Handlers/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* File system cache handler
*
* @see \CodeIgniter\Cache\Handlers\FileHandlerTest
*/
class FileHandler extends BaseHandler
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/Handlers/MemcachedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

/**
* Mamcached cache handler
*
* @see \CodeIgniter\Cache\Handlers\MemcachedHandlerTest
*/
class MemcachedHandler extends BaseHandler
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/Handlers/PredisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

/**
* Predis cache handler
*
* @see \CodeIgniter\Cache\Handlers\PredisHandlerTest
*/
class PredisHandler extends BaseHandler
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/Handlers/RedisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* Redis cache handler
*
* @see \CodeIgniter\Cache\Handlers\RedisHandlerTest
*/
class RedisHandler extends BaseHandler
{
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/ResponseCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* Web Page Caching
*
* @see \CodeIgniter\Cache\ResponseCacheTest
*/
final class ResponseCache
{
Expand Down
2 changes: 2 additions & 0 deletions system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
* This class is the core of the framework, and will analyse the
* request, route it to a controller, and send back the response.
* Of course, there are variations to that flow, but this is the brains.
*
* @see \CodeIgniter\CodeIgniterTest
*/
class CodeIgniter
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Database/MigrateStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Displays a list of all migrations and whether they've been run or not.
*
* @see \CodeIgniter\Commands\Database\MigrateStatusTest
*/
class MigrateStatus extends BaseCommand
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Database/ShowTableInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* Get table data if it exists in the database.
*
* @see \CodeIgniter\Commands\Database\ShowTableInfoTest
*/
class ShowTableInfo extends BaseCommand
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Namespaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* Lists namespaces set in Config\Autoload with their
* full server path. Helps you to verify that you have
* the namespaces setup correctly.
*
* @see \CodeIgniter\Commands\Utilities\NamespacesTest
*/
class Namespaces extends BaseCommand
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Routes/AutoRouteCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Collects data for auto route listing.
*
* @see \CodeIgniter\Commands\Utilities\Routes\AutoRouteCollectorTest
*/
final class AutoRouteCollector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Collects data for Auto Routing Improved.
*
* @see \CodeIgniter\Commands\Utilities\Routes\AutoRouterImproved\AutoRouteCollectorTest
*/
final class AutoRouteCollector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Reads a controller and returns a list of auto route listing.
*
* @see \CodeIgniter\Commands\Utilities\Routes\AutoRouterImproved\ControllerMethodReaderTest
*/
final class ControllerMethodReader
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Routes/ControllerFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Finds all controllers in a namespace for auto route listing.
*
* @see \CodeIgniter\Commands\Utilities\Routes\ControllerFinderTest
*/
final class ControllerFinder
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Routes/ControllerMethodReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Reads a controller and returns a list of auto route listing.
*
* @see \CodeIgniter\Commands\Utilities\Routes\ControllerMethodReaderTest
*/
final class ControllerMethodReader
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Routes/FilterCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* Collects filters for a route.
*
* @see \CodeIgniter\Commands\Utilities\Routes\FilterCollectorTest
*/
final class FilterCollector
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Routes/FilterFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

/**
* Finds filters.
*
* @see \CodeIgniter\Commands\Utilities\Routes\FilterFinderTest
*/
final class FilterFinder
{
Expand Down
2 changes: 2 additions & 0 deletions system/Commands/Utilities/Routes/SampleURIGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Generate a sample URI path from route key regex.
*
* @see \CodeIgniter\Commands\Utilities\Routes\SampleURIGeneratorTest
*/
final class SampleURIGenerator
{
Expand Down
1 change: 1 addition & 0 deletions system/Config/BaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* These can be set within the .env file.
*
* @phpstan-consistent-constructor
* @see \CodeIgniter\Config\BaseConfigTest
*/
class BaseConfig
{
Expand Down
1 change: 1 addition & 0 deletions system/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/**
* @deprecated Use CodeIgniter\Config\Factories::config()
* @see \CodeIgniter\Config\ConfigTest
*/
class Config
{
Expand Down
2 changes: 2 additions & 0 deletions system/Config/DotEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

/**
* Environment-specific configuration
*
* @see \CodeIgniter\Config\DotEnvTest
*/
class DotEnv
{
Expand Down
1 change: 1 addition & 0 deletions system/Config/Factories.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*
* @method static BaseConfig|null config(...$arguments)
* @method static Model|null models(string $alias, array $options = [], ?ConnectionInterface &$conn = null)
* @see \CodeIgniter\Config\FactoriesTest
*/
class Factories
{
Expand Down
1 change: 1 addition & 0 deletions system/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
*
* @see http://blog.ircmaxell.com/2015/11/simple-easy-risk-and-change.html
* @see http://www.infoq.com/presentations/Simple-Made-Easy
* @see \CodeIgniter\Config\ServicesTest
*/
class Services extends BaseService
{
Expand Down
2 changes: 2 additions & 0 deletions system/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

/**
* Class Controller
*
* @see \CodeIgniter\ControllerTest
*/
class Controller
{
Expand Down
1 change: 1 addition & 0 deletions system/Cookie/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* ```
*
* @template-implements ArrayAccess<string, bool|int|string>
* @see \CodeIgniter\Cookie\CookieTest
*/
class Cookie implements ArrayAccess, CloneableCookieInterface
{
Expand Down
1 change: 1 addition & 0 deletions system/Cookie/CookieStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* The CookieStore object represents an immutable collection of `Cookie` value objects.
*
* @implements IteratorAggregate<string, Cookie>
* @see \CodeIgniter\Cookie\CookieStoreTest
*/
class CookieStore implements Countable, IteratorAggregate
{
Expand Down
1 change: 1 addition & 0 deletions system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
* @template TResult
*
* @implements ConnectionInterface<TConnection, TResult>
* @see \CodeIgniter\Database\BaseConnectionTest
*/
abstract class BaseConnection implements ConnectionInterface
{
Expand Down
2 changes: 2 additions & 0 deletions system/Database/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Class Config
*
* @see \CodeIgniter\Database\ConfigTest
*/
class Config extends BaseConfig
{
Expand Down
1 change: 1 addition & 0 deletions system/Database/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @deprecated Use CodeIgniter\Config\Factories::models()
*
* @codeCoverageIgnore
* @see \CodeIgniter\Database\ModelFactoryTest
*/
class ModelFactory
{
Expand Down
3 changes: 3 additions & 0 deletions system/Database/RawSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace CodeIgniter\Database;

/**
* @see \CodeIgniter\Database\RawSqlTest
*/
class RawSql
{
/**
Expand Down
3 changes: 3 additions & 0 deletions system/Debug/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use Config\Paths;
use Throwable;

/**
* @see \CodeIgniter\Debug\ExceptionHandlerTest
*/
final class ExceptionHandler extends BaseExceptionHandler implements ExceptionHandlerInterface
{
use ResponseTrait;
Expand Down
2 changes: 2 additions & 0 deletions system/Debug/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

/**
* Exceptions manager
*
* @see \CodeIgniter\Debug\ExceptionsTest
*/
class Exceptions
{
Expand Down
2 changes: 2 additions & 0 deletions system/Debug/Timer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*
* Provides a simple way to measure the amount of time
* that elapses between two points.
*
* @see \CodeIgniter\Debug\TimerTest
*/
class Timer
{
Expand Down
2 changes: 2 additions & 0 deletions system/Debug/Toolbar/Collectors/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Collector for the Database tab of the Debug Toolbar.
*
* @see \CodeIgniter\Debug\Toolbar\Collectors\DatabaseTest
*/
class Database extends BaseCollector
{
Expand Down
Loading