mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix: Update the typing
This commit is contained in:
parent
583e7b61da
commit
ea3894755d
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
use CodeIgniter\HTTP\Header;
|
||||
use Config\Services;
|
||||
use CodeIgniter\CodeIgniter;
|
||||
|
||||
$errorId = uniqid('error', true);
|
||||
|
@ -18361,12 +18361,6 @@ $ignoreErrors[] = [
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: missingType.iterableValue
|
||||
'message' => '#^Method class@anonymous/tests/system/View/ParserTest\\.php\\:340\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: argument.type
|
||||
'message' => '#^Parameter \\#2 \\$context of method CodeIgniter\\\\View\\\\Parser\\:\\:setData\\(\\) expects \'attr\'\\|\'css\'\\|\'html\'\\|\'js\'\\|\'raw\'\\|\'url\'\\|null, \'unknown\' given\\.$#',
|
||||
@ -18379,18 +18373,6 @@ $ignoreErrors[] = [
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: missingType.property
|
||||
'message' => '#^Property class@anonymous/tests/system/View/ParserTest\\.php\\:340\\:\\:\\$bar has no type specified\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: missingType.property
|
||||
'message' => '#^Property class@anonymous/tests/system/View/ParserTest\\.php\\:340\\:\\:\\$foo has no type specified\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: method.notFound
|
||||
'message' => '#^Call to an undefined method CodeIgniter\\\\View\\\\Table\\:\\:compileTemplate\\(\\)\\.$#',
|
||||
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace CodeIgniter\Exceptions;
|
||||
|
||||
use Config\Services;
|
||||
use OutOfBoundsException;
|
||||
|
||||
class PageNotFoundException extends OutOfBoundsException implements ExceptionInterface, HTTPExceptionInterface
|
||||
|
@ -155,7 +155,7 @@ class ChromeLoggerHandler extends BaseHandler
|
||||
*/
|
||||
public function sendLogs(?ResponseInterface &$response = null)
|
||||
{
|
||||
if ($response instanceof ResponseInterface) {
|
||||
if (! $response instanceof ResponseInterface) {
|
||||
$response = service('response', null, true);
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ namespace CodeIgniter\Filters;
|
||||
|
||||
use CodeIgniter\HTTP\CLIRequest;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\Response;
|
||||
use CodeIgniter\Test\CIUnitTestCase;
|
||||
use Config\Filters as FilterConfig;
|
||||
@ -31,7 +32,7 @@ final class DebugToolbarTest extends CIUnitTestCase
|
||||
/**
|
||||
* @var CLIRequest|IncomingRequest
|
||||
*/
|
||||
private $request;
|
||||
private RequestInterface $request;
|
||||
|
||||
private Response $response;
|
||||
|
||||
|
@ -16,6 +16,7 @@ namespace CodeIgniter\Filters;
|
||||
use CodeIgniter\Honeypot\Exceptions\HoneypotException;
|
||||
use CodeIgniter\HTTP\CLIRequest;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\Response;
|
||||
use CodeIgniter\Test\CIUnitTestCase;
|
||||
use Config\Honeypot;
|
||||
@ -36,9 +37,9 @@ final class HoneypotTest extends CIUnitTestCase
|
||||
private Honeypot $honey;
|
||||
|
||||
/**
|
||||
* @var CLIRequest|IncomingRequest|null
|
||||
* @var CLIRequest|IncomingRequest
|
||||
*/
|
||||
private $request;
|
||||
private RequestInterface $request;
|
||||
|
||||
private ?Response $response = null;
|
||||
|
||||
|
@ -18,6 +18,7 @@ use CodeIgniter\Filters\Filters;
|
||||
use CodeIgniter\Honeypot\Exceptions\HoneypotException;
|
||||
use CodeIgniter\HTTP\CLIRequest;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\Response;
|
||||
use CodeIgniter\Test\CIUnitTestCase;
|
||||
use Config\App;
|
||||
@ -38,7 +39,7 @@ final class HoneypotTest extends CIUnitTestCase
|
||||
/**
|
||||
* @var CLIRequest|IncomingRequest
|
||||
*/
|
||||
private $request;
|
||||
private RequestInterface $request;
|
||||
|
||||
private Response $response;
|
||||
|
||||
|
@ -337,9 +337,12 @@ final class ParserTest extends CIUnitTestCase
|
||||
public function testParseLoopEntityProperties(): void
|
||||
{
|
||||
$power = new class () extends Entity {
|
||||
public $foo = 'bar';
|
||||
protected $bar = 'baz';
|
||||
public string $foo = 'bar';
|
||||
protected string $bar = 'baz';
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array
|
||||
{
|
||||
return [
|
||||
|
Loading…
x
Reference in New Issue
Block a user