diff --git a/config/bootstrap.php b/config/bootstrap.php index a98ee0c3..ae8a33a9 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -182,9 +182,9 @@ Router::extensions(['json', 'xml', 'csv', 'rss', 'pdf']); Time::setToStringFormat('yyyy-MM-dd HH:mm:ss'); // For any mutable DateTime -FrozenTime::setToStringFormat('yyyy-MM-dd HH:mm:ss'); // For any immutable DateTime +\Cake\I18n\DateTime::setToStringFormat('yyyy-MM-dd HH:mm:ss'); // For any immutable DateTime Date::setToStringFormat('yyyy-MM-dd'); // For any mutable Date -FrozenDate::setToStringFormat('yyyy-MM-dd'); // For any immutable Date +\Cake\I18n\Date::setToStringFormat('yyyy-MM-dd'); // For any immutable Date TypeFactory::build('time') ->setLocaleFormat('HH:mm:ss'); diff --git a/plugins/AuthSandbox/tests/TestCase/Controller/Admin/AuthSandboxControllerTest.php b/plugins/AuthSandbox/tests/TestCase/Controller/Admin/AuthSandboxControllerTest.php index c1982db0..cf718c55 100644 --- a/plugins/AuthSandbox/tests/TestCase/Controller/Admin/AuthSandboxControllerTest.php +++ b/plugins/AuthSandbox/tests/TestCase/Controller/Admin/AuthSandboxControllerTest.php @@ -14,7 +14,7 @@ class AuthSandboxControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'app.Users', 'app.Roles', ]; diff --git a/plugins/AuthSandbox/tests/TestCase/Controller/AuthSandboxControllerTest.php b/plugins/AuthSandbox/tests/TestCase/Controller/AuthSandboxControllerTest.php index 2c7f848d..3a68b7c8 100644 --- a/plugins/AuthSandbox/tests/TestCase/Controller/AuthSandboxControllerTest.php +++ b/plugins/AuthSandbox/tests/TestCase/Controller/AuthSandboxControllerTest.php @@ -14,7 +14,7 @@ class AuthSandboxControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'app.Users', 'app.Roles', ]; diff --git a/plugins/Sandbox/src/Controller/CalendarController.php b/plugins/Sandbox/src/Controller/CalendarController.php index 5195298b..276f5713 100644 --- a/plugins/Sandbox/src/Controller/CalendarController.php +++ b/plugins/Sandbox/src/Controller/CalendarController.php @@ -82,7 +82,7 @@ protected function _populateDemoData(array $options) { $state = $this->States ->find() ->where(['code !=' => '', 'lat IS NOT' => null, 'lng IS NOT' => null]) - ->order($random) + ->orderBy($random) ->firstOrFail(); $time = mktime(random_int(8, 22), 0, 0, $options['month'], random_int(1, 28), $options['year']); @@ -95,7 +95,7 @@ protected function _populateDemoData(array $options) { 'lng' => $state->lng, 'location' => $state->name, 'description' => 'Some cool event @ ' . $state->code, - 'beginning' => new FrozenTime($time), + 'beginning' => new \Cake\I18n\DateTime($time), ]); if (!$this->Events->save($event)) { throw new InternalErrorException('Cannot save Event - ' . print_r($event->getErrors())); diff --git a/plugins/Sandbox/src/Controller/JqueryExamplesController.php b/plugins/Sandbox/src/Controller/JqueryExamplesController.php index bf161ad4..ac8c7737 100644 --- a/plugins/Sandbox/src/Controller/JqueryExamplesController.php +++ b/plugins/Sandbox/src/Controller/JqueryExamplesController.php @@ -54,11 +54,9 @@ public function maxlength() { public function autocomplete() { if ($this->request->is(['ajax'])) { $this->loadModel('Sandbox.Animals'); - $items = $this->Animals->find('list', [ - 'conditions' => [ + $items = $this->Animals->find('list', conditions: [ 'name LIKE' => '%' . (string)$this->request->getQuery('term') . '%', - ], - ]); + ]); $this->set('items', $items); $this->set('_serialize', ['items']); diff --git a/plugins/Sandbox/src/Controller/QueueExamplesController.php b/plugins/Sandbox/src/Controller/QueueExamplesController.php index 740ef46b..c1304029 100644 --- a/plugins/Sandbox/src/Controller/QueueExamplesController.php +++ b/plugins/Sandbox/src/Controller/QueueExamplesController.php @@ -153,11 +153,11 @@ public function scheduleDemo() { } /** - * @param string $task - * @param \Cake\I18n\FrozenTime $notBefore - * @return bool - */ - protected function scheduleDelayedDemo(string $task, $notBefore) { + * @param string $task + * @param \Cake\I18n\DateTime $notBefore + * @return bool + */ + protected function scheduleDelayedDemo(string $task, $notBefore) { // For the demo we bind it to the user session to avoid other people testing it to have side-effects :) $sid = $this->request->getSession()->id(); diff --git a/plugins/Sandbox/src/Controller/SearchExamplesController.php b/plugins/Sandbox/src/Controller/SearchExamplesController.php index 7db9c8e1..8705bb21 100644 --- a/plugins/Sandbox/src/Controller/SearchExamplesController.php +++ b/plugins/Sandbox/src/Controller/SearchExamplesController.php @@ -41,7 +41,7 @@ public function table() { // Make sure we can download all at once if we want to $this->paginate['maxLimit'] = 999; - $query = $this->CountryRecords->find('search', ['search' => $this->request->getQuery()]); + $query = $this->CountryRecords->find('search', search: $this->request->getQuery()); $countries = $this->paginate($query)->toArray(); $this->set(compact('countries')); diff --git a/plugins/Sandbox/src/Controller/TagsController.php b/plugins/Sandbox/src/Controller/TagsController.php index d8179120..3430c378 100644 --- a/plugins/Sandbox/src/Controller/TagsController.php +++ b/plugins/Sandbox/src/Controller/TagsController.php @@ -81,7 +81,7 @@ public function search() { $this->loadModel('Sandbox.SandboxPosts'); $this->ensurePostsDemoData(); - $query = $this->SandboxPosts->find('search', ['search' => $this->request->getQuery()])->contain(['Tags']); + $query = $this->SandboxPosts->find('search', search: $this->request->getQuery())->contain(['Tags']); $posts = $this->paginate($query)->toArray(); diff --git a/plugins/Sandbox/src/Controller/ToolsExamplesController.php b/plugins/Sandbox/src/Controller/ToolsExamplesController.php index b29747e2..5edc5a21 100644 --- a/plugins/Sandbox/src/Controller/ToolsExamplesController.php +++ b/plugins/Sandbox/src/Controller/ToolsExamplesController.php @@ -158,7 +158,7 @@ public function bitmaskSearch() { ]; $this->BitmaskedRecords->behaviors()->load('Tools.Bitmasked', $config); - $query = $this->BitmaskedRecords->find('search', ['search' => $this->request->getQuery()]); + $query = $this->BitmaskedRecords->find('search', search: $this->request->getQuery()); $sql = (string)$query; $bitmaskedRecords = $this->paginate($query)->toArray(); diff --git a/plugins/Sandbox/src/Dto/Github/PullRequestDto.php b/plugins/Sandbox/src/Dto/Github/PullRequestDto.php index be4814ef..3a2d14a1 100644 --- a/plugins/Sandbox/src/Dto/Github/PullRequestDto.php +++ b/plugins/Sandbox/src/Dto/Github/PullRequestDto.php @@ -15,7 +15,7 @@ * @property string $title * @property string $body * @property \Sandbox\Dto\Github\UserDto $user - * @property \Cake\I18n\FrozenTime $createdAt + * @property \Cake\I18n\DateTime $createdAt * @property \Sandbox\Dto\Github\LabelDto[] $labels * @property \Sandbox\Dto\Github\HeadDto|null $head * @property \Sandbox\Dto\Github\BaseDto|null $base @@ -64,9 +64,9 @@ class PullRequestDto extends \CakeDto\Dto\AbstractDto { protected $user; /** - * @var \Cake\I18n\FrozenTime - */ - protected $createdAt; + * @var \Cake\I18n\DateTime + */ + protected $createdAt; /** * @var \Sandbox\Dto\Github\LabelDto[] @@ -402,11 +402,11 @@ public function hasUser(): bool { } /** - * @param \Cake\I18n\FrozenTime $createdAt - * - * @return $this - */ - public function setCreatedAt(\Cake\I18n\FrozenTime $createdAt) { + * @param \Cake\I18n\DateTime $createdAt + * + * @return $this + */ + public function setCreatedAt(\Cake\I18n\DateTime $createdAt) { $this->createdAt = $createdAt; $this->_touchedFields[self::FIELD_CREATED_AT] = true; @@ -414,9 +414,9 @@ public function setCreatedAt(\Cake\I18n\FrozenTime $createdAt) { } /** - * @return \Cake\I18n\FrozenTime - */ - public function getCreatedAt(): \Cake\I18n\FrozenTime { + * @return \Cake\I18n\DateTime + */ + public function getCreatedAt(): \Cake\I18n\DateTime { return $this->createdAt; } diff --git a/plugins/Sandbox/src/Model/Entity/BitmaskedRecord.php b/plugins/Sandbox/src/Model/Entity/BitmaskedRecord.php index ce8a51f7..15a5cb9e 100644 --- a/plugins/Sandbox/src/Model/Entity/BitmaskedRecord.php +++ b/plugins/Sandbox/src/Model/Entity/BitmaskedRecord.php @@ -12,8 +12,8 @@ * @property string $name * @property int|null $flag_optional * @property int $flag_required - * @property \Cake\I18n\FrozenTime $created - * @property \Cake\I18n\FrozenTime $modified + * @property \Cake\I18n\DateTime $created + * @property \Cake\I18n\DateTime $modified */ class BitmaskedRecord extends Entity { @@ -26,7 +26,7 @@ class BitmaskedRecord extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; diff --git a/plugins/Sandbox/src/Model/Entity/Event.php b/plugins/Sandbox/src/Model/Entity/Event.php index 9e83ceff..9e786697 100644 --- a/plugins/Sandbox/src/Model/Entity/Event.php +++ b/plugins/Sandbox/src/Model/Entity/Event.php @@ -13,16 +13,16 @@ * @property float|null $lat * @property float|null $lng * @property string $description - * @property \Cake\I18n\FrozenTime|null $beginning - * @property \Cake\I18n\FrozenTime|null $end + * @property \Cake\I18n\DateTime|null $beginning + * @property \Cake\I18n\DateTime|null $end * @method int getIdOrFail() * @method string getTitleOrFail() * @method string getLocationOrFail() * @method float getLatOrFail() * @method float getLngOrFail() * @method string getDescriptionOrFail() - * @method \Cake\I18n\FrozenTime getBeginningOrFail() - * @method \Cake\I18n\FrozenTime getEndOrFail() + * @method \Cake\I18n\DateTime getBeginningOrFail() + * @method \Cake\I18n\DateTime getEndOrFail() * @property-read string|null $coordinates * @method string getCoordinatesOrFail() * @method $this setIdOrFail(int $value) @@ -31,8 +31,8 @@ * @method $this setLatOrFail(float $value) * @method $this setLngOrFail(float $value) * @method $this setDescriptionOrFail(string $value) - * @method $this setBeginningOrFail(\Cake\I18n\FrozenTime $value) - * @method $this setEndOrFail(\Cake\I18n\FrozenTime $value) + * @method $this setBeginningOrFail(\Cake\I18n\DateTime $value) + * @method $this setEndOrFail(\Cake\I18n\DateTime $value) * @method $this setCoordinatesOrFail(string $value) */ class Event extends Entity { @@ -46,7 +46,7 @@ class Event extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; @@ -54,7 +54,7 @@ class Event extends Entity { /** * @var array */ - protected $_virtual = [ + protected array $_virtual = [ 'coordinates', ]; diff --git a/plugins/Sandbox/src/Model/Entity/ExposedUser.php b/plugins/Sandbox/src/Model/Entity/ExposedUser.php index a28a616e..d606328c 100644 --- a/plugins/Sandbox/src/Model/Entity/ExposedUser.php +++ b/plugins/Sandbox/src/Model/Entity/ExposedUser.php @@ -11,8 +11,8 @@ * @property int $id * @property string $uuid * @property string $name - * @property \Cake\I18n\FrozenTime $created - * @property \Cake\I18n\FrozenTime $modified + * @property \Cake\I18n\DateTime $created + * @property \Cake\I18n\DateTime $modified */ class ExposedUser extends Entity { @@ -25,7 +25,7 @@ class ExposedUser extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'uuid' => false, 'id' => false, diff --git a/plugins/Sandbox/src/Model/Entity/SandboxCategory.php b/plugins/Sandbox/src/Model/Entity/SandboxCategory.php index 79a469a7..80e981b2 100644 --- a/plugins/Sandbox/src/Model/Entity/SandboxCategory.php +++ b/plugins/Sandbox/src/Model/Entity/SandboxCategory.php @@ -12,8 +12,8 @@ * @property int|null $status * @property int|null $lft * @property int|null $rght - * @property \Cake\I18n\FrozenTime|null $created - * @property \Cake\I18n\FrozenTime|null $modified + * @property \Cake\I18n\DateTime|null $created + * @property \Cake\I18n\DateTime|null $modified * @method int getIdOrFail() * @method int getParentIdOrFail() * @method string getNameOrFail() @@ -21,8 +21,8 @@ * @method int getStatusOrFail() * @method int getLftOrFail() * @method int getRghtOrFail() - * @method \Cake\I18n\FrozenTime getCreatedOrFail() - * @method \Cake\I18n\FrozenTime getModifiedOrFail() + * @method \Cake\I18n\DateTime getCreatedOrFail() + * @method \Cake\I18n\DateTime getModifiedOrFail() * @method $this setIdOrFail(int $value) * @method $this setParentIdOrFail(int $value) * @method $this setNameOrFail(string $value) @@ -30,8 +30,8 @@ * @method $this setStatusOrFail(int $value) * @method $this setLftOrFail(int $value) * @method $this setRghtOrFail(int $value) - * @method $this setCreatedOrFail(\Cake\I18n\FrozenTime $value) - * @method $this setModifiedOrFail(\Cake\I18n\FrozenTime $value) + * @method $this setCreatedOrFail(\Cake\I18n\DateTime $value) + * @method $this setModifiedOrFail(\Cake\I18n\DateTime $value) */ class SandboxCategory extends Entity { @@ -44,7 +44,7 @@ class SandboxCategory extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; diff --git a/plugins/Sandbox/src/Model/Entity/SandboxPost.php b/plugins/Sandbox/src/Model/Entity/SandboxPost.php index 09ba5e4c..1c308b38 100644 --- a/plugins/Sandbox/src/Model/Entity/SandboxPost.php +++ b/plugins/Sandbox/src/Model/Entity/SandboxPost.php @@ -10,8 +10,8 @@ * @property string $content * @property int $rating_count * @property int $rating_sum - * @property \Cake\I18n\FrozenTime|null $created - * @property \Cake\I18n\FrozenTime|null $modified + * @property \Cake\I18n\DateTime|null $created + * @property \Cake\I18n\DateTime|null $modified * @property array<\Tags\Model\Entity\Tagged> $tagged * @property array<\Tags\Model\Entity\Tag> $tags * @property string $tag_list ! @@ -20,8 +20,8 @@ * @method string getContentOrFail() * @method int getRatingCountOrFail() * @method int getRatingSumOrFail() - * @method \Cake\I18n\FrozenTime getCreatedOrFail() - * @method \Cake\I18n\FrozenTime getModifiedOrFail() + * @method \Cake\I18n\DateTime getCreatedOrFail() + * @method \Cake\I18n\DateTime getModifiedOrFail() * @method array<\Tags\Model\Entity\Tagged> getTaggedOrFail() * @method array<\Tags\Model\Entity\Tag> getTagsOrFail() * @method $this setIdOrFail(int $value) @@ -29,8 +29,8 @@ * @method $this setContentOrFail(string $value) * @method $this setRatingCountOrFail(int $value) * @method $this setRatingSumOrFail(int $value) - * @method $this setCreatedOrFail(\Cake\I18n\FrozenTime $value) - * @method $this setModifiedOrFail(\Cake\I18n\FrozenTime $value) + * @method $this setCreatedOrFail(\Cake\I18n\DateTime $value) + * @method $this setModifiedOrFail(\Cake\I18n\DateTime $value) * @method $this setTaggedOrFail(array $value) * @method $this setTagsOrFail(array $value) */ @@ -45,7 +45,7 @@ class SandboxPost extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; diff --git a/plugins/Sandbox/src/Model/Table/SandboxPostsTable.php b/plugins/Sandbox/src/Model/Table/SandboxPostsTable.php index f0c145dc..9ff5fa4e 100644 --- a/plugins/Sandbox/src/Model/Table/SandboxPostsTable.php +++ b/plugins/Sandbox/src/Model/Table/SandboxPostsTable.php @@ -69,7 +69,7 @@ public function searchManager() { if ($args['tag'] === '-1') { $query->find('untagged'); } else { - $query->find('tagged', ['slug' => $args['tag']]); + $query->find('tagged', slug: $args['tag']); } return true; diff --git a/plugins/Sandbox/src/View/Helper/MediaEmbedBbcodeHelper.php b/plugins/Sandbox/src/View/Helper/MediaEmbedBbcodeHelper.php index 4800c946..9f333b9b 100644 --- a/plugins/Sandbox/src/View/Helper/MediaEmbedBbcodeHelper.php +++ b/plugins/Sandbox/src/View/Helper/MediaEmbedBbcodeHelper.php @@ -13,7 +13,7 @@ class MediaEmbedBbcodeHelper extends Helper { /** * @var array */ - protected $helpers = [ + protected array $helpers = [ 'Text', ]; diff --git a/plugins/Sandbox/templates/QueueExamples/scheduling.php b/plugins/Sandbox/templates/QueueExamples/scheduling.php index a58e16d0..796c2df3 100644 --- a/plugins/Sandbox/templates/QueueExamples/scheduling.php +++ b/plugins/Sandbox/templates/QueueExamples/scheduling.php @@ -29,9 +29,9 @@ Form->control('job_task', ['options' => $tasks]); - echo '

Current (server) time: ' . (new \Cake\I18n\FrozenTime()) . ''; + echo '

Current (server) time: ' . (new \Cake\I18n\DateTime()) . ''; - echo $this->Form->control('notbefore', ['type' => 'text', 'default' => (new \Cake\I18n\FrozenTime())->addMinutes(5)]); + echo $this->Form->control('notbefore', ['type' => 'text', 'default' => (new \Cake\I18n\DateTime())->addMinutes(5)]); ?> diff --git a/plugins/Sandbox/tests/Fixture/EventsFixture.php b/plugins/Sandbox/tests/Fixture/EventsFixture.php index f67c2b1f..feedcda1 100644 --- a/plugins/Sandbox/tests/Fixture/EventsFixture.php +++ b/plugins/Sandbox/tests/Fixture/EventsFixture.php @@ -38,7 +38,7 @@ class EventsFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'title' => 'Lorem ipsum dolor sit amet', diff --git a/plugins/Sandbox/tests/Fixture/SandboxAnimalsFixture.php b/plugins/Sandbox/tests/Fixture/SandboxAnimalsFixture.php index fec71393..5b1bfb31 100644 --- a/plugins/Sandbox/tests/Fixture/SandboxAnimalsFixture.php +++ b/plugins/Sandbox/tests/Fixture/SandboxAnimalsFixture.php @@ -34,7 +34,7 @@ class SandboxAnimalsFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'name' => 'Lorem ipsum dolor sit amet', diff --git a/plugins/Sandbox/tests/Fixture/SandboxCategoriesFixture.php b/plugins/Sandbox/tests/Fixture/SandboxCategoriesFixture.php index f3047d25..d6e5e90b 100644 --- a/plugins/Sandbox/tests/Fixture/SandboxCategoriesFixture.php +++ b/plugins/Sandbox/tests/Fixture/SandboxCategoriesFixture.php @@ -39,7 +39,7 @@ class SandboxCategoriesFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'parent_id' => 1, diff --git a/plugins/Sandbox/tests/Fixture/SandboxPostsFixture.php b/plugins/Sandbox/tests/Fixture/SandboxPostsFixture.php index 6096b1ec..d24c4200 100644 --- a/plugins/Sandbox/tests/Fixture/SandboxPostsFixture.php +++ b/plugins/Sandbox/tests/Fixture/SandboxPostsFixture.php @@ -34,7 +34,7 @@ class SandboxPostsFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'title' => 'Lorem ipsum dolor sit amet', 'slug' => 'Lorem ipsum dolor sit amet', diff --git a/plugins/Sandbox/tests/Fixture/SandboxRatingsFixture.php b/plugins/Sandbox/tests/Fixture/SandboxRatingsFixture.php index 5a2d416f..bec25fce 100644 --- a/plugins/Sandbox/tests/Fixture/SandboxRatingsFixture.php +++ b/plugins/Sandbox/tests/Fixture/SandboxRatingsFixture.php @@ -36,7 +36,7 @@ class SandboxRatingsFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'user_id' => 1, diff --git a/plugins/Sandbox/tests/Fixture/SandboxUsersFixture.php b/plugins/Sandbox/tests/Fixture/SandboxUsersFixture.php index 27d1ce59..c1a9f25e 100644 --- a/plugins/Sandbox/tests/Fixture/SandboxUsersFixture.php +++ b/plugins/Sandbox/tests/Fixture/SandboxUsersFixture.php @@ -38,7 +38,7 @@ class SandboxUsersFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'created' => '2015-05-07 16:54:56', diff --git a/plugins/Sandbox/tests/TestCase/Controller/AjaxExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/AjaxExamplesControllerTest.php index bd47e3de..6b4b311d 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/AjaxExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/AjaxExamplesControllerTest.php @@ -20,7 +20,7 @@ class AjaxExamplesControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Data.Countries', 'app.Users', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/BootstrapControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/BootstrapControllerTest.php index 8c847ff2..1af69e98 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/BootstrapControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/BootstrapControllerTest.php @@ -12,7 +12,7 @@ class BootstrapControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.SandboxAnimals', 'plugin.Sandbox.SandboxUsers', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/CakeExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/CakeExamplesControllerTest.php index c2322aad..dcc3880d 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/CakeExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/CakeExamplesControllerTest.php @@ -19,7 +19,7 @@ class CakeExamplesControllerTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.SandboxAnimals', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/CalendarControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/CalendarControllerTest.php index c97ca457..4857a498 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/CalendarControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/CalendarControllerTest.php @@ -12,7 +12,7 @@ class CalendarControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.Events', 'plugin.Data.States', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/CaptchasControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/CaptchasControllerTest.php index d1d0f4a4..899d76e2 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/CaptchasControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/CaptchasControllerTest.php @@ -12,7 +12,7 @@ class CaptchasControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Captcha.Captchas', 'plugin.Sandbox.SandboxAnimals', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/CsvControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/CsvControllerTest.php index f40ae219..1cc2e0d4 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/CsvControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/CsvControllerTest.php @@ -13,7 +13,7 @@ class CsvControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Data.Countries', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/ExposeExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/ExposeExamplesControllerTest.php index 0f2a1506..e7e3bd65 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/ExposeExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/ExposeExamplesControllerTest.php @@ -13,7 +13,7 @@ class ExposeExamplesControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.ExposedUsers', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/GeoExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/GeoExamplesControllerTest.php index 6ec24ea1..77ef7032 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/GeoExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/GeoExamplesControllerTest.php @@ -20,7 +20,7 @@ class GeoExamplesControllerTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Data.Countries', 'plugin.Data.States', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/MenuControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/MenuControllerTest.php index 7c70405f..7b3292bc 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/MenuControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/MenuControllerTest.php @@ -12,7 +12,7 @@ class MenuControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.SandboxCategories', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/QueueExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/QueueExamplesControllerTest.php index 1f623d7d..1cf7f978 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/QueueExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/QueueExamplesControllerTest.php @@ -13,7 +13,7 @@ class QueueExamplesControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Queue.QueuedJobs', 'plugin.Queue.QueueProcesses', ]; @@ -82,7 +82,7 @@ public function testScheduleDemo() { $queuedJobs = TableRegistry::getTableLocator()->get('Queue.QueuedJobs'); /** @var \Queue\Model\Entity\QueuedJob $queuedJob */ - $queuedJob = $queuedJobs->find()->orderDesc('id')->firstOrFail(); + $queuedJob = $queuedJobs->find()->orderByDesc('id')->firstOrFail(); $this->assertSame('Queue.ProgressExample', $queuedJob->job_task); } diff --git a/plugins/Sandbox/tests/TestCase/Controller/RatingsControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/RatingsControllerTest.php index 13f6ab17..fd7779a7 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/RatingsControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/RatingsControllerTest.php @@ -19,7 +19,7 @@ class RatingsControllerTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.SandboxPosts', 'plugin.Sandbox.SandboxRatings', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/SearchExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/SearchExamplesControllerTest.php index e6cdb301..3bd9d561 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/SearchExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/SearchExamplesControllerTest.php @@ -12,7 +12,7 @@ class SearchExamplesControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Data.Countries', ]; diff --git a/plugins/Sandbox/tests/TestCase/Controller/TagsControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/TagsControllerTest.php index 04fb42e3..2e54c253 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/TagsControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/TagsControllerTest.php @@ -18,7 +18,7 @@ class TagsControllerTest extends TestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.SandboxCategories', 'plugin.Sandbox.SandboxPosts', 'plugin.Tags.Tags', diff --git a/plugins/Sandbox/tests/TestCase/Controller/ToolsExamplesControllerTest.php b/plugins/Sandbox/tests/TestCase/Controller/ToolsExamplesControllerTest.php index 6f4fd9dc..08d8bfdd 100644 --- a/plugins/Sandbox/tests/TestCase/Controller/ToolsExamplesControllerTest.php +++ b/plugins/Sandbox/tests/TestCase/Controller/ToolsExamplesControllerTest.php @@ -12,7 +12,7 @@ class ToolsExamplesControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'app.Users', 'plugin.Sandbox.SandboxUsers', 'plugin.Sandbox.SandboxAnimals', diff --git a/plugins/Sandbox/tests/TestCase/Model/Table/BitmaskedRecordsTableTest.php b/plugins/Sandbox/tests/TestCase/Model/Table/BitmaskedRecordsTableTest.php index e16a8ea9..2e5c8eb5 100644 --- a/plugins/Sandbox/tests/TestCase/Model/Table/BitmaskedRecordsTableTest.php +++ b/plugins/Sandbox/tests/TestCase/Model/Table/BitmaskedRecordsTableTest.php @@ -23,7 +23,7 @@ class BitmaskedRecordsTableTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.BitmaskedRecords', ]; diff --git a/plugins/Sandbox/tests/TestCase/Model/Table/EventsTableTest.php b/plugins/Sandbox/tests/TestCase/Model/Table/EventsTableTest.php index 6e02dd4d..6955b34e 100644 --- a/plugins/Sandbox/tests/TestCase/Model/Table/EventsTableTest.php +++ b/plugins/Sandbox/tests/TestCase/Model/Table/EventsTableTest.php @@ -22,7 +22,7 @@ class EventsTableTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.Events', ]; diff --git a/plugins/Sandbox/tests/TestCase/Model/Table/ExposedUsersTableTest.php b/plugins/Sandbox/tests/TestCase/Model/Table/ExposedUsersTableTest.php index 7a35f6c6..bc3b3f28 100644 --- a/plugins/Sandbox/tests/TestCase/Model/Table/ExposedUsersTableTest.php +++ b/plugins/Sandbox/tests/TestCase/Model/Table/ExposedUsersTableTest.php @@ -24,7 +24,7 @@ class ExposedUsersTableTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.ExposedUsers', ]; diff --git a/plugins/Sandbox/tests/TestCase/Service/Localized/ValidationServiceTest.php b/plugins/Sandbox/tests/TestCase/Service/Localized/ValidationServiceTest.php index 7b4ed952..c7f2231b 100644 --- a/plugins/Sandbox/tests/TestCase/Service/Localized/ValidationServiceTest.php +++ b/plugins/Sandbox/tests/TestCase/Service/Localized/ValidationServiceTest.php @@ -18,7 +18,7 @@ class ValidationServiceTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Sandbox.BitmaskedRecords', ]; diff --git a/plugins/StateMachineSandbox/src/Controller/RegistrationsController.php b/plugins/StateMachineSandbox/src/Controller/RegistrationsController.php index efd73275..c8895a3f 100644 --- a/plugins/StateMachineSandbox/src/Controller/RegistrationsController.php +++ b/plugins/StateMachineSandbox/src/Controller/RegistrationsController.php @@ -36,9 +36,7 @@ public function index() { * @return \Cake\Http\Response|null|void Renders view */ public function view($id = null) { - $registration = $this->Registrations->get($id, [ - 'contain' => ['Users', 'RegistrationStates' => 'StateMachineTransitionLogs'], - ]); + $registration = $this->Registrations->get($id, contain: ['Users', 'RegistrationStates' => 'StateMachineTransitionLogs']); if ($registration->session_id !== $this->request->getSession()->id()) { throw new NotFoundException(); } diff --git a/plugins/StateMachineSandbox/src/Model/Entity/Registration.php b/plugins/StateMachineSandbox/src/Model/Entity/Registration.php index 65764864..00ea684f 100644 --- a/plugins/StateMachineSandbox/src/Model/Entity/Registration.php +++ b/plugins/StateMachineSandbox/src/Model/Entity/Registration.php @@ -12,8 +12,8 @@ * @property string $session_id * @property int $user_id * @property string $status - * @property \Cake\I18n\FrozenTime $created - * @property \Cake\I18n\FrozenTime $modified + * @property \Cake\I18n\DateTime $created + * @property \Cake\I18n\DateTime $modified * * @property \App\Model\Entity\User $user * @property \StateMachine\Model\Entity\StateMachineItem|null $registration_state @@ -29,7 +29,7 @@ class Registration extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; diff --git a/plugins/StateMachineSandbox/src/Queue/Task/SimulatePaymentResultTask.php b/plugins/StateMachineSandbox/src/Queue/Task/SimulatePaymentResultTask.php index e1e5cd5e..76961de8 100644 --- a/plugins/StateMachineSandbox/src/Queue/Task/SimulatePaymentResultTask.php +++ b/plugins/StateMachineSandbox/src/Queue/Task/SimulatePaymentResultTask.php @@ -26,7 +26,7 @@ class SimulatePaymentResultTask extends Task { public function run(array $data, int $jobId): void { $this->loadModel('StateMachineSandbox.Registrations'); try { - $registration = $this->Registrations->get($data['id'], ['contain' => ['RegistrationStates']]); + $registration = $this->Registrations->get($data['id'], contain: ['RegistrationStates']); } catch (RecordNotFoundException $e) { // Someone already removed the registration, for demo we can ignore return; diff --git a/plugins/StateMachineSandbox/src/StateMachine/Command/Registration/InitializePaymentCommand.php b/plugins/StateMachineSandbox/src/StateMachine/Command/Registration/InitializePaymentCommand.php index 6b70cb03..0384dde9 100644 --- a/plugins/StateMachineSandbox/src/StateMachine/Command/Registration/InitializePaymentCommand.php +++ b/plugins/StateMachineSandbox/src/StateMachine/Command/Registration/InitializePaymentCommand.php @@ -27,7 +27,7 @@ public function run(ItemDto $itemDto): void { $this->QueuedJobs->createJob( 'StateMachineSandbox.SimulatePaymentResult', ['id' => $registrationId], - ['reference' => $reference, 'notBefore' => (new FrozenTime())->addMinute()], + ['reference' => $reference, 'notBefore' => (new \Cake\I18n\DateTime())->addMinute()], ); } diff --git a/plugins/StateMachineSandbox/src/StateMachine/Condition/Registration/CheckApprovalCondition.php b/plugins/StateMachineSandbox/src/StateMachine/Condition/Registration/CheckApprovalCondition.php index c6177db0..44a9092c 100644 --- a/plugins/StateMachineSandbox/src/StateMachine/Condition/Registration/CheckApprovalCondition.php +++ b/plugins/StateMachineSandbox/src/StateMachine/Condition/Registration/CheckApprovalCondition.php @@ -24,7 +24,7 @@ public function check(ItemDto $itemDto): bool { $registrationId = $itemDto->getIdentifierOrFail(); $this->loadModel('StateMachineSandbox.Registrations'); - $registration = $this->Registrations->get($registrationId, ['contain' => ['Users' => ['Roles']]]); + $registration = $this->Registrations->get($registrationId, contain: ['Users' => ['Roles']]); if ($registration->user && $registration->user->role && $registration->user->role->alias === 'mod') { return true; } diff --git a/plugins/StateMachineSandbox/tests/TestCase/Controller/RegistrationsControllerTest.php b/plugins/StateMachineSandbox/tests/TestCase/Controller/RegistrationsControllerTest.php index 5bebc604..53d7b0cd 100644 --- a/plugins/StateMachineSandbox/tests/TestCase/Controller/RegistrationsControllerTest.php +++ b/plugins/StateMachineSandbox/tests/TestCase/Controller/RegistrationsControllerTest.php @@ -16,7 +16,7 @@ class RegistrationsControllerTest extends TestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.StateMachineSandbox.Registrations', ]; diff --git a/plugins/StateMachineSandbox/tests/TestCase/Controller/StateMachineSandboxControllerTest.php b/plugins/StateMachineSandbox/tests/TestCase/Controller/StateMachineSandboxControllerTest.php index d71b0dfa..bcd719db 100644 --- a/plugins/StateMachineSandbox/tests/TestCase/Controller/StateMachineSandboxControllerTest.php +++ b/plugins/StateMachineSandbox/tests/TestCase/Controller/StateMachineSandboxControllerTest.php @@ -21,7 +21,7 @@ class StateMachineSandboxControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'app.Users', ]; diff --git a/plugins/StateMachineSandbox/tests/TestCase/Model/Table/RegistrationsTableTest.php b/plugins/StateMachineSandbox/tests/TestCase/Model/Table/RegistrationsTableTest.php index c1b8d9d4..100f9427 100644 --- a/plugins/StateMachineSandbox/tests/TestCase/Model/Table/RegistrationsTableTest.php +++ b/plugins/StateMachineSandbox/tests/TestCase/Model/Table/RegistrationsTableTest.php @@ -18,7 +18,7 @@ class RegistrationsTableTest extends TestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.StateMachineSandbox.Registrations', 'app.Users', ]; diff --git a/plugins/StateMachineSandbox/tests/TestCase/Queue/Task/SimulatePaymentResultTaskTest.php b/plugins/StateMachineSandbox/tests/TestCase/Queue/Task/SimulatePaymentResultTaskTest.php index cab29f29..605928e3 100644 --- a/plugins/StateMachineSandbox/tests/TestCase/Queue/Task/SimulatePaymentResultTaskTest.php +++ b/plugins/StateMachineSandbox/tests/TestCase/Queue/Task/SimulatePaymentResultTaskTest.php @@ -10,7 +10,7 @@ class SimulatePaymentResultTaskTest extends TestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.StateMachineSandbox.Registrations', 'app.Users', 'app.Roles', diff --git a/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Command/Registration/InitializePaymentCommandTest.php b/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Command/Registration/InitializePaymentCommandTest.php index 4d89c8da..314ad975 100644 --- a/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Command/Registration/InitializePaymentCommandTest.php +++ b/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Command/Registration/InitializePaymentCommandTest.php @@ -25,7 +25,7 @@ public function testRun(): void { $reference = 'registration-1'; /** @var \Queue\Model\Entity\QueuedJob $queuedJob */ - $queuedJob = $this->getTableLocator()->get('Queue.QueuedJobs')->find()->orderDesc('id')->firstOrFail(); + $queuedJob = $this->getTableLocator()->get('Queue.QueuedJobs')->find()->orderByDesc('id')->firstOrFail(); $this->assertSame($reference, $queuedJob->reference); } diff --git a/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Condition/Registration/CheckApprovalConditionTest.php b/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Condition/Registration/CheckApprovalConditionTest.php index 6e1c5594..f6d31873 100644 --- a/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Condition/Registration/CheckApprovalConditionTest.php +++ b/plugins/StateMachineSandbox/tests/TestCase/StateMachine/Condition/Registration/CheckApprovalConditionTest.php @@ -12,7 +12,7 @@ class CheckApprovalConditionTest extends TestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.StateMachineSandbox.Registrations', 'app.Users', 'app.Roles', diff --git a/src/Controller/AccountController.php b/src/Controller/AccountController.php index a7cc7847..68922a40 100644 --- a/src/Controller/AccountController.php +++ b/src/Controller/AccountController.php @@ -123,12 +123,11 @@ public function lostPassword($key = null) { // Validate basic email scheme and captcha input. if (!$user->getErrors()) { /** @var \App\Model\Entity\User|null $res */ - $res = $this->Users->find('all', [ - 'fields' => ['username', 'id', 'email'], - 'conditions' => [ + $res = $this->Users->find('all', + fields: ['username', 'id', 'email'], + conditions: [ 'email' => $this->request->getData('Form.login'), - ], - ])->first(); + ])->first(); // Valid user found to this email address if ($res) { diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index bda3266e..5e23e380 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -21,9 +21,9 @@ public function initialize(): void { $this->loadComponent('Tools.Common'); $this->loadComponent('Flash.Flash'); - $this->loadComponent('TinyAuth.Auth'); - $this->loadComponent('TinyAuth.AuthUser'); - } + $this->loadComponent('TinyAuth.Auth'); + $this->loadComponent('TinyAuth.AuthUser'); + } /** * @param \Cake\Event\EventInterface $event diff --git a/src/Model/Entity/Role.php b/src/Model/Entity/Role.php index 536768f4..97d8abec 100644 --- a/src/Model/Entity/Role.php +++ b/src/Model/Entity/Role.php @@ -8,20 +8,20 @@ * @property int $id * @property string $name * @property string $alias - * @property \Cake\I18n\FrozenTime $created - * @property \Cake\I18n\FrozenTime $modified + * @property \Cake\I18n\DateTime $created + * @property \Cake\I18n\DateTime $modified * @method int getIdOrFail() * @method string getNameOrFail() * @method string getAliasOrFail() - * @method \Cake\I18n\FrozenTime getCreatedOrFail() - * @method \Cake\I18n\FrozenTime getModifiedOrFail() + * @method \Cake\I18n\DateTime getCreatedOrFail() + * @method \Cake\I18n\DateTime getModifiedOrFail() * @property array<\App\Model\Entity\User> $users * @method array<\App\Model\Entity\User> getUsersOrFail() * @method $this setIdOrFail(int $value) * @method $this setNameOrFail(string $value) * @method $this setAliasOrFail(string $value) - * @method $this setCreatedOrFail(\Cake\I18n\FrozenTime $value) - * @method $this setModifiedOrFail(\Cake\I18n\FrozenTime $value) + * @method $this setCreatedOrFail(\Cake\I18n\DateTime $value) + * @method $this setModifiedOrFail(\Cake\I18n\DateTime $value) * @method $this setUsersOrFail(array $value) */ class Role extends Entity { @@ -35,7 +35,7 @@ class Role extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; diff --git a/src/Model/Entity/User.php b/src/Model/Entity/User.php index f391bb43..f4bd8941 100644 --- a/src/Model/Entity/User.php +++ b/src/Model/Entity/User.php @@ -12,15 +12,15 @@ * @property int $logins * @property bool $active * @property int $role_id - * @property \Cake\I18n\FrozenTime $created - * @property \Cake\I18n\FrozenTime $modified - * @property \Cake\I18n\FrozenTime|null $last_login + * @property \Cake\I18n\DateTime $created + * @property \Cake\I18n\DateTime $modified + * @property \Cake\I18n\DateTime|null $last_login * @property \App\Model\Entity\Role $role * @method int getIdOrFail() * @method bool getActiveOrFail() - * @method \Cake\I18n\FrozenTime getLastLoginOrFail() - * @method \Cake\I18n\FrozenTime getCreatedOrFail() - * @method \Cake\I18n\FrozenTime getModifiedOrFail() + * @method \Cake\I18n\DateTime getLastLoginOrFail() + * @method \Cake\I18n\DateTime getCreatedOrFail() + * @method \Cake\I18n\DateTime getModifiedOrFail() * @method int getLoginsOrFail() * @method string getUsernameOrFail() * @method string getPasswordOrFail() @@ -29,9 +29,9 @@ * @method \App\Model\Entity\Role getRoleOrFail() * @method $this setIdOrFail(int $value) * @method $this setActiveOrFail(bool $value) - * @method $this setLastLoginOrFail(\Cake\I18n\FrozenTime $value) - * @method $this setCreatedOrFail(\Cake\I18n\FrozenTime $value) - * @method $this setModifiedOrFail(\Cake\I18n\FrozenTime $value) + * @method $this setLastLoginOrFail(\Cake\I18n\DateTime $value) + * @method $this setCreatedOrFail(\Cake\I18n\DateTime $value) + * @method $this setModifiedOrFail(\Cake\I18n\DateTime $value) * @method $this setLoginsOrFail(int $value) * @method $this setUsernameOrFail(string $value) * @method $this setPasswordOrFail(string $value) @@ -50,7 +50,7 @@ class User extends Entity { * * @var array */ - protected $_accessible = [ + protected array $_accessible = [ '*' => true, 'id' => false, ]; @@ -60,7 +60,7 @@ class User extends Entity { * * @var array */ - protected $_hidden = [ + protected array $_hidden = [ 'password', ]; diff --git a/src/View/Helper/NavigationHelper.php b/src/View/Helper/NavigationHelper.php index 66a38306..e080f7ef 100644 --- a/src/View/Helper/NavigationHelper.php +++ b/src/View/Helper/NavigationHelper.php @@ -12,7 +12,7 @@ class NavigationHelper extends Helper { /** * @var array */ - protected $helpers = ['Html']; + protected array $helpers = ['Html']; /** * @param string $link diff --git a/tests/Fixture/RolesFixture.php b/tests/Fixture/RolesFixture.php index b6993318..4d5bcda2 100644 --- a/tests/Fixture/RolesFixture.php +++ b/tests/Fixture/RolesFixture.php @@ -34,7 +34,7 @@ class RolesFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'name' => 'Admin', diff --git a/tests/Fixture/UsersFixture.php b/tests/Fixture/UsersFixture.php index f5fec903..62e03fbe 100644 --- a/tests/Fixture/UsersFixture.php +++ b/tests/Fixture/UsersFixture.php @@ -34,7 +34,7 @@ class UsersFixture extends TestFixture { * * @var array */ - public $records = [ + public array $records = [ [ 'id' => 1, 'active' => 1, diff --git a/tests/TestCase/Controller/AccountControllerTest.php b/tests/TestCase/Controller/AccountControllerTest.php index 7399ef5e..a0d13e2b 100644 --- a/tests/TestCase/Controller/AccountControllerTest.php +++ b/tests/TestCase/Controller/AccountControllerTest.php @@ -16,7 +16,7 @@ class AccountControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'app.Users', 'app.Roles', ]; diff --git a/tests/TestCase/Controller/ContactControllerTest.php b/tests/TestCase/Controller/ContactControllerTest.php index e92d2b87..ced4fc8c 100644 --- a/tests/TestCase/Controller/ContactControllerTest.php +++ b/tests/TestCase/Controller/ContactControllerTest.php @@ -14,7 +14,7 @@ class ContactControllerTest extends IntegrationTestCase { /** * @var array */ - protected $fixtures = [ + protected array $fixtures = [ //'plugin.Captcha.Captchas', ]; diff --git a/tests/TestCase/Model/Table/UsersTableTest.php b/tests/TestCase/Model/Table/UsersTableTest.php index 93d22991..b80282e3 100644 --- a/tests/TestCase/Model/Table/UsersTableTest.php +++ b/tests/TestCase/Model/Table/UsersTableTest.php @@ -15,7 +15,7 @@ class UsersTableTest extends TestCase { * * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'app.Users', ]; diff --git a/tests/TestCase/Queue/Task/MyTaskNameTaskTest.php b/tests/TestCase/Queue/Task/MyTaskNameTaskTest.php index c9a8e341..71fca151 100644 --- a/tests/TestCase/Queue/Task/MyTaskNameTaskTest.php +++ b/tests/TestCase/Queue/Task/MyTaskNameTaskTest.php @@ -10,7 +10,7 @@ class MyTaskNameTaskTest extends TestCase { /** * @var array */ - public $fixtures = [ + public array $fixtures = [ 'plugin.Queue.QueuedJobs', 'plugin.Queue.QueueProcesses', ];