pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/cakephp/cakephp/commit/157aeed3a1a5fe57442ea46b87e47cc77157d8e4

Update docblocks and checks for nullable properties. · cakephp/cakephp@157aeed · GitHub
Skip to content

Commit 157aeed

Browse files
committed
Update docblocks and checks for nullable properties.
1 parent 91b52fe commit 157aeed

22 files changed

Lines changed: 70 additions & 52 deletions

phpstan-baseline.neon

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,6 @@ parameters:
470470
count: 1
471471
path: src/TestSuite/Fixture/TestFixture.php
472472

473-
-
474-
message: "#^Property Cake\\\\TestSuite\\\\IntegrationTestCase\\:\\:\\$_response \\(Psr\\\\Http\\\\Message\\\\ResponseInterface\\) does not accept null\\.$#"
475-
count: 1
476-
path: src/TestSuite/IntegrationTestCase.php
477-
478-
-
479-
message: "#^Property Cake\\\\TestSuite\\\\IntegrationTestCase\\:\\:\\$_controller \\(Cake\\\\Controller\\\\Controller\\) does not accept null\\.$#"
480-
count: 1
481-
path: src/TestSuite/IntegrationTestCase.php
482-
483473
-
484474
message: "#^Property Cake\\\\TestSuite\\\\IntegrationTestCase\\:\\:\\$_viewName \\(string\\) does not accept null\\.$#"
485475
count: 1
@@ -496,22 +486,12 @@ parameters:
496486
path: src/TestSuite/IntegrationTestCase.php
497487

498488
-
499-
message: "#^Negated boolean expression is always false\\.$#"
500-
count: 1
501-
path: src/TestSuite/IntegrationTestCase.php
502-
503-
-
504-
message: "#^Ternary operator condition is always true\\.$#"
505-
count: 1
506-
path: src/TestSuite/IntegrationTestCase.php
507-
508-
-
509-
message: "#^Parameter \\#1 \\$response of class Cake\\\\TestSuite\\\\Constraint\\\\Response\\\\CookieEquals constructor expects Cake\\\\Http\\\\Response\\|null, Psr\\\\Http\\\\Message\\\\ResponseInterface given\\.$#"
489+
message: "#^Parameter \\#1 \\$response of class Cake\\\\TestSuite\\\\Constraint\\\\Response\\\\CookieEquals constructor expects Cake\\\\Http\\\\Response\\|null, Psr\\\\Http\\\\Message\\\\ResponseInterface\\|null given\\.$#"
510490
count: 1
511491
path: src/TestSuite/IntegrationTestCase.php
512492

513493
-
514-
message: "#^Parameter \\#1 \\$response of class Cake\\\\TestSuite\\\\Constraint\\\\Response\\\\CookieEncryptedEquals constructor expects Cake\\\\Http\\\\Response\\|null, Psr\\\\Http\\\\Message\\\\ResponseInterface given\\.$#"
494+
message: "#^Parameter \\#1 \\$response of class Cake\\\\TestSuite\\\\Constraint\\\\Response\\\\CookieEncryptedEquals constructor expects Cake\\\\Http\\\\Response\\|null, Psr\\\\Http\\\\Message\\\\ResponseInterface\\|null given\\.$#"
515495
count: 1
516496
path: src/TestSuite/IntegrationTestCase.php
517497

src/Console/Shell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ protected function _welcome(): void
284284
*/
285285
public function loadTasks(): bool
286286
{
287-
if ($this->tasks === true || empty($this->tasks) || empty($this->Tasks)) {
287+
if ($this->tasks === true || empty($this->tasks)) {
288288
return true;
289289
}
290290
$this->_taskMap = $this->Tasks->normalizeArray($this->tasks);

src/Controller/Controller.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface
150150
/**
151151
* Instance of ComponentRegistry used to create Components
152152
*
153-
* @var \Cake\Controller\ComponentRegistry
153+
* @var \Cake\Controller\ComponentRegistry|null
154154
*/
155155
protected $_components;
156156

@@ -251,12 +251,14 @@ public function initialize(): void
251251
*/
252252
public function components(?ComponentRegistry $components = null): ComponentRegistry
253253
{
254-
if ($components === null && $this->_components === null) {
255-
$this->_components = new ComponentRegistry($this);
256-
}
257254
if ($components !== null) {
258255
$components->setController($this);
259-
$this->_components = $components;
256+
257+
return $this->_components = $components;
258+
}
259+
260+
if ($this->_components === null) {
261+
$this->_components = new ComponentRegistry($this);
260262
}
261263

262264
return $this->_components;

src/Database/Driver/Mysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Mysql extends Driver
7171
/**
7272
* The schema dialect for this driver
7373
*
74-
* @var \Cake\Database\Schema\MysqlSchemaDialect
74+
* @var \Cake\Database\Schema\MysqlSchemaDialect|null
7575
*/
7676
protected $_schemaDialect;
7777

src/Database/Driver/Postgres.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Postgres extends Driver
6161
/**
6262
* The schema dialect class for this driver
6363
*
64-
* @var \Cake\Database\Schema\PostgresSchemaDialect
64+
* @var \Cake\Database\Schema\PostgresSchemaDialect|null
6565
*/
6666
protected $_schemaDialect;
6767

src/Database/Driver/Sqlite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Sqlite extends Driver
5959
/**
6060
* The schema dialect class for this driver
6161
*
62-
* @var \Cake\Database\Schema\SqliteSchemaDialect
62+
* @var \Cake\Database\Schema\SqliteSchemaDialect|null
6363
*/
6464
protected $_schemaDialect;
6565

src/Database/Driver/Sqlserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Sqlserver extends Driver
8080
/**
8181
* The schema dialect class for this driver
8282
*
83-
* @var \Cake\Database\Schema\SqlserverSchemaDialect
83+
* @var \Cake\Database\Schema\SqlserverSchemaDialect|null
8484
*/
8585
protected $_schemaDialect;
8686

src/Database/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class Query implements ExpressionInterface, IteratorAggregate
179179
/**
180180
* The Type map for fields in the select clause
181181
*
182-
* @var \Cake\Database\TypeMap
182+
* @var \Cake\Database\TypeMap|null
183183
*/
184184
protected $_selectTypeMap;
185185

src/Database/TypeMapTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
trait TypeMapTrait
2626
{
2727
/**
28-
* @var \Cake\Database\TypeMap
28+
* @var \Cake\Database\TypeMap|null
2929
*/
3030
protected $_typeMap;
3131

src/Event/EventDispatcherTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait EventDispatcherTrait
2525
* Instance of the Cake\Event\EventManager this object is using
2626
* to dispatch inner events.
2727
*
28-
* @var \Cake\Event\EventManagerInterface
28+
* @var \Cake\Event\EventManagerInterface|null
2929
*/
3030
protected $_eventManager;
3131

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy