Skip to content

Commit 5a87990

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.4
Conflicts: user_guide_src/source/models/entities.rst
2 parents 4799e78 + 6815f3f commit 5a87990

27 files changed

Lines changed: 191 additions & 168 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"phpunit/phpcov": "^8.2",
3131
"phpunit/phpunit": "^9.1",
3232
"predis/predis": "^1.1 || ^2.0",
33-
"rector/rector": "0.17.11",
33+
"rector/rector": "0.17.12",
3434
"vimeo/psalm": "^5.0"
3535
},
3636
"suggest": {

phpstan-baseline.php

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -826,81 +826,11 @@
826826
'count' => 1,
827827
'path' => __DIR__ . '/system/Filters/Filters.php',
828828
];
829-
$ignoreErrors[] = [
830-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CLIRequest\\:\\:parseCommand\\(\\) has no return type specified\\.$#',
831-
'count' => 1,
832-
'path' => __DIR__ . '/system/HTTP/CLIRequest.php',
833-
];
834829
$ignoreErrors[] = [
835830
'message' => '#^Constructor of class CodeIgniter\\\\HTTP\\\\CURLRequest has an unused parameter \\$config\\.$#',
836831
'count' => 1,
837832
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
838833
];
839-
$ignoreErrors[] = [
840-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:parseOptions\\(\\) has no return type specified\\.$#',
841-
'count' => 1,
842-
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
843-
];
844-
$ignoreErrors[] = [
845-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:resetOptions\\(\\) has no return type specified\\.$#',
846-
'count' => 1,
847-
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
848-
];
849-
$ignoreErrors[] = [
850-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:setResponseHeaders\\(\\) has no return type specified\\.$#',
851-
'count' => 1,
852-
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
853-
];
854-
$ignoreErrors[] = [
855-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\ContentSecurityPolicy\\:\\:addOption\\(\\) has no return type specified\\.$#',
856-
'count' => 1,
857-
'path' => __DIR__ . '/system/HTTP/ContentSecurityPolicy.php',
858-
];
859-
$ignoreErrors[] = [
860-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\ContentSecurityPolicy\\:\\:addToHeader\\(\\) has no return type specified\\.$#',
861-
'count' => 1,
862-
'path' => __DIR__ . '/system/HTTP/ContentSecurityPolicy.php',
863-
];
864-
$ignoreErrors[] = [
865-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\ContentSecurityPolicy\\:\\:buildHeaders\\(\\) has no return type specified\\.$#',
866-
'count' => 1,
867-
'path' => __DIR__ . '/system/HTTP/ContentSecurityPolicy.php',
868-
];
869-
$ignoreErrors[] = [
870-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\ContentSecurityPolicy\\:\\:finalize\\(\\) has no return type specified\\.$#',
871-
'count' => 1,
872-
'path' => __DIR__ . '/system/HTTP/ContentSecurityPolicy.php',
873-
];
874-
$ignoreErrors[] = [
875-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\ContentSecurityPolicy\\:\\:generateNonces\\(\\) has no return type specified\\.$#',
876-
'count' => 1,
877-
'path' => __DIR__ . '/system/HTTP/ContentSecurityPolicy.php',
878-
];
879-
$ignoreErrors[] = [
880-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\DownloadResponse\\:\\:buildHeaders\\(\\) has no return type specified\\.$#',
881-
'count' => 1,
882-
'path' => __DIR__ . '/system/HTTP/DownloadResponse.php',
883-
];
884-
$ignoreErrors[] = [
885-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\DownloadResponse\\:\\:setBinary\\(\\) has no return type specified\\.$#',
886-
'count' => 1,
887-
'path' => __DIR__ . '/system/HTTP/DownloadResponse.php',
888-
];
889-
$ignoreErrors[] = [
890-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\DownloadResponse\\:\\:setContentTypeByMimeType\\(\\) has no return type specified\\.$#',
891-
'count' => 1,
892-
'path' => __DIR__ . '/system/HTTP/DownloadResponse.php',
893-
];
894-
$ignoreErrors[] = [
895-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\DownloadResponse\\:\\:setFilePath\\(\\) has no return type specified\\.$#',
896-
'count' => 1,
897-
'path' => __DIR__ . '/system/HTTP/DownloadResponse.php',
898-
];
899-
$ignoreErrors[] = [
900-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:populateFiles\\(\\) has no return type specified\\.$#',
901-
'count' => 1,
902-
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
903-
];
904834
$ignoreErrors[] = [
905835
'message' => '#^Expression on left side of \\?\\? is not nullable\\.$#',
906836
'count' => 1,
@@ -916,21 +846,6 @@
916846
'count' => 1,
917847
'path' => __DIR__ . '/system/HTTP/Files/UploadedFile.php',
918848
];
919-
$ignoreErrors[] = [
920-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\UploadedFileInterface\\:\\:move\\(\\) has no return type specified\\.$#',
921-
'count' => 1,
922-
'path' => __DIR__ . '/system/HTTP/Files/UploadedFileInterface.php',
923-
];
924-
$ignoreErrors[] = [
925-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\IncomingRequest\\:\\:detectLocale\\(\\) has no return type specified\\.$#',
926-
'count' => 1,
927-
'path' => __DIR__ . '/system/HTTP/IncomingRequest.php',
928-
];
929-
$ignoreErrors[] = [
930-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\IncomingRequest\\:\\:detectURI\\(\\) has no return type specified\\.$#',
931-
'count' => 1,
932-
'path' => __DIR__ . '/system/HTTP/IncomingRequest.php',
933-
];
934849
$ignoreErrors[] = [
935850
'message' => '#^Property CodeIgniter\\\\HTTP\\\\Message\\:\\:\\$protocolVersion \\(string\\) on left side of \\?\\? is not nullable\\.$#',
936851
'count' => 1,
@@ -946,21 +861,6 @@
946861
'count' => 1,
947862
'path' => __DIR__ . '/system/HTTP/RedirectResponse.php',
948863
];
949-
$ignoreErrors[] = [
950-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Request\\:\\:populateGlobals\\(\\) has no return type specified\\.$#',
951-
'count' => 1,
952-
'path' => __DIR__ . '/system/HTTP/Request.php',
953-
];
954-
$ignoreErrors[] = [
955-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Response\\:\\:sendCookies\\(\\) has no return type specified\\.$#',
956-
'count' => 1,
957-
'path' => __DIR__ . '/system/HTTP/Response.php',
958-
];
959-
$ignoreErrors[] = [
960-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\URI\\:\\:applyParts\\(\\) has no return type specified\\.$#',
961-
'count' => 1,
962-
'path' => __DIR__ . '/system/HTTP/URI.php',
963-
];
964864
$ignoreErrors[] = [
965865
'message' => '#^Property CodeIgniter\\\\HTTP\\\\URI\\:\\:\\$fragment \\(string\\) on left side of \\?\\? is not nullable\\.$#',
966866
'count' => 1,
@@ -976,16 +876,6 @@
976876
'count' => 1,
977877
'path' => __DIR__ . '/system/HTTP/URI.php',
978878
];
979-
$ignoreErrors[] = [
980-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\UserAgent\\:\\:compileData\\(\\) has no return type specified\\.$#',
981-
'count' => 1,
982-
'path' => __DIR__ . '/system/HTTP/UserAgent.php',
983-
];
984-
$ignoreErrors[] = [
985-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\UserAgent\\:\\:parse\\(\\) has no return type specified\\.$#',
986-
'count' => 1,
987-
'path' => __DIR__ . '/system/HTTP/UserAgent.php',
988-
];
989879
$ignoreErrors[] = [
990880
'message' => '#^Right side of && is always true\\.$#',
991881
'count' => 1,

system/HTTP/CLIRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ public function getOptionString(bool $useLongOpts = false): string
175175
*
176176
* NOTE: I tried to use getopt but had it fail occasionally to find
177177
* any options, where argv has always had our back.
178+
*
179+
* @return void
178180
*/
179181
protected function parseCommand()
180182
{

system/HTTP/CURLRequest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ public function request($method, string $url, array $options = []): ResponseInte
151151

152152
/**
153153
* Reset all options to default.
154+
*
155+
* @return void
154156
*/
155157
protected function resetOptions()
156158
{
@@ -277,6 +279,8 @@ public function setJSON($data)
277279
/**
278280
* Sets the correct settings based on the options array
279281
* passed in.
282+
*
283+
* @return void
280284
*/
281285
protected function parseOptions(array $options)
282286
{
@@ -479,6 +483,8 @@ protected function applyBody(array $curlOptions = []): array
479483
/**
480484
* Parses the header retrieved from the cURL response into
481485
* our Response object.
486+
*
487+
* @return void
482488
*/
483489
protected function setResponseHeaders(array $headers = [])
484490
{

system/HTTP/ContentSecurityPolicy.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ public function getScriptNonce(): string
298298
* Compiles and sets the appropriate headers in the request.
299299
*
300300
* Should be called just prior to sending the response to the user agent.
301+
*
302+
* @return void
301303
*/
302304
public function finalize(ResponseInterface $response)
303305
{
@@ -641,6 +643,8 @@ public function upgradeInsecureRequests(bool $value = true)
641643
* DRY method to add an string or array to a class property.
642644
*
643645
* @param array|string $options
646+
*
647+
* @return void
644648
*/
645649
protected function addOption($options, string $target, ?bool $explicitReporting = null)
646650
{
@@ -662,6 +666,8 @@ protected function addOption($options, string $target, ?bool $explicitReporting
662666
* Scans the body of the request message and replaces any nonce
663667
* placeholders with actual nonces, that we'll then add to our
664668
* headers.
669+
*
670+
* @return void
665671
*/
666672
protected function generateNonces(ResponseInterface $response)
667673
{
@@ -688,6 +694,8 @@ protected function generateNonces(ResponseInterface $response)
688694
* Based on the current state of the elements, will add the appropriate
689695
* Content-Security-Policy and Content-Security-Policy-Report-Only headers
690696
* with their values to the response object.
697+
*
698+
* @return void
691699
*/
692700
protected function buildHeaders(ResponseInterface $response)
693701
{
@@ -768,6 +776,8 @@ protected function buildHeaders(ResponseInterface $response)
768776
* reportOnly header, since it's viable to have both simultaneously.
769777
*
770778
* @param array|string|null $values
779+
*
780+
* @return void
771781
*/
772782
protected function addToHeader(string $name, $values = null)
773783
{

system/HTTP/DownloadResponse.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ public function __construct(string $filename, bool $setMime)
7676

7777
/**
7878
* set download for binary string.
79+
*
80+
* @return void
7981
*/
8082
public function setBinary(string $binary)
8183
{
@@ -88,6 +90,8 @@ public function setBinary(string $binary)
8890

8991
/**
9092
* set download for file.
93+
*
94+
* @return void
9195
*/
9296
public function setFilePath(string $filepath)
9397
{
@@ -129,7 +133,7 @@ public function getContentLength(): int
129133
/**
130134
* Set content type by guessing mime type from file extension
131135
*/
132-
private function setContentTypeByMimeType()
136+
private function setContentTypeByMimeType(): void
133137
{
134138
$mime = null;
135139
$charset = '';
@@ -269,6 +273,8 @@ public function send()
269273

270274
/**
271275
* set header for file download.
276+
*
277+
* @return void
272278
*/
273279
public function buildHeaders()
274280
{

system/HTTP/Files/FileCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ public function hasFile(string $fileID): bool
135135
* of UploadedFile for each one, saving the results to this->files.
136136
*
137137
* Called by files(), file(), and hasFile()
138+
*
139+
* @return void
138140
*/
139141
protected function populateFiles()
140142
{

system/HTTP/Files/UploadedFileInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function __construct(string $path, string $originalName, ?string $mimeTyp
6060
* @param string $targetPath Path to which to move the uploaded file.
6161
* @param string $name the name to rename the file to.
6262
*
63+
* @return bool
64+
*
6365
* @throws InvalidArgumentException if the $path specified is invalid.
6466
* @throws RuntimeException on any error during the move operation.
6567
* @throws RuntimeException on the second or subsequent call to the method.

system/HTTP/IncomingRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ private function getPostMaxSize(): int
208208
* content negotiation.
209209
*
210210
* @param App $config
211+
*
212+
* @return void
211213
*/
212214
public function detectLocale($config)
213215
{
@@ -226,6 +228,8 @@ public function detectLocale($config)
226228
* determined from the environment as needed.
227229
*
228230
* @deprecated $protocol and $baseURL are deprecated. No longer used.
231+
*
232+
* @return void
229233
*/
230234
protected function detectURI(string $protocol, string $baseURL)
231235
{

system/HTTP/RequestTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ public function fetchGlobal(string $method, $index = null, ?int $filter = null,
328328
/**
329329
* Saves a copy of the current state of one of several PHP globals
330330
* so we can retrieve them later.
331+
*
332+
* @return void
331333
*/
332334
protected function populateGlobals(string $method)
333335
{

0 commit comments

Comments
 (0)