Skip to content

Commit e6e9b59

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
2 parents cf6b9da + a60c5b0 commit e6e9b59

File tree

5 files changed

+13
-44
lines changed

5 files changed

+13
-44
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -666,21 +666,6 @@
666666
'count' => 1,
667667
'path' => __DIR__ . '/system/Commands/Server/Serve.php',
668668
];
669-
$ignoreErrors[] = [
670-
'message' => '#^Accessing offset \'DOCUMENT_ROOT\' directly on \\$_SERVER is discouraged\\.$#',
671-
'count' => 2,
672-
'path' => __DIR__ . '/system/Commands/Server/rewrite.php',
673-
];
674-
$ignoreErrors[] = [
675-
'message' => '#^Accessing offset \'REQUEST_URI\' directly on \\$_SERVER is discouraged\\.$#',
676-
'count' => 1,
677-
'path' => __DIR__ . '/system/Commands/Server/rewrite.php',
678-
];
679-
$ignoreErrors[] = [
680-
'message' => '#^Assigning \'/index\\.php\' directly on offset \'SCRIPT_NAME\' of \\$_SERVER is discouraged\\.$#',
681-
'count' => 1,
682-
'path' => __DIR__ . '/system/Commands/Server/rewrite.php',
683-
];
684669
$ignoreErrors[] = [
685670
'message' => '#^Accessing offset \'CI_ENVIRONMENT\' directly on \\$_SERVER is discouraged\\.$#',
686671
'count' => 3,
@@ -3681,21 +3666,6 @@
36813666
'count' => 1,
36823667
'path' => __DIR__ . '/system/Test/TestResponse.php',
36833668
];
3684-
$ignoreErrors[] = [
3685-
'message' => '#^Accessing offset \'app\\.baseURL\' directly on \\$_SERVER is discouraged\\.$#',
3686-
'count' => 1,
3687-
'path' => __DIR__ . '/system/Test/bootstrap.php',
3688-
];
3689-
$ignoreErrors[] = [
3690-
'message' => '#^Assigning \'http\\://example\\.com/\' directly on offset \'app\\.baseURL\' of \\$_SERVER is discouraged\\.$#',
3691-
'count' => 1,
3692-
'path' => __DIR__ . '/system/Test/bootstrap.php',
3693-
];
3694-
$ignoreErrors[] = [
3695-
'message' => '#^Assigning \'testing\' directly on offset \'CI_ENVIRONMENT\' of \\$_SERVER is discouraged\\.$#',
3696-
'count' => 1,
3697-
'path' => __DIR__ . '/system/Test/bootstrap.php',
3698-
];
36993669
$ignoreErrors[] = [
37003670
'message' => '#^Property CodeIgniter\\\\Throttle\\\\Throttler\\:\\:\\$testTime \\(int\\) on left side of \\?\\? is not nullable\\.$#',
37013671
'count' => 1,

system/Commands/Generators/Views/controller.tpl.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
namespace {namespace};
44

55
use {useStatement};
6+
use CodeIgniter\HTTP\ResponseInterface;
67

78
class {class} extends {extends}
89
{
910
<?php if ($type === 'controller'): ?>
1011
/**
1112
* Return an array of resource objects, themselves in array format
1213
*
13-
* @return mixed
14+
* @return ResponseInterface
1415
*/
1516
public function index()
1617
{
@@ -20,7 +21,7 @@ public function index()
2021
/**
2122
* Return the properties of a resource object
2223
*
23-
* @return mixed
24+
* @return ResponseInterface
2425
*/
2526
public function show($id = null)
2627
{
@@ -30,7 +31,7 @@ public function show($id = null)
3031
/**
3132
* Return a new resource object, with default properties
3233
*
33-
* @return mixed
34+
* @return ResponseInterface
3435
*/
3536
public function new()
3637
{
@@ -40,7 +41,7 @@ public function new()
4041
/**
4142
* Create a new resource object, from "posted" parameters
4243
*
43-
* @return mixed
44+
* @return ResponseInterface
4445
*/
4546
public function create()
4647
{
@@ -50,7 +51,7 @@ public function create()
5051
/**
5152
* Return the editable properties of a resource object
5253
*
53-
* @return mixed
54+
* @return ResponseInterface
5455
*/
5556
public function edit($id = null)
5657
{
@@ -60,7 +61,7 @@ public function edit($id = null)
6061
/**
6162
* Add or update a model resource, from "posted" properties
6263
*
63-
* @return mixed
64+
* @return ResponseInterface
6465
*/
6566
public function update($id = null)
6667
{
@@ -70,7 +71,7 @@ public function update($id = null)
7071
/**
7172
* Delete the designated resource object from the model
7273
*
73-
* @return mixed
74+
* @return ResponseInterface
7475
*/
7576
public function delete($id = null)
7677
{
@@ -80,7 +81,7 @@ public function delete($id = null)
8081
/**
8182
* Present a view of resource objects
8283
*
83-
* @return mixed
84+
* @return ResponseInterface
8485
*/
8586
public function index()
8687
{
@@ -90,9 +91,9 @@ public function index()
9091
/**
9192
* Present a view to present a specific resource object
9293
*
93-
* @param mixed $id
94+
* @param string $id
9495
*
95-
* @return mixed
96+
* @return ResponseInterface
9697
*/
9798
public function show($id = null)
9899
{

system/HTTP/ResponseInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ interface ResponseInterface extends MessageInterface
110110
* to understand and satisfy the request.
111111
*
112112
* @return int Status code.
113-
*
114-
* @deprecated To be replaced by the PSR-7 version (compatible)
115113
*/
116114
public function getStatusCode(): int;
117115

system/View/Plugins.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function currentURL()
3232
/**
3333
* Wrap helper function to use as view plugin.
3434
*
35-
* @return mixed|string|URI
35+
* @return string|URI
3636
*/
3737
public static function previousURL()
3838
{

user_guide_src/source/general/ajax.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Fetch API
1818
.. code-block:: javascript
1919
2020
fetch(url, {
21-
method: "get",
21+
method: "POST",
2222
headers: {
2323
"Content-Type": "application/json",
2424
"X-Requested-With": "XMLHttpRequest"

0 commit comments

Comments
 (0)