From 77e5775d6200ded17f39b042a44dd4e2f6e32b61 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Fri, 14 Aug 2026 18:25:14 +0800 Subject: [PATCH] refactor: clear out phpstan errors in `HTTP` source and tests --- system/HTTP/CLIRequest.php | 56 +- system/HTTP/CURLRequest.php | 49 +- system/HTTP/Files/FileCollection.php | 16 +- system/HTTP/Files/UploadedFile.php | 7 - system/HTTP/IncomingRequest.php | 66 +- system/HTTP/Message.php | 6 +- system/HTTP/MessageInterface.php | 4 +- system/HTTP/MessageTrait.php | 6 +- system/HTTP/Negotiate.php | 37 +- system/HTTP/OutgoingRequest.php | 5 +- system/HTTP/RedirectResponse.php | 6 +- system/HTTP/RequestInterface.php | 4 +- system/HTTP/RequestTrait.php | 18 +- system/HTTP/Response.php | 2 +- system/HTTP/ResponseInterface.php | 24 +- system/HTTP/ResponseTrait.php | 31 +- system/HTTP/SiteURI.php | 35 +- system/HTTP/URI.php | 5 +- system/Superglobals.php | 2 +- tests/system/HTTP/Files/FileMovingTest.php | 6 +- tests/system/HTTP/MessageTest.php | 7 +- tests/system/HTTP/RedirectResponseTest.php | 5 - tests/system/HTTP/ResponseCookieTest.php | 3 + tests/system/HTTP/ResponseTest.php | 9 + .../SiteURIFactoryDetectRoutePathTest.php | 6 + tests/system/HTTP/SiteURIFactoryTest.php | 6 + tests/system/HTTP/SiteURITest.php | 15 + tests/system/HTTP/URITest.php | 26 +- utils/phpstan-baseline/argument.type.neon | 52 +- utils/phpstan-baseline/loader.neon | 2 +- .../method.childReturnType.neon | 8 +- utils/phpstan-baseline/method.notFound.neon | 17 +- .../missingType.iterableValue.neon | 1024 +++-------------- .../missingType.parameter.neon | 22 +- .../phpstan-baseline/property.phpDocType.neon | 32 +- 35 files changed, 480 insertions(+), 1139 deletions(-) diff --git a/system/HTTP/CLIRequest.php b/system/HTTP/CLIRequest.php index 67c6ad4c1c7c..f1e98c50bf79 100644 --- a/system/HTTP/CLIRequest.php +++ b/system/HTTP/CLIRequest.php @@ -35,21 +35,21 @@ class CLIRequest extends Request /** * Stores the segments of our cli "URI" command. * - * @var array + * @var list */ protected $segments = []; /** * Command line options and their values. * - * @var array + * @var array */ protected $options = []; /** * Command line arguments (segments and options). * - * @var array + * @var array */ protected $args = []; @@ -101,6 +101,8 @@ public function getPath(): string /** * Returns an associative array of all CLI options found, with * their values. + * + * @return array */ public function getOptions(): array { @@ -109,6 +111,8 @@ public function getOptions(): array /** * Returns an array of all CLI arguments (segments and options). + * + * @return array */ public function getArgs(): array { @@ -117,6 +121,8 @@ public function getArgs(): array /** * Returns the path segments. + * + * @return list */ public function getSegments(): array { @@ -226,11 +232,11 @@ public function isCLI(): bool /** * Fetch an item from GET data. * - * @param array|string|null $index Index for item to fetch from $_GET. - * @param int|null $filter A filter name to apply. - * @param array|int|null $flags + * @param list|string|null $index Index for item to fetch from $_GET. + * @param int|null $filter A filter name to apply. + * @param array|int|null $flags * - * @return array|null + * @return array{}|null */ public function getGet($index = null, $filter = null, $flags = null) { @@ -240,11 +246,11 @@ public function getGet($index = null, $filter = null, $flags = null) /** * Fetch an item from POST. * - * @param array|string|null $index Index for item to fetch from $_POST. - * @param int|null $filter A filter name to apply - * @param array|int|null $flags + * @param list|string|null $index Index for item to fetch from $_POST. + * @param int|null $filter A filter name to apply + * @param array|int|null $flags * - * @return array|null + * @return array{}|null */ public function getPost($index = null, $filter = null, $flags = null) { @@ -254,11 +260,11 @@ public function getPost($index = null, $filter = null, $flags = null) /** * Fetch an item from POST data with fallback to GET. * - * @param array|string|null $index Index for item to fetch from $_POST or $_GET - * @param int|null $filter A filter name to apply - * @param array|int|null $flags + * @param list|string|null $index Index for item to fetch from $_POST or $_GET + * @param int|null $filter A filter name to apply + * @param array|int|null $flags * - * @return array|null + * @return array{}|null */ public function getPostGet($index = null, $filter = null, $flags = null) { @@ -268,11 +274,11 @@ public function getPostGet($index = null, $filter = null, $flags = null) /** * Fetch an item from GET data with fallback to POST. * - * @param array|string|null $index Index for item to be fetched from $_GET or $_POST - * @param int|null $filter A filter name to apply - * @param array|int|null $flags + * @param list|string|null $index Index for item to be fetched from $_GET or $_POST + * @param int|null $filter A filter name to apply + * @param array|int|null $flags * - * @return array|null + * @return array{}|null */ public function getGetPost($index = null, $filter = null, $flags = null) { @@ -282,11 +288,11 @@ public function getGetPost($index = null, $filter = null, $flags = null) /** * This is a place holder for calls from cookie_helper get_cookie(). * - * @param array|string|null $index Index for item to be fetched from $_COOKIE - * @param int|null $filter A filter name to be applied - * @param mixed $flags + * @param list|string|null $index Index for item to be fetched from $_COOKIE + * @param int|null $filter A filter name to be applied + * @param mixed $flags * - * @return array|null + * @return array{}|null */ public function getCookie($index = null, $filter = null, $flags = null) { @@ -294,9 +300,9 @@ public function getCookie($index = null, $filter = null, $flags = null) } /** - * @param array|string|null $index + * @param list|string|null $index * - * @return array|null + * @return array{}|null */ private function returnNullOrEmptyArray($index) { diff --git a/system/HTTP/CURLRequest.php b/system/HTTP/CURLRequest.php index b75c477ab9e1..dc83f63763ca 100644 --- a/system/HTTP/CURLRequest.php +++ b/system/HTTP/CURLRequest.php @@ -51,14 +51,14 @@ class CURLRequest extends OutgoingRequest /** * The setting values * - * @var array + * @var array */ protected $config; /** * The default setting values * - * @var array + * @var array */ protected $defaultConfig = [ 'timeout' => 0.0, @@ -71,7 +71,7 @@ class CURLRequest extends OutgoingRequest * Default values for when 'allow_redirects' * option is true. * - * @var array + * @var array */ protected $redirectDefaults = [ 'max' => 5, @@ -92,6 +92,8 @@ class CURLRequest extends OutgoingRequest /** * The default options from the constructor. Applied to all requests. + * + * @var array */ private readonly array $defaultOptions; @@ -156,7 +158,8 @@ public function __construct(App $config, URI $uri, ?ResponseInterface $response * Sends an HTTP request to the specified $url. If this is a relative * URL, it will be merged with $this->baseURI to form a complete URL. * - * @param string $method HTTP method + * @param string $method HTTP method + * @param array $options */ public function request($method, string $url, array $options = []): ResponseInterface { @@ -200,6 +203,8 @@ protected function resetOptions() /** * Convenience method for sending a GET request. + * + * @param array $options */ public function get(string $url, array $options = []): ResponseInterface { @@ -208,6 +213,8 @@ public function get(string $url, array $options = []): ResponseInterface /** * Convenience method for sending a DELETE request. + * + * @param array $options */ public function delete(string $url, array $options = []): ResponseInterface { @@ -216,6 +223,8 @@ public function delete(string $url, array $options = []): ResponseInterface /** * Convenience method for sending a HEAD request. + * + * @param array $options */ public function head(string $url, array $options = []): ResponseInterface { @@ -224,6 +233,8 @@ public function head(string $url, array $options = []): ResponseInterface /** * Convenience method for sending an OPTIONS request. + * + * @param array $options */ public function options(string $url, array $options = []): ResponseInterface { @@ -232,6 +243,8 @@ public function options(string $url, array $options = []): ResponseInterface /** * Convenience method for sending a PATCH request. + * + * @param array $options */ public function patch(string $url, array $options = []): ResponseInterface { @@ -240,6 +253,8 @@ public function patch(string $url, array $options = []): ResponseInterface /** * Convenience method for sending a POST request. + * + * @param array $options */ public function post(string $url, array $options = []): ResponseInterface { @@ -248,6 +263,8 @@ public function post(string $url, array $options = []): ResponseInterface /** * Convenience method for sending a PUT request. + * + * @param array $options */ public function put(string $url, array $options = []): ResponseInterface { @@ -271,7 +288,8 @@ public function setAuth(string $username, #[SensitiveParameter] string $password /** * Set form data to be sent. * - * @param bool $multipart Set TRUE if you are sending CURLFiles + * @param bool $multipart Set TRUE if you are sending CURLFiles + * @param array $params * * @return $this */ @@ -304,6 +322,8 @@ public function setJSON($data) * Sets the correct settings based on the options array * passed in. * + * @param array $options + * * @return void */ protected function parseOptions(array $options) @@ -430,6 +450,10 @@ public function send(string $method, string $url) /** * Adds $this->headers to the cURL request. + * + * @param array $curlOptions + * + * @return array */ protected function applyRequestHeaders(array $curlOptions = []): array { @@ -450,6 +474,10 @@ protected function applyRequestHeaders(array $curlOptions = []): array /** * Apply method + * + * @param array $curlOptions + * + * @return array */ protected function applyMethod(string $method, array $curlOptions): array { @@ -477,6 +505,10 @@ protected function applyMethod(string $method, array $curlOptions): array /** * Apply body + * + * @param array $curlOptions + * + * @return array */ protected function applyBody(array $curlOptions = []): array { @@ -491,6 +523,8 @@ protected function applyBody(array $curlOptions = []): array * Parses the header retrieved from the cURL response into * our Response object. * + * @param list $headers + * * @return void */ protected function setResponseHeaders(array $headers = []) @@ -522,7 +556,10 @@ protected function setResponseHeaders(array $headers = []) /** * Set CURL options * - * @return array + * @param array $curlOptions + * @param array $config + * + * @return array * * @throws InvalidArgumentException */ diff --git a/system/HTTP/Files/FileCollection.php b/system/HTTP/Files/FileCollection.php index 5e3599b89853..058e86c3a4aa 100644 --- a/system/HTTP/Files/FileCollection.php +++ b/system/HTTP/Files/FileCollection.php @@ -31,7 +31,7 @@ class FileCollection * Populated the first time either files(), file(), or hasFile() * is called. * - * @var array|null + * @var array|UploadedFile>|null */ protected $files; @@ -40,7 +40,7 @@ class FileCollection * Each element in the array will be an instance of UploadedFile. * The key of each element will be the client filename. * - * @return array|null + * @return array|UploadedFile>|null */ public function all() { @@ -167,7 +167,9 @@ protected function populateFiles() * Given a file array, will create UploadedFile instances. Will * loop over an array and create objects for each. * - * @return list|UploadedFile + * @param array $array + * + * @return array|UploadedFile>|UploadedFile */ protected function createFileObject(array $array) { @@ -203,6 +205,10 @@ protected function createFileObject(array $array) * of this method. * * @see http://php.net/manual/en/reserved.variables.files.php#118294 + * + * @param array $data + * + * @return array */ protected function fixFilesArray(array $data): array { @@ -246,8 +252,8 @@ protected function fixFilesArray(array $data): array /** * Navigate through an array looking for a particular index * - * @param array $index The index sequence we are navigating down - * @param array $value The portion of the array to process + * @param list $index The index sequence we are navigating down + * @param array|UploadedFile> $value The portion of the array to process * * @return list|UploadedFile|null */ diff --git a/system/HTTP/Files/UploadedFile.php b/system/HTTP/Files/UploadedFile.php index cf7fa414701a..97c228df8f7c 100644 --- a/system/HTTP/Files/UploadedFile.php +++ b/system/HTTP/Files/UploadedFile.php @@ -55,13 +55,6 @@ class UploadedFile extends File implements UploadedFileInterface */ protected $name; - /** - * The type of file as provided by PHP - * - * @var string - */ - protected $originalMimeType; - /** * The error constant of the upload * (one of PHP's UPLOADERRXXX constants) diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index 09f80d33253b..f630767bcc35 100644 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -105,14 +105,14 @@ class IncomingRequest extends Request /** * Stores the valid locale codes. * - * @var array + * @var list */ protected $validLocales = []; /** * Holds the old data from a redirect. * - * @var array + * @var array */ protected $oldInput = []; @@ -203,6 +203,8 @@ public function detectLocale($config) /** * Provides a convenient way to work with the Negotiate class * for content negotiation. + * + * @param list $supported */ public function negotiate(string $type, array $supported, bool $strictMatch = false): string { @@ -339,6 +341,8 @@ public function setLocale(string $locale) /** * Set the valid locales. * + * @param list $locales + * * @return $this */ public function setValidLocales(array $locales) @@ -370,9 +374,9 @@ public function getDefaultLocale(): string * to grab data from the request object and can be used in lieu of the * other get* methods in most cases. * - * @param array|string|null $index - * @param int|null $filter Filter constant - * @param array|int|null $flags + * @param list|string|null $index + * @param int|null $filter Filter constant + * @param array|int|null $flags * * @return array|bool|float|int|stdClass|string|null */ @@ -423,10 +427,10 @@ public function getJSON(bool $assoc = false, int $depth = 512, int $options = 0) /** * Get a specific variable from a JSON input stream * - * @param array|string|null $index The variable that you want which can use dot syntax for getting specific values. - * @param bool $assoc If true, return the result as an associative array. - * @param int|null $filter Filter Constant - * @param array|int|null $flags Option + * @param list|string|null $index The variable that you want which can use dot syntax for getting specific values. + * @param bool $assoc If true, return the result as an associative array. + * @param int|null $filter Filter Constant + * @param array|int|null $flags Option * * @return array|bool|float|int|stdClass|string|null */ @@ -503,7 +507,7 @@ public function getJsonVar($index = null, bool $assoc = false, ?int $filter = nu * A convenience method that grabs the raw input stream(send method in PUT, PATCH, DELETE) and decodes * the String into an array. * - * @return array + * @return array */ public function getRawInput() { @@ -515,9 +519,9 @@ public function getRawInput() /** * Gets a specific variable from raw input stream (send method in PUT, PATCH, DELETE). * - * @param array|string|null $index The variable that you want which can use dot syntax for getting specific values. - * @param int|null $filter Filter Constant - * @param array|int|null $flags Option + * @param list|string|null $index The variable that you want which can use dot syntax for getting specific values. + * @param int|null $filter Filter Constant + * @param array|int|null $flags Option * * @return mixed */ @@ -569,9 +573,9 @@ public function getRawInputVar($index = null, ?int $filter = null, $flags = null /** * Fetch an item from GET data. * - * @param array|string|null $index Index for item to fetch from $_GET. - * @param int|null $filter A filter name to apply. - * @param array|int|null $flags + * @param list|string|null $index Index for item to fetch from $_GET. + * @param int|null $filter A filter name to apply. + * @param array|int|null $flags * * @return mixed */ @@ -583,9 +587,9 @@ public function getGet($index = null, $filter = null, $flags = null) /** * Fetch an item from POST. * - * @param array|string|null $index Index for item to fetch from $_POST. - * @param int|null $filter A filter name to apply - * @param array|int|null $flags + * @param list|string|null $index Index for item to fetch from $_POST. + * @param int|null $filter A filter name to apply + * @param array|int|null $flags * * @return mixed */ @@ -597,9 +601,9 @@ public function getPost($index = null, $filter = null, $flags = null) /** * Fetch an item from POST data with fallback to GET. * - * @param array|string|null $index Index for item to fetch from $_POST or $_GET - * @param int|null $filter A filter name to apply - * @param array|int|null $flags + * @param list|string|null $index Index for item to fetch from $_POST or $_GET + * @param int|null $filter A filter name to apply + * @param array|int|null $flags * * @return mixed */ @@ -630,9 +634,9 @@ public function getPostGet($index = null, $filter = null, $flags = null) /** * Fetch an item from GET data with fallback to POST. * - * @param array|string|null $index Index for item to be fetched from $_GET or $_POST - * @param int|null $filter A filter name to apply - * @param array|int|null $flags + * @param list|string|null $index Index for item to be fetched from $_GET or $_POST + * @param int|null $filter A filter name to apply + * @param array|int|null $flags * * @return mixed */ @@ -663,9 +667,9 @@ public function getGetPost($index = null, $filter = null, $flags = null) /** * Fetch an item from the COOKIE array. * - * @param array|string|null $index Index for item to be fetched from $_COOKIE - * @param int|null $filter A filter name to be applied - * @param array|int|null $flags + * @param list|string|null $index Index for item to be fetched from $_COOKIE + * @param int|null $filter A filter name to be applied + * @param array|int|null $flags * * @return mixed */ @@ -689,7 +693,7 @@ public function getUserAgent() * with redirect_with_input(). It first checks for the data in the old * POST data, then the old GET data and finally check for dot arrays * - * @return array|string|null + * @return array|string|null */ public function getOldInput(string $key) { @@ -741,6 +745,8 @@ public function getOldInput(string $key) /** * Returns an array of all files that have been uploaded with this * request. Each file is represented by an UploadedFile instance. + * + * @return array|UploadedFile> */ public function getFiles(): array { @@ -755,7 +761,7 @@ public function getFiles(): array * Verify if a file exist, by the name of the input field used to upload it, in the collection * of uploaded files and if is have been uploaded with multiple option. * - * @return array|null + * @return list|null */ public function getFileMultiple(string $fileID) { diff --git a/system/HTTP/Message.php b/system/HTTP/Message.php index 4a3c70e123cc..7c5114f71f63 100644 --- a/system/HTTP/Message.php +++ b/system/HTTP/Message.php @@ -34,7 +34,7 @@ class Message implements MessageInterface /** * List of valid protocol versions * - * @var array + * @var list */ protected $validProtocolVersions = [ '1.0', @@ -80,13 +80,13 @@ public function getHeaders(): array * Returns a single header object. If multiple headers with the same * name exist, then will return an array of header objects. * - * @return array|Header|null - * * @deprecated Use Message::header() to make room for PSR-7 * * @TODO Incompatible return value with PSR-7 * * @codeCoverageIgnore + * + * @return array|Header|null */ public function getHeader(string $name) { diff --git a/system/HTTP/MessageInterface.php b/system/HTTP/MessageInterface.php index b8850a0ffb7c..11fef4880899 100644 --- a/system/HTTP/MessageInterface.php +++ b/system/HTTP/MessageInterface.php @@ -103,9 +103,9 @@ public function header($name); public function getHeaderLine(string $name): string; /** - * Sets a header and it's value. + * Sets a header and its value. * - * @param array|string|null $value + * @param array|string|null $value * * @return $this */ diff --git a/system/HTTP/MessageTrait.php b/system/HTTP/MessageTrait.php index ffef1f07bc3d..a55f9dc78c10 100644 --- a/system/HTTP/MessageTrait.php +++ b/system/HTTP/MessageTrait.php @@ -41,7 +41,7 @@ trait MessageTrait * and their normal-case key as it is in $headers. * Used for case-insensitive header access. * - * @var array + * @var array */ protected $headerMap = []; @@ -51,7 +51,7 @@ trait MessageTrait /** * Sets the body of the current message. * - * @param string $data + * @param array|string|null $data */ public function setBody($data): self { @@ -138,7 +138,7 @@ public function header($name) /** * Sets a header and it's value. * - * @param array|string|null $value + * @param array|string|null $value */ public function setHeader(string $name, $value): self { diff --git a/system/HTTP/Negotiate.php b/system/HTTP/Negotiate.php index f35a761c2fc4..d482d086e4c9 100644 --- a/system/HTTP/Negotiate.php +++ b/system/HTTP/Negotiate.php @@ -69,8 +69,9 @@ public function setRequest(RequestInterface $request) * If no match is found, the first, highest-ranking client requested * type is returned. * - * @param bool $strictMatch If TRUE, will return an empty string when no match found. - * If FALSE, will return the first supported element. + * @param bool $strictMatch If TRUE, will return an empty string when no match found. + * If FALSE, will return the first supported element. + * @param list $supported */ public function media(array $supported, bool $strictMatch = false): string { @@ -84,6 +85,8 @@ public function media(array $supported, bool $strictMatch = false): string * * If no match is found, the first, highest-ranking client requested * type is returned. + * + * @param list $supported */ public function charset(array $supported): string { @@ -110,6 +113,8 @@ public function charset(array $supported): string * * If no match is found, the first, highest-ranking client requested * type is returned. + * + * @param list $supported */ public function encoding(array $supported = []): string { @@ -125,6 +130,8 @@ public function encoding(array $supported = []): string * * If strict locale negotiation is disabled and no match is found, the first, highest-ranking client requested * type is returned. + * + * @param list $supported */ public function language(array $supported): string { @@ -145,12 +152,12 @@ public function language(array $supported): string * * Portions of this code base on Aura.Accept library. * - * @param array $supported App-supported values - * @param string $header header string - * @param bool $enforceTypes If TRUE, will compare media types and sub-types. - * @param bool $strictMatch If TRUE, will return empty string on no match. - * If FALSE, will return the first supported element. - * @param bool $matchLocales If TRUE, will match locale sub-types to a broad type (fr-FR = fr) + * @param list $supported App-supported values + * @param string $header header string + * @param bool $enforceTypes If TRUE, will compare media types and sub-types. + * @param bool $strictMatch If TRUE, will return empty string on no match. + * If FALSE, will return the first supported element. + * @param bool $matchLocales If TRUE, will match locale sub-types to a broad type (fr-FR = fr) * * @return string Best match */ @@ -261,6 +268,8 @@ protected function getBestLocaleMatch(array $supportedLocales, ?string $header): * Parses an Accept* header into it's multiple values. * * This is based on code from Aura.Accept library. + * + * @return list}> */ public function parseHeader(string $header): array { @@ -339,7 +348,8 @@ public function parseHeader(string $header): array /** * Match-maker * - * @param bool $matchLocales + * @param bool $matchLocales + * @param array{value: string, q: float, params: array} $acceptable */ protected function match(array $acceptable, string $supported, bool $enforceTypes = false, $matchLocales = false): bool { @@ -370,6 +380,9 @@ protected function match(array $acceptable, string $supported, bool $enforceType /** * Checks two Accept values with matching 'values' to see if their * 'params' are the same. + * + * @param array{value: string, q: float, params: array} $acceptable + * @param array{value: string, q: float, params: array} $supported */ protected function matchParameters(array $acceptable, array $supported): bool { @@ -391,6 +404,9 @@ protected function matchParameters(array $acceptable, array $supported): bool /** * Compares the types/subtypes of an acceptable Media type and * the supported string. + * + * @param array{value: string, q: float, params: array} $acceptable + * @param array{value: string, q: float, params: array} $supported */ public function matchTypes(array $acceptable, array $supported): bool { @@ -416,6 +432,9 @@ public function matchTypes(array $acceptable, array $supported): bool /** * Will match locales against their broader pairs, so that fr-FR would * match a supported localed of fr + * + * @param array{value: string, q: float, params: array} $acceptable + * @param array{value: string, q: float, params: array} $supported */ public function matchLocales(array $acceptable, array $supported): bool { diff --git a/system/HTTP/OutgoingRequest.php b/system/HTTP/OutgoingRequest.php index eba5babdf6bb..1534bdcb8308 100644 --- a/system/HTTP/OutgoingRequest.php +++ b/system/HTTP/OutgoingRequest.php @@ -35,8 +35,9 @@ class OutgoingRequest extends Message implements OutgoingRequestInterface protected $uri; /** - * @param string $method HTTP method - * @param string|null $body + * @param string $method HTTP method + * @param array|string> $headers + * @param string|null $body */ public function __construct( string $method, diff --git a/system/HTTP/RedirectResponse.php b/system/HTTP/RedirectResponse.php index d8c8f00e868d..ed464244a63d 100644 --- a/system/HTTP/RedirectResponse.php +++ b/system/HTTP/RedirectResponse.php @@ -47,7 +47,8 @@ public function to(string $uri, ?int $code = null, string $method = 'auto') * Sets the URI to redirect to but as a reverse-routed or named route * instead of a raw URI. * - * @param string $route Route name or Controller::method + * @param string $route Route name or Controller::method + * @param list $params * * @return $this * @@ -123,7 +124,8 @@ private function withErrors(): self /** * Adds a key and message to the session as Flashdata. * - * @param array|string $message + * @param array|string $message + * @param array|string $message * * @return $this */ diff --git a/system/HTTP/RequestInterface.php b/system/HTTP/RequestInterface.php index 26af51df9dab..533d3b9876a9 100644 --- a/system/HTTP/RequestInterface.php +++ b/system/HTTP/RequestInterface.php @@ -32,8 +32,8 @@ public function getIPAddress(): string; * Fetch an item from the $_SERVER array. * Supplied by RequestTrait. * - * @param array|string|null $index Index for item to be fetched from $_SERVER - * @param int|null $filter A filter name to be applied + * @param list|string|null $index Index for item to be fetched from $_SERVER + * @param int|null $filter A filter name to be applied * * @return mixed */ diff --git a/system/HTTP/RequestTrait.php b/system/HTTP/RequestTrait.php index beb5b30570a3..c08d1d0bb808 100644 --- a/system/HTTP/RequestTrait.php +++ b/system/HTTP/RequestTrait.php @@ -46,7 +46,7 @@ trait RequestTrait /** * Stores values we've retrieved from PHP globals. * - * @var array{get?: array, post?: array, request?: array, cookie?: array, server?: array} + * @var array{get?: array, post?: array, request?: array, cookie?: array, server?: array} * * @deprecated 4.7.0 Use the Superglobals service instead */ @@ -221,9 +221,9 @@ private function checkIPAgainstProxy(string $ip, string $proxyIP): bool /** * Fetch an item from the $_SERVER array. * - * @param array|string|null $index Index for item to be fetched from $_SERVER - * @param int|null $filter A filter name to be applied - * @param array|int|null $flags + * @param list|string|null $index Index for item to be fetched from $_SERVER + * @param int|null $filter A filter name to be applied + * @param array|int|null $flags * * @return mixed */ @@ -235,9 +235,9 @@ public function getServer($index = null, $filter = null, $flags = null) /** * Fetch an item from the $_ENV array. * - * @param array|string|null $index Index for item to be fetched from $_ENV - * @param int|null $filter A filter name to be applied - * @param array|int|null $flags + * @param list|string|null $index Index for item to be fetched from $_ENV + * @param int|null $filter A filter name to be applied + * @param array|int|null $flags * * @return mixed * @@ -279,9 +279,9 @@ public function setGlobal(string $name, $value) * http://php.net/manual/en/filter.filters.sanitize.php * * @param 'cookie'|'get'|'post'|'request'|'server' $name Superglobal name (lowercase) - * @param array|int|string|null $index + * @param int|list|string|null $index * @param int|null $filter Filter constant - * @param array|int|null $flags Options + * @param array|int|null $flags Options * * @return mixed */ diff --git a/system/HTTP/Response.php b/system/HTTP/Response.php index e1193c063945..2ac2ecb7e9d2 100644 --- a/system/HTTP/Response.php +++ b/system/HTTP/Response.php @@ -39,7 +39,7 @@ class Response extends Message implements ResponseInterface /** * HTTP status codes * - * @var array + * @var array */ protected static $statusCodes = [ // 1xx: Informational diff --git a/system/HTTP/ResponseInterface.php b/system/HTTP/ResponseInterface.php index 66053c412939..258cbcf3c452 100644 --- a/system/HTTP/ResponseInterface.php +++ b/system/HTTP/ResponseInterface.php @@ -200,7 +200,7 @@ public function setContentType(string $mime, string $charset = 'UTF-8'); /** * Converts the $body into JSON and sets the Content Type header. * - * @param array|object|string $body + * @param array|object|string $body * * @return $this */ @@ -218,7 +218,7 @@ public function getJSON(); /** * Converts $body into XML, and sets the correct Content-Type. * - * @param array|string $body + * @param array|string $body * * @return $this */ @@ -271,6 +271,8 @@ public function noCache(); * - proxy-revalidate * - no-transform * + * @param array $options + * * @return $this */ public function setCache(array $options = []); @@ -310,15 +312,15 @@ public function sendBody(); * Accepts an arbitrary number of binds (up to 7) or an associative * array in the first parameter containing all the values. * - * @param array|Cookie|string $name Cookie name / array containing binds / Cookie object - * @param string $value Cookie value - * @param int $expire Cookie expiration time in seconds - * @param string $domain Cookie domain (e.g.: '.yourdomain.com') - * @param string $path Cookie path (default: '/') - * @param string $prefix Cookie name prefix - * @param bool $secure Whether to only transfer cookies via SSL - * @param bool $httponly Whether only make the cookie accessible via HTTP (no javascript) - * @param string|null $samesite + * @param array|Cookie|string $name Cookie name / array containing binds / Cookie object + * @param string $value Cookie value + * @param int|string $expire Cookie expiration time in seconds + * @param string $domain Cookie domain (e.g.: '.yourdomain.com') + * @param string $path Cookie path (default: '/') + * @param string $prefix Cookie name prefix + * @param bool $secure Whether to only transfer cookies via SSL + * @param bool $httponly Whether only make the cookie accessible via HTTP (no javascript) + * @param string|null $samesite * * @return $this */ diff --git a/system/HTTP/ResponseTrait.php b/system/HTTP/ResponseTrait.php index 00f2dcc7ec40..d67a05765e0e 100644 --- a/system/HTTP/ResponseTrait.php +++ b/system/HTTP/ResponseTrait.php @@ -169,7 +169,7 @@ public function setContentType(string $mime, string $charset = 'UTF-8') /** * Converts the $body into JSON and sets the Content Type header. * - * @param array|object|string $body + * @param array|object|string $body * * @return $this */ @@ -201,7 +201,7 @@ public function getJSON() /** * Converts $body into XML, and sets the correct Content-Type. * - * @param array|string $body + * @param array|string $body * * @return $this */ @@ -234,8 +234,8 @@ public function getXML() * Handles conversion of the data into the appropriate format, * and sets the correct Content-Type header for our response. * - * @param array|object|string $body - * @param string $format Valid: json, xml + * @param array|object|string $body + * @param string $format Valid: json, xml * * @return false|string * @@ -495,15 +495,16 @@ public function redirect(string $uri, string $method = 'auto', ?int $code = null * Accepts an arbitrary number of binds (up to 7) or an associative * array in the first parameter containing all the values. * - * @param array|Cookie|string $name Cookie name / array containing binds / Cookie object - * @param string $value Cookie value - * @param int $expire Cookie expiration time in seconds - * @param string $domain Cookie domain (e.g.: '.yourdomain.com') - * @param string $path Cookie path (default: '/') - * @param string $prefix Cookie name prefix ('': the default prefix) - * @param bool|null $secure Whether to only transfer cookies via SSL - * @param bool|null $httponly Whether only make the cookie accessible via HTTP (no javascript) - * @param string|null $samesite + * @param array|Cookie|string $name Cookie name / array containing binds / Cookie object + * @param string $value Cookie value + * @param int|string $expire Cookie expiration time in seconds + * @param string $domain Cookie domain (e.g.: '.yourdomain.com') + * @param string $path Cookie path (default: '/') + * @param string $prefix Cookie name prefix ('': the default prefix) + * @param bool|null $secure Whether to only transfer cookies via SSL + * @param bool|null $httponly Whether only make the cookie accessible via HTTP (no javascript) + * @param string|null $samesite + * @param array|Cookie|string $name * * @return $this */ @@ -700,6 +701,8 @@ private function dispatchCookies(): void * Extracted call to `setrawcookie()` in order to run unit tests on it. * * @codeCoverageIgnore + * + * @param array $options */ private function doSetRawCookie(string $name, string $value, array $options): void { @@ -710,6 +713,8 @@ private function doSetRawCookie(string $name, string $value, array $options): vo * Extracted call to `setcookie()` in order to run unit tests on it. * * @codeCoverageIgnore + * + * @param array $options */ private function doSetCookie(string $name, string $value, array $options): void { diff --git a/system/HTTP/SiteURI.php b/system/HTTP/SiteURI.php index d6653b10f537..7d07eff4aeeb 100644 --- a/system/HTTP/SiteURI.php +++ b/system/HTTP/SiteURI.php @@ -53,6 +53,8 @@ class SiteURI extends URI * 1 => 'public', * 2 => 'index.php', * ]; + * + * @var list */ private array $baseSegments; @@ -85,10 +87,10 @@ class SiteURI extends URI private string $routePath; /** - * @param string $relativePath URI path relative to baseURL. May include - * queries or fragments. - * @param string|null $host Optional current hostname. - * @param 'http'|'https'|null $scheme Optional scheme. 'http' or 'https'. + * @param string $relativePath URI path relative to baseURL. May include + * queries or fragments. + * @param string|null $host Optional current hostname. + * @param ''|'http'|'https'|null $scheme Optional scheme. 'http' or 'https'. */ public function __construct( App $configApp, @@ -123,6 +125,9 @@ public function __construct( $this->setRoutePath($routePath); } + /** + * @return array{string, string, string} + */ private function parseRelativePath(string $relativePath): array { $parts = parse_url('http://dummy/' . $relativePath); @@ -299,6 +304,8 @@ private function setRoutePath(string $routePath): void /** * Converts path to segments + * + * @return list */ private function convertToSegments(string $path): array { @@ -383,10 +390,10 @@ protected function applyParts(array $parts): void /** * For base_url() helper. * - * @param array|string $relativePath URI string or array of URI segments. - * @param string|null $scheme URI scheme. E.g., http, ftp. If empty - * string '' is set, a protocol-relative - * link is returned. + * @param list|string $relativePath URI string or array of URI segments. + * @param string|null $scheme URI scheme. E.g., http, ftp. If empty + * string '' is set, a protocol-relative + * link is returned. */ public function baseUrl($relativePath = '', ?string $scheme = null): string { @@ -408,7 +415,7 @@ public function baseUrl($relativePath = '', ?string $scheme = null): string } /** - * @param array|string $relativePath URI string or array of URI segments + * @param list|string $relativePath URI string or array of URI segments */ private function stringifyRelativePath($relativePath): string { @@ -422,11 +429,11 @@ private function stringifyRelativePath($relativePath): string /** * For site_url() helper. * - * @param array|string $relativePath URI string or array of URI segments. - * @param string|null $scheme URI scheme. E.g., http, ftp. If empty - * string '' is set, a protocol-relative - * link is returned. - * @param App|null $config Alternate configuration to use. + * @param list|string $relativePath URI string or array of URI segments. + * @param string|null $scheme URI scheme. E.g., http, ftp. If empty + * string '' is set, a protocol-relative + * link is returned. + * @param App|null $config Alternate configuration to use. */ public function siteUrl($relativePath = '', ?string $scheme = null, ?App $config = null): string { diff --git a/system/HTTP/URI.php b/system/HTTP/URI.php index 4f97e1fa75a4..3b91a8e18e8a 100644 --- a/system/HTTP/URI.php +++ b/system/HTTP/URI.php @@ -917,9 +917,10 @@ public function setQuery(string $query) * A convenience method to pass an array of items in as the Query * portion of the URI. * - * @return URI - * * @TODO: PSR-7: Should be `withQueryParams(array $query)` + * @param array $query + * + * @return URI */ public function setQueryArray(array $query) { diff --git a/system/Superglobals.php b/system/Superglobals.php index 2175728e862e..ac0ea289bd77 100644 --- a/system/Superglobals.php +++ b/system/Superglobals.php @@ -145,7 +145,7 @@ public function getServerArray(): array /** * Set the entire $_SERVER array. * - * @param array $array + * @param array $array */ public function setServerArray(array $array): self { diff --git a/tests/system/HTTP/Files/FileMovingTest.php b/tests/system/HTTP/Files/FileMovingTest.php index 3284c33d0f26..bb4b637fdc47 100644 --- a/tests/system/HTTP/Files/FileMovingTest.php +++ b/tests/system/HTTP/Files/FileMovingTest.php @@ -366,7 +366,7 @@ public function testFailedMoveBecauseOfFalseReturned(): void * * This overwrite is for testing the move operation. */ -function is_uploaded_file($filename): bool +function is_uploaded_file(string $filename): bool { if (! is_file($filename)) { file_put_contents($filename, 'data'); @@ -380,7 +380,7 @@ function is_uploaded_file($filename): bool * * This overwrite is for testing the move operation. */ -function move_uploaded_file($filename, $destination, ?bool $setReturnValue = null): bool +function move_uploaded_file(string $filename, string $destination, ?bool $setReturnValue = null): bool { static $return = true; @@ -396,7 +396,7 @@ function move_uploaded_file($filename, $destination, ?bool $setReturnValue = nul return $return; } -function rrmdir($src): void +function rrmdir(string $src): void { $dir = opendir($src); diff --git a/tests/system/HTTP/MessageTest.php b/tests/system/HTTP/MessageTest.php index 9307c3eef999..f921795c2a48 100644 --- a/tests/system/HTTP/MessageTest.php +++ b/tests/system/HTTP/MessageTest.php @@ -196,7 +196,7 @@ public function testSetHeaderArrayValues(): void } /** - * @param array $arrayHeaderValue + * @param list $arrayHeaderValue */ #[DataProvider('provideArrayHeaderValue')] public function testSetHeaderWithExistingArrayValuesAppendStringValue($arrayHeaderValue): void @@ -208,7 +208,7 @@ public function testSetHeaderWithExistingArrayValuesAppendStringValue($arrayHead } /** - * @param array $arrayHeaderValue + * @param list $arrayHeaderValue */ #[DataProvider('provideArrayHeaderValue')] public function testSetHeaderWithExistingArrayValuesAppendArrayValue($arrayHeaderValue): void @@ -219,6 +219,9 @@ public function testSetHeaderWithExistingArrayValuesAppendArrayValue($arrayHeade $this->assertSame('json, html, xml', $this->message->getHeaderLine('Accept')); } + /** + * @return iterable}> + */ public static function provideArrayHeaderValue(): iterable { return [ diff --git a/tests/system/HTTP/RedirectResponseTest.php b/tests/system/HTTP/RedirectResponseTest.php index b06e437fcffe..bd597078f720 100644 --- a/tests/system/HTTP/RedirectResponseTest.php +++ b/tests/system/HTTP/RedirectResponseTest.php @@ -37,11 +37,6 @@ #[Group('SeparateProcess')] final class RedirectResponseTest extends CIUnitTestCase { - /** - * @var RouteCollection - */ - protected $routes; - private MockIncomingRequest $request; private App $config; diff --git a/tests/system/HTTP/ResponseCookieTest.php b/tests/system/HTTP/ResponseCookieTest.php index 6fb03d516a9f..55a832a3581d 100644 --- a/tests/system/HTTP/ResponseCookieTest.php +++ b/tests/system/HTTP/ResponseCookieTest.php @@ -28,6 +28,9 @@ #[Group('Others')] final class ResponseCookieTest extends CIUnitTestCase { + /** + * @var array + */ private array $defaults; protected function setUp(): void diff --git a/tests/system/HTTP/ResponseTest.php b/tests/system/HTTP/ResponseTest.php index 97ab68be36c8..939b29b148f5 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -33,6 +33,9 @@ #[Group('Others')] final class ResponseTest extends CIUnitTestCase { + /** + * @var array + */ private array $server; protected function setUp(): void @@ -296,6 +299,9 @@ public function testRedirect( $this->assertSame($expectedCode, $response->getStatusCode()); } + /** + * @return iterable + */ public static function provideRedirect(): iterable { yield from [ @@ -341,6 +347,9 @@ public function testRedirectWithIIS( service('superglobals')->unsetServer('SERVER_SOFTWARE'); } + /** + * @return iterable + */ public static function provideRedirectWithIIS(): iterable { yield from [ diff --git a/tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php b/tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php index b864e493bb5f..4bc29fbecc4d 100644 --- a/tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php +++ b/tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php @@ -37,6 +37,9 @@ protected function setUp(): void Services::injectMock('superglobals', new Superglobals()); } + /** + * @param array $server + */ private function createSiteURIFactory(array $server, ?App $appConfig = null): SiteURIFactory { $appConfig ??= new App(); @@ -316,6 +319,9 @@ public function testExtensionPHP($path, $detectPath): void $this->assertSame($detectPath, $factory->detectRoutePath()); } + /** + * @return iterable + */ public static function provideExtensionPHP(): iterable { return [ diff --git a/tests/system/HTTP/SiteURIFactoryTest.php b/tests/system/HTTP/SiteURIFactoryTest.php index 8057c7826d62..5c062371a3ad 100644 --- a/tests/system/HTTP/SiteURIFactoryTest.php +++ b/tests/system/HTTP/SiteURIFactoryTest.php @@ -106,6 +106,9 @@ public function testCreateFromStringWithIndexPage( $this->assertSame($expectedRoutePath, $uri->getRoutePath()); } + /** + * @return iterable + */ public static function provideCreateFromStringWithIndexPage(): iterable { return [ @@ -149,6 +152,9 @@ public function testCreateFromStringWithoutIndexPage( $this->assertSame($expectedRoutePath, $uri->getRoutePath()); } + /** + * @return iterable + */ public static function provideCreateFromStringWithoutIndexPage(): iterable { return [ diff --git a/tests/system/HTTP/SiteURITest.php b/tests/system/HTTP/SiteURITest.php index 1208edaf05b9..d4f0f6f66c62 100644 --- a/tests/system/HTTP/SiteURITest.php +++ b/tests/system/HTTP/SiteURITest.php @@ -29,6 +29,9 @@ #[Group('Others')] final class SiteURITest extends CIUnitTestCase { + /** + * @param list $expectedSegments + */ #[DataProvider('provideConstructor')] public function testConstructor( string $baseURL, @@ -61,11 +64,17 @@ public function testConstructor( $this->assertSame($expectedTotalSegments, $uri->getTotalSegments()); } + /** + * @return iterable, int}> + */ public static function provideConstructor(): iterable { return array_merge(self::provideSetPath(), self::provideRelativePathWithQueryOrFragment()); } + /** + * @return iterable + */ public static function provideRelativePathWithQueryOrFragment(): iterable { return [ @@ -177,6 +186,9 @@ public function testConstructorInvalidBaseURL(): void new SiteURI($config); } + /** + * @param list $expectedSegments + */ #[DataProvider('provideSetPath')] public function testSetPath( string $baseURL, @@ -209,6 +221,9 @@ public function testSetPath( $this->assertSame($expectedTotalSegments, $uri->getTotalSegments()); } + /** + * @return iterable, int}> + */ public static function provideSetPath(): iterable { return [ diff --git a/tests/system/HTTP/URITest.php b/tests/system/HTTP/URITest.php index 8f2941af82c5..273f6cba1095 100644 --- a/tests/system/HTTP/URITest.php +++ b/tests/system/HTTP/URITest.php @@ -137,6 +137,9 @@ public function testSimpleUri(string $url, string $expectedURL, string $expected $this->assertSame($expectedPath, $uri->getPath()); } + /** + * @return iterable + */ public static function provideSimpleUri(): iterable { return [ @@ -412,6 +415,9 @@ public function testSetPath(string $path, string $expectedURL, string $expectedP $this->assertSame($expectedPath, $uri->getPath()); } + /** + * @return iterable + */ public static function provideSetPath(): iterable { return [ @@ -481,6 +487,9 @@ public function testPathGetsFiltered($path, $expected): void $this->assertSame($expected, $uri->getPath()); } + /** + * @return iterable + */ public static function providePathGetsFiltered(): iterable { return [ @@ -615,6 +624,9 @@ public function testAuthorityReturnsExceptedValues($url, $expected): void $this->assertSame($expected, $uri->getAuthority()); } + /** + * @return iterable + */ public static function provideAuthorityReturnsExceptedValues(): iterable { return [ @@ -667,6 +679,9 @@ public function testAuthorityRemovesDefaultPorts($scheme, $port): void $this->assertSame($expected, (string) $uri); } + /** + * @return iterable + */ public static function provideAuthorityRemovesDefaultPorts(): iterable { return [ @@ -701,6 +716,9 @@ public function testRemoveDotSegments($path, $expected): void $this->assertSame($expected, URI::removeDotSegments($path)); } + /** + * @return iterable + */ public static function provideRemoveDotSegments(): iterable { return [ @@ -831,6 +849,9 @@ public function testResolveRelativeURIHTTPS($rel, $expected): void $this->assertSame($expected, (string) $new); } + /** + * @return iterable + */ public static function defaultResolutions(): iterable { return [ @@ -1071,7 +1092,10 @@ public function testBasedNoIndex(): void (string) $request->getUri(), ); $this->assertSame('/ci/v4/controller/method', $request->getUri()->getPath()); - $this->assertSame('controller/method', $request->getUri()->getRoutePath()); + + $requestUri = $request->getUri(); + $this->assertInstanceOf(SiteURI::class, $requestUri); + $this->assertSame('controller/method', $requestUri->getRoutePath()); // standalone $uri = new URI('http://example.com/ci/v4/controller/method'); diff --git a/utils/phpstan-baseline/argument.type.neon b/utils/phpstan-baseline/argument.type.neon index 80cb40694994..b31ccdede5f8 100644 --- a/utils/phpstan-baseline/argument.type.neon +++ b/utils/phpstan-baseline/argument.type.neon @@ -1,4 +1,4 @@ -# total 64 errors +# total 56 errors parameters: ignoreErrors: @@ -97,31 +97,6 @@ parameters: count: 1 path: ../../tests/system/Debug/TimerTest.php - - - message: '#^Parameter \#1 \$array of method CodeIgniter\\Superglobals\:\:setServerArray\(\) expects array\\|float\|int\|string\>, array\ given\.$#' - count: 1 - path: ../../tests/system/HTTP/MessageTest.php - - - - message: '#^Parameter \#3 \$expire of method CodeIgniter\\HTTP\\Response\:\:setCookie\(\) expects int, string given\.$#' - count: 1 - path: ../../tests/system/HTTP/ResponseSendTest.php - - - - message: '#^Parameter \#1 \$data of method CodeIgniter\\HTTP\\Message\:\:setBody\(\) expects string, array\\|string\> given\.$#' - count: 2 - path: ../../tests/system/HTTP/ResponseTest.php - - - - message: '#^Parameter \#3 \$expire of method CodeIgniter\\HTTP\\Response\:\:setCookie\(\) expects int, string given\.$#' - count: 2 - path: ../../tests/system/HTTP/ResponseTest.php - - - - message: '#^Parameter \#4 \$scheme of class CodeIgniter\\HTTP\\SiteURI constructor expects ''http''\|''https''\|null, '''' given\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURITest.php - - message: '#^Parameter \#2 \$value of function form_hidden expects array\|string, null given\.$#' count: 1 @@ -137,11 +112,6 @@ parameters: count: 1 path: ../../tests/system/HomeTest.php - - - message: '#^Parameter \#1 \$data of method CodeIgniter\\HTTP\\Message\:\:setBody\(\) expects string, null given\.$#' - count: 1 - path: ../../tests/system/Honeypot/HoneypotTest.php - - message: '#^Parameter \#2 \$message of method CodeIgniter\\Log\\Handlers\\ChromeLoggerHandler\:\:handle\(\) expects string, stdClass given\.$#' count: 1 @@ -162,16 +132,6 @@ parameters: count: 1 path: ../../tests/system/Test/FeatureTestTraitTest.php - - - message: '#^Parameter \#1 \$body of method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) expects array\|object\|string, false given\.$#' - count: 1 - path: ../../tests/system/Test/TestResponseTest.php - - - - message: '#^Parameter \#1 \$body of method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) expects array\|object\|string, true given\.$#' - count: 1 - path: ../../tests/system/Test/TestResponseTest.php - - message: '#^Parameter \#3 \$errors of method CodeIgniter\\Validation\\Validation\:\:check\(\) expects list\, array\{is_numeric\: ''Nope\. Not a number\.''\} given\.$#' count: 1 @@ -201,3 +161,13 @@ parameters: message: '#^Parameter \#2 \$resultID of class CodeIgniter\\View\\DBResultDummy constructor expects mysqli_result, null given\.$#' count: 2 path: ../../tests/system/View/TableTest.php + + - + message: '#^Parameter \#1 \$body of method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) expects array\\|object\|string, false given\.$#' + count: 1 + path: ../../tests/system/Test/TestResponseTest.php + + - + message: '#^Parameter \#1 \$body of method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) expects array\\|object\|string, true given\.$#' + count: 1 + path: ../../tests/system/Test/TestResponseTest.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 57a1c5ee9257..4e2e6713ccc4 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 1381 errors +# total 1214 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/method.childReturnType.neon b/utils/phpstan-baseline/method.childReturnType.neon index 6e6a320a6177..1be112b559f7 100644 --- a/utils/phpstan-baseline/method.childReturnType.neon +++ b/utils/phpstan-baseline/method.childReturnType.neon @@ -3,11 +3,11 @@ parameters: ignoreErrors: - - message: '#^Return type \(bool\) of method CodeIgniter\\HTTP\\Files\\UploadedFile\:\:move\(\) should be compatible with return type \(CodeIgniter\\Files\\File\) of method CodeIgniter\\Files\\File\:\:move\(\)$#' + message: '#^Return type \(CodeIgniter\\HTTP\\URI\|null\) of method CodeIgniter\\HTTP\\OutgoingRequest\:\:getUri\(\) should be covariant with return type \(CodeIgniter\\HTTP\\URI\) of method CodeIgniter\\HTTP\\OutgoingRequestInterface\:\:getUri\(\)$#' count: 1 - path: ../../system/HTTP/Files/UploadedFile.php + path: ../../system/HTTP/OutgoingRequest.php - - message: '#^Return type \(CodeIgniter\\HTTP\\URI\|null\) of method CodeIgniter\\HTTP\\OutgoingRequest\:\:getUri\(\) should be covariant with return type \(CodeIgniter\\HTTP\\URI\) of method CodeIgniter\\HTTP\\OutgoingRequestInterface\:\:getUri\(\)$#' + message: '#^Return type \(bool\) of method CodeIgniter\\HTTP\\Files\\UploadedFile\:\:move\(\) should be compatible with return type \(CodeIgniter\\Files\\File\) of method CodeIgniter\\Files\\File\:\:move\(\)$#' count: 1 - path: ../../system/HTTP/OutgoingRequest.php + path: ../../system/HTTP/Files/UploadedFile.php diff --git a/utils/phpstan-baseline/method.notFound.neon b/utils/phpstan-baseline/method.notFound.neon index f0497ca809ae..f201cc43dad7 100644 --- a/utils/phpstan-baseline/method.notFound.neon +++ b/utils/phpstan-baseline/method.notFound.neon @@ -1,4 +1,4 @@ -# total 33 errors +# total 32 errors parameters: ignoreErrors: @@ -42,11 +42,6 @@ parameters: count: 3 path: ../../tests/system/Debug/ExceptionHandlerTest.php - - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\URI\:\:getRoutePath\(\)\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - message: '#^Call to an undefined method org\\bovigo\\vfs\\visitor\\vfsStreamVisitor\:\:getStructure\(\)\.$#' count: 2 @@ -77,11 +72,6 @@ parameters: count: 1 path: ../../tests/system/RESTful/ResourceControllerTest.php - - - message: '#^Call to an undefined method CodeIgniter\\Test\\TestResponse\:\:ohno\(\)\.$#' - count: 1 - path: ../../tests/system/Test/ControllerTestTraitTest.php - - message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:compileTemplate\(\)\.$#' count: 2 @@ -106,3 +96,8 @@ parameters: message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:setFromDBResult\(\)\.$#' count: 1 path: ../../tests/system/View/TableTest.php + + - + message: '#^Call to an undefined method CodeIgniter\\Test\\TestResponse\:\:ohno\(\)\.$#' + count: 1 + path: ../../tests/system/Test/ControllerTestTraitTest.php diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index 518e931c13d8..4d07b6f93724 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1129 errors +# total 977 errors parameters: ignoreErrors: @@ -2112,631 +2112,6 @@ parameters: count: 1 path: ../../system/Filters/PerformanceMetrics.php - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getArgs\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getCookie\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getCookie\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getOptions\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getSegments\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:returnNullOrEmptyArray\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:returnNullOrEmptyArray\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CLIRequest\:\:\$args type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CLIRequest\:\:\$options type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CLIRequest\:\:\$segments type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CLIRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:applyBody\(\) has parameter \$curlOptions with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:applyBody\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:applyMethod\(\) has parameter \$curlOptions with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:applyMethod\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:applyRequestHeaders\(\) has parameter \$curlOptions with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:applyRequestHeaders\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:delete\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:get\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:head\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:options\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:parseOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:patch\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:post\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:put\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:request\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setCURLOptions\(\) has parameter \$config with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setCURLOptions\(\) has parameter \$curlOptions with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setCURLOptions\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setForm\(\) has parameter \$params with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setResponseHeaders\(\) has parameter \$headers with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CURLRequest\:\:\$config type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CURLRequest\:\:\$defaultConfig type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CURLRequest\:\:\$defaultOptions type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\CURLRequest\:\:\$redirectDefaults type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\Files\\FileCollection\:\:all\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Method CodeIgniter\\HTTP\\Files\\FileCollection\:\:createFileObject\(\) has parameter \$array with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Method CodeIgniter\\HTTP\\Files\\FileCollection\:\:fixFilesArray\(\) has parameter \$data with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Method CodeIgniter\\HTTP\\Files\\FileCollection\:\:fixFilesArray\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Method CodeIgniter\\HTTP\\Files\\FileCollection\:\:getValueDotNotationSyntax\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Method CodeIgniter\\HTTP\\Files\\FileCollection\:\:getValueDotNotationSyntax\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Property CodeIgniter\\HTTP\\Files\\FileCollection\:\:\$files type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getCookie\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getCookie\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getFileMultiple\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getFiles\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getJsonVar\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getJsonVar\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getOldInput\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInput\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getVar\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getVar\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:negotiate\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:setValidLocales\(\) has parameter \$locales with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\IncomingRequest\:\:\$oldInput type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Property CodeIgniter\\HTTP\\IncomingRequest\:\:\$validLocales type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\Message\:\:getHeader\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Message.php - - - - message: '#^Method CodeIgniter\\HTTP\\Message\:\:setHeader\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Message.php - - - - message: '#^Property CodeIgniter\\HTTP\\Message\:\:\$headerMap type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Message.php - - - - message: '#^Property CodeIgniter\\HTTP\\Message\:\:\$validProtocolVersions type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Message.php - - - - message: '#^Method CodeIgniter\\HTTP\\MessageInterface\:\:setHeader\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/MessageInterface.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:charset\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:encoding\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:getBestMatch\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:language\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchLocales\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchLocales\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchParameters\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchParameters\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchTypes\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchTypes\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:match\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:media\(\) has parameter \$supported with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:parseHeader\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - - - message: '#^Method CodeIgniter\\HTTP\\OutgoingRequest\:\:__construct\(\) has parameter \$headers with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/OutgoingRequest.php - - - - message: '#^Method CodeIgniter\\HTTP\\RedirectResponse\:\:route\(\) has parameter \$params with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/RedirectResponse.php - - - - message: '#^Method CodeIgniter\\HTTP\\RedirectResponse\:\:with\(\) has parameter \$message with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/RedirectResponse.php - - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:fetchGlobal\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:fetchGlobal\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:getEnv\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:getEnv\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:getServer\(\) has parameter \$flags with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:getServer\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - - - message: '#^Property CodeIgniter\\HTTP\\Request\:\:\$globals type has no value type specified in iterable type array\.$#' - count: 5 - path: ../../system/HTTP/Request.php - - - - message: '#^Method CodeIgniter\\HTTP\\RequestInterface\:\:getServer\(\) has parameter \$index with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/RequestInterface.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:doSetCookie\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:doSetRawCookie\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:formatBody\(\) has parameter \$body with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:setCache\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:setCookie\(\) has parameter \$name with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) has parameter \$body with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\Response\:\:setXML\(\) has parameter \$body with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Property CodeIgniter\\HTTP\\Response\:\:\$statusCodes type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Response.php - - - - message: '#^Method CodeIgniter\\HTTP\\ResponseInterface\:\:setCache\(\) has parameter \$options with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/ResponseInterface.php - - - - message: '#^Method CodeIgniter\\HTTP\\ResponseInterface\:\:setCookie\(\) has parameter \$name with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/ResponseInterface.php - - - - message: '#^Method CodeIgniter\\HTTP\\ResponseInterface\:\:setJSON\(\) has parameter \$body with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/ResponseInterface.php - - - - message: '#^Method CodeIgniter\\HTTP\\ResponseInterface\:\:setXML\(\) has parameter \$body with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/ResponseInterface.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURI\:\:baseUrl\(\) has parameter \$relativePath with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/SiteURI.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURI\:\:convertToSegments\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/SiteURI.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURI\:\:parseRelativePath\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/SiteURI.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURI\:\:siteUrl\(\) has parameter \$relativePath with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/SiteURI.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURI\:\:stringifyRelativePath\(\) has parameter \$relativePath with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/SiteURI.php - - - - message: '#^Property CodeIgniter\\HTTP\\SiteURI\:\:\$baseSegments type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/SiteURI.php - - - - message: '#^Method CodeIgniter\\HTTP\\URI\:\:setQueryArray\(\) has parameter \$query with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/URI.php - - message: '#^Method CodeIgniter\\Helpers\\Array\\ArrayHelper\:\:arrayAttachIndexedValue\(\) has parameter \$indexes with no value type specified in iterable type array\.$#' count: 1 @@ -3600,127 +2975,32 @@ parameters: - message: '#^Method CodeIgniter\\Router\\Router\:\:validateRequest\(\) has parameter \$segments with no value type specified in iterable type array\.$#' count: 1 - path: ../../system/Router/Router.php - - - - message: '#^Method CodeIgniter\\Router\\Router\:\:validateRequest\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Router/Router.php - - - - message: '#^Property CodeIgniter\\Router\\Router\:\:\$matchedRoute type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Router/Router.php - - - - message: '#^Property CodeIgniter\\Router\\Router\:\:\$matchedRouteOptions type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Router/Router.php - - - - message: '#^Property CodeIgniter\\Router\\Router\:\:\$params type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Router/Router.php - - - - message: '#^Method CodeIgniter\\Router\\RouterInterface\:\:params\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Router/RouterInterface.php - - - - message: '#^Method CodeIgniter\\Test\\Constraints\\SeeInDatabase\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Constraints/SeeInDatabase.php - - - - message: '#^Property CodeIgniter\\Test\\Constraints\\SeeInDatabase\:\:\$data type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Constraints/SeeInDatabase.php - - - - message: '#^Method CodeIgniter\\Test\\DOMParser\:\:doXPath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/DOMParser.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:__construct\(\) has parameter \$formatters with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:createMock\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:create\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:getFormatters\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:getOverrides\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:makeArray\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:make\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:setFormatters\(\) has parameter \$formatters with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:setOverrides\(\) has parameter \$overrides with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$dateFields type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php - - - - message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$formatters type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Test/Fabricator.php + path: ../../system/Router/Router.php - - message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$overrides type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\Router\:\:validateRequest\(\) return type has no value type specified in iterable type array\.$#' count: 1 - path: ../../system/Test/Fabricator.php + path: ../../system/Router/Router.php - - message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$tableCounts type has no value type specified in iterable type array\.$#' + message: '#^Property CodeIgniter\\Router\\Router\:\:\$matchedRoute type has no value type specified in iterable type array\.$#' count: 1 - path: ../../system/Test/Fabricator.php + path: ../../system/Router/Router.php - - message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$tempOverrides type has no value type specified in iterable type array\.$#' + message: '#^Property CodeIgniter\\Router\\Router\:\:\$matchedRouteOptions type has no value type specified in iterable type array\.$#' count: 1 - path: ../../system/Test/Fabricator.php + path: ../../system/Router/Router.php - - message: '#^Method CodeIgniter\\Test\\TestResponse\:\:assertJSONExact\(\) has parameter \$test with no value type specified in iterable type array\.$#' + message: '#^Property CodeIgniter\\Router\\Router\:\:\$params type has no value type specified in iterable type array\.$#' count: 1 - path: ../../system/Test/TestResponse.php + path: ../../system/Router/Router.php - - message: '#^Method CodeIgniter\\Test\\TestResponse\:\:assertJSONFragment\(\) has parameter \$fragment with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouterInterface\:\:params\(\) return type has no value type specified in iterable type array\.$#' count: 1 - path: ../../system/Test/TestResponse.php + path: ../../system/Router/RouterInterface.php - message: '#^Method CodeIgniter\\Typography\\Typography\:\:protectCharacters\(\) has parameter \$match with no value type specified in iterable type array\.$#' @@ -4467,121 +3747,6 @@ parameters: count: 1 path: ../../tests/system/Filters/InvalidCharsTest.php - - - message: '#^Method CodeIgniter\\HTTP\\MessageTest\:\:provideArrayHeaderValue\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/MessageTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\MessageTest\:\:testSetHeaderWithExistingArrayValuesAppendArrayValue\(\) has parameter \$arrayHeaderValue with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/MessageTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\MessageTest\:\:testSetHeaderWithExistingArrayValuesAppendStringValue\(\) has parameter \$arrayHeaderValue with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/MessageTest.php - - - - message: '#^Property CodeIgniter\\HTTP\\ResponseCookieTest\:\:\$defaults type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/ResponseCookieTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\ResponseTest\:\:provideRedirectWithIIS\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/ResponseTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\ResponseTest\:\:provideRedirect\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/ResponseTest.php - - - - message: '#^Property CodeIgniter\\HTTP\\ResponseTest\:\:\$server type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/ResponseTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURIFactoryDetectRoutePathTest\:\:createSiteURIFactory\(\) has parameter \$server with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURIFactoryDetectRoutePathTest\:\:provideExtensionPHP\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURIFactoryTest\:\:provideCreateFromStringWithIndexPage\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURIFactoryTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURIFactoryTest\:\:provideCreateFromStringWithoutIndexPage\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURIFactoryTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURITest\:\:provideConstructor\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURITest\:\:provideRelativePathWithQueryOrFragment\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURITest\:\:provideSetPath\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURITest\:\:testConstructor\(\) has parameter \$expectedSegments with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\SiteURITest\:\:testSetPath\(\) has parameter \$expectedSegments with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/HTTP/SiteURITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:defaultResolutions\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:provideAuthorityRemovesDefaultPorts\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:provideAuthorityReturnsExceptedValues\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:providePathGetsFiltered\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:provideRemoveDotSegments\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:provideSetPath\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - - - message: '#^Method CodeIgniter\\HTTP\\URITest\:\:provideSimpleUri\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/URITest.php - - message: '#^Property CodeIgniter\\Helpers\\Array\\ArrayHelperDotKeyExistsTest\:\:\$array type has no value type specified in iterable type array\.$#' count: 1 @@ -4982,16 +4147,6 @@ parameters: count: 1 path: ../../tests/system/Test/ControllerTestTraitTest.php - - - message: '#^Method CodeIgniter\\Test\\DOMParserTest\:\:provideText\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/Test/DOMParserTest.php - - - - message: '#^Property CodeIgniter\\Test\\FabricatorTest\:\:\$formatters type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/Test/FabricatorTest.php - - message: '#^Method CodeIgniter\\Test\\FeatureTestAutoRoutingImprovedTest\:\:call\(\) has parameter \$params with no value type specified in iterable type array\.$#' count: 1 @@ -5072,11 +4227,6 @@ parameters: count: 1 path: ../../tests/system/Test/FeatureTestTraitTest.php - - - message: '#^Method CodeIgniter\\Test\\FeatureTestTraitTest\:\:provideOpenCliRoutesFromHttpGot404\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/Test/FeatureTestTraitTest.php - - message: '#^Method CodeIgniter\\Test\\FeatureTestTraitTest\:\:put\(\) has parameter \$params with no value type specified in iterable type array\.$#' count: 1 @@ -5097,26 +4247,6 @@ parameters: count: 1 path: ../../tests/system/Test/IniTestTraitTest.php - - - message: '#^Method CodeIgniter\\Test\\TestLoggerTest\:\:provideDidLogMethod\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/Test/TestLoggerTest.php - - - - message: '#^Method CodeIgniter\\Test\\TestResponseTest\:\:getTestResponse\(\) has parameter \$headers with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/Test/TestResponseTest.php - - - - message: '#^Method CodeIgniter\\Test\\TestResponseTest\:\:getTestResponse\(\) has parameter \$responseOptions with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/Test/TestResponseTest.php - - - - message: '#^Method CodeIgniter\\Test\\TestResponseTest\:\:provideHttpStatusCodes\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/Test/TestResponseTest.php - - message: '#^Method CodeIgniter\\Throttle\\ThrottleTest\:\:provideTokenTimeCalculationUCs\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 @@ -5611,3 +4741,133 @@ parameters: message: '#^Method CodeIgniter\\View\\TableTest\:\:testGenerateOrderedColumns\(\) has parameter \$row with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/View/TableTest.php + + - + message: '#^Method CodeIgniter\\Test\\Constraints\\SeeInDatabase\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Constraints/SeeInDatabase.php + + - + message: '#^Method CodeIgniter\\Test\\DOMParserTest\:\:provideText\(\) return type has no value type specified in iterable type iterable\.$#' + count: 1 + path: ../../tests/system/Test/DOMParserTest.php + + - + message: '#^Method CodeIgniter\\Test\\DOMParser\:\:doXPath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/DOMParser.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:__construct\(\) has parameter \$formatters with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:createMock\(\) return type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:create\(\) return type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:getFormatters\(\) return type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:getOverrides\(\) return type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:makeArray\(\) return type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:make\(\) return type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:setFormatters\(\) has parameter \$formatters with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:setOverrides\(\) has parameter \$overrides with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Method CodeIgniter\\Test\\FeatureTestTraitTest\:\:provideOpenCliRoutesFromHttpGot404\(\) return type has no value type specified in iterable type iterable\.$#' + count: 1 + path: ../../tests/system/Test/FeatureTestTraitTest.php + + - + message: '#^Method CodeIgniter\\Test\\TestLoggerTest\:\:provideDidLogMethod\(\) return type has no value type specified in iterable type iterable\.$#' + count: 1 + path: ../../tests/system/Test/TestLoggerTest.php + + - + message: '#^Method CodeIgniter\\Test\\TestResponseTest\:\:getTestResponse\(\) has parameter \$headers with no value type specified in iterable type array\.$#' + count: 1 + path: ../../tests/system/Test/TestResponseTest.php + + - + message: '#^Method CodeIgniter\\Test\\TestResponseTest\:\:getTestResponse\(\) has parameter \$responseOptions with no value type specified in iterable type array\.$#' + count: 1 + path: ../../tests/system/Test/TestResponseTest.php + + - + message: '#^Method CodeIgniter\\Test\\TestResponseTest\:\:provideHttpStatusCodes\(\) return type has no value type specified in iterable type iterable\.$#' + count: 1 + path: ../../tests/system/Test/TestResponseTest.php + + - + message: '#^Method CodeIgniter\\Test\\TestResponse\:\:assertJSONExact\(\) has parameter \$test with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/TestResponse.php + + - + message: '#^Method CodeIgniter\\Test\\TestResponse\:\:assertJSONFragment\(\) has parameter \$fragment with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/TestResponse.php + + - + message: '#^Property CodeIgniter\\Test\\Constraints\\SeeInDatabase\:\:\$data type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Constraints/SeeInDatabase.php + + - + message: '#^Property CodeIgniter\\Test\\FabricatorTest\:\:\$formatters type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../tests/system/Test/FabricatorTest.php + + - + message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$dateFields type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$formatters type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$overrides type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$tableCounts type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php + + - + message: '#^Property CodeIgniter\\Test\\Fabricator\:\:\$tempOverrides type has no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Test/Fabricator.php diff --git a/utils/phpstan-baseline/missingType.parameter.neon b/utils/phpstan-baseline/missingType.parameter.neon index 0e1decdda219..0a04e771a32d 100644 --- a/utils/phpstan-baseline/missingType.parameter.neon +++ b/utils/phpstan-baseline/missingType.parameter.neon @@ -1,4 +1,4 @@ -# total 30 errors +# total 26 errors parameters: ignoreErrors: @@ -52,26 +52,6 @@ parameters: count: 1 path: ../../tests/system/Filters/FiltersTest.php - - - message: '#^Function CodeIgniter\\HTTP\\Files\\is_uploaded_file\(\) has parameter \$filename with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\move_uploaded_file\(\) has parameter \$destination with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\move_uploaded_file\(\) has parameter \$filename with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\rrmdir\(\) has parameter \$src with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\CurrentUrlTest\:\:createRequest\(\) has parameter \$body with no type specified\.$#' count: 1 diff --git a/utils/phpstan-baseline/property.phpDocType.neon b/utils/phpstan-baseline/property.phpDocType.neon index a6812dfb728d..745a740bd8dc 100644 --- a/utils/phpstan-baseline/property.phpDocType.neon +++ b/utils/phpstan-baseline/property.phpDocType.neon @@ -1,4 +1,4 @@ -# total 38 errors +# total 36 errors parameters: ignoreErrors: @@ -122,21 +122,6 @@ parameters: count: 1 path: ../../system/Exceptions/PageNotFoundException.php - - - message: '#^PHPDoc type int of property CodeIgniter\\HTTP\\Exceptions\\RedirectException\:\:\$code is not the same as PHPDoc type mixed of overridden property Exception\:\:\$code\.$#' - count: 1 - path: ../../system/HTTP/Exceptions/RedirectException.php - - - - message: '#^PHPDoc type string of property CodeIgniter\\HTTP\\Files\\UploadedFile\:\:\$originalMimeType is not the same as PHPDoc type string\|null of overridden property CodeIgniter\\Files\\File\:\:\$originalMimeType\.$#' - count: 1 - path: ../../system/HTTP/Files/UploadedFile.php - - - - message: '#^PHPDoc type CodeIgniter\\HTTP\\URI of property CodeIgniter\\HTTP\\IncomingRequest\:\:\$uri is not the same as PHPDoc type CodeIgniter\\HTTP\\URI\|null of overridden property CodeIgniter\\HTTP\\OutgoingRequest\:\:\$uri\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^PHPDoc type string of property CodeIgniter\\Session\\Handlers\\FileHandler\:\:\$savePath is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\Session\\Handlers\\BaseHandler\:\:\$savePath\.$#' count: 1 @@ -172,11 +157,6 @@ parameters: count: 1 path: ../../tests/system/Database/Live/SQLite3/GetIndexDataTest.php - - - message: '#^PHPDoc type CodeIgniter\\Router\\RouteCollection of property CodeIgniter\\HTTP\\RedirectResponseTest\:\:\$routes is not the same as PHPDoc type CodeIgniter\\Router\\RouteCollection\|null of overridden property CodeIgniter\\Test\\CIUnitTestCase\:\:\$routes\.$#' - count: 1 - path: ../../tests/system/HTTP/RedirectResponseTest.php - - message: '#^PHPDoc type Tests\\Support\\Models\\EventModel of property CodeIgniter\\Models\\EventsModelTest\:\:\$model is not the same as PHPDoc type CodeIgniter\\Model of overridden property CodeIgniter\\Models\\LiveModelTestCase\:\:\$model\.$#' count: 1 @@ -191,3 +171,13 @@ parameters: message: '#^PHPDoc type CodeIgniter\\Router\\RouteCollection of property CodeIgniter\\RESTful\\ResourcePresenterTest\:\:\$routes is not the same as PHPDoc type CodeIgniter\\Router\\RouteCollection\|null of overridden property CodeIgniter\\Test\\CIUnitTestCase\:\:\$routes\.$#' count: 1 path: ../../tests/system/RESTful/ResourcePresenterTest.php + + - + message: '#^PHPDoc type CodeIgniter\\HTTP\\URI of property CodeIgniter\\HTTP\\IncomingRequest\:\:\$uri is not the same as PHPDoc type CodeIgniter\\HTTP\\URI\|null of overridden property CodeIgniter\\HTTP\\OutgoingRequest\:\:\$uri\.$#' + count: 1 + path: ../../system/HTTP/IncomingRequest.php + + - + message: '#^PHPDoc type int of property CodeIgniter\\HTTP\\Exceptions\\RedirectException\:\:\$code is not the same as PHPDoc type mixed of overridden property Exception\:\:\$code\.$#' + count: 1 + path: ../../system/HTTP/Exceptions/RedirectException.php