Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 5, 2023
2 parents cf6b9da + a60c5b0 commit e6e9b59
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 44 deletions.
30 changes: 0 additions & 30 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,21 +666,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Commands/Server/Serve.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset \'DOCUMENT_ROOT\' directly on \\$_SERVER is discouraged\\.$#',
'count' => 2,
'path' => __DIR__ . '/system/Commands/Server/rewrite.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset \'REQUEST_URI\' directly on \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Server/rewrite.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'/index\\.php\' directly on offset \'SCRIPT_NAME\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Server/rewrite.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset \'CI_ENVIRONMENT\' directly on \\$_SERVER is discouraged\\.$#',
'count' => 3,
Expand Down Expand Up @@ -3681,21 +3666,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Test/TestResponse.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset \'app\\.baseURL\' directly on \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Test/bootstrap.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'http\\://example\\.com/\' directly on offset \'app\\.baseURL\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Test/bootstrap.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'testing\' directly on offset \'CI_ENVIRONMENT\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Test/bootstrap.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\Throttle\\\\Throttler\\:\\:\\$testTime \\(int\\) on left side of \\?\\? is not nullable\\.$#',
'count' => 1,
Expand Down
21 changes: 11 additions & 10 deletions system/Commands/Generators/Views/controller.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
namespace {namespace};

use {useStatement};
use CodeIgniter\HTTP\ResponseInterface;

class {class} extends {extends}
{
<?php if ($type === 'controller'): ?>
/**
* Return an array of resource objects, themselves in array format
*
* @return mixed
* @return ResponseInterface
*/
public function index()
{
Expand All @@ -20,7 +21,7 @@ public function index()
/**
* Return the properties of a resource object
*
* @return mixed
* @return ResponseInterface
*/
public function show($id = null)
{
Expand All @@ -30,7 +31,7 @@ public function show($id = null)
/**
* Return a new resource object, with default properties
*
* @return mixed
* @return ResponseInterface
*/
public function new()
{
Expand All @@ -40,7 +41,7 @@ public function new()
/**
* Create a new resource object, from "posted" parameters
*
* @return mixed
* @return ResponseInterface
*/
public function create()
{
Expand All @@ -50,7 +51,7 @@ public function create()
/**
* Return the editable properties of a resource object
*
* @return mixed
* @return ResponseInterface
*/
public function edit($id = null)
{
Expand All @@ -60,7 +61,7 @@ public function edit($id = null)
/**
* Add or update a model resource, from "posted" properties
*
* @return mixed
* @return ResponseInterface
*/
public function update($id = null)
{
Expand All @@ -70,7 +71,7 @@ public function update($id = null)
/**
* Delete the designated resource object from the model
*
* @return mixed
* @return ResponseInterface
*/
public function delete($id = null)
{
Expand All @@ -80,7 +81,7 @@ public function delete($id = null)
/**
* Present a view of resource objects
*
* @return mixed
* @return ResponseInterface
*/
public function index()
{
Expand All @@ -90,9 +91,9 @@ public function index()
/**
* Present a view to present a specific resource object
*
* @param mixed $id
* @param string $id
*
* @return mixed
* @return ResponseInterface
*/
public function show($id = null)
{
Expand Down
2 changes: 0 additions & 2 deletions system/HTTP/ResponseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ interface ResponseInterface extends MessageInterface
* to understand and satisfy the request.
*
* @return int Status code.
*
* @deprecated To be replaced by the PSR-7 version (compatible)
*/
public function getStatusCode(): int;

Expand Down
2 changes: 1 addition & 1 deletion system/View/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function currentURL()
/**
* Wrap helper function to use as view plugin.
*
* @return mixed|string|URI
* @return string|URI
*/
public static function previousURL()
{
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/general/ajax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Fetch API
.. code-block:: javascript
fetch(url, {
method: "get",
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest"
Expand Down

0 comments on commit e6e9b59

Please sign in to comment.