Skip to content

Commit

Permalink
5.0 Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Daren Sipes committed Apr 16, 2024
1 parent ed3f304 commit d0eceab
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Component/RefererComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RefererComponent extends Component
*
* @var array
*/
protected $_defaultConfig = [
protected array $_defaultConfig = [
'ignored' => [],
];

Expand Down
6 changes: 3 additions & 3 deletions src/Model/Entity/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* @property string|false $contents
* @property string $base64
* @property \Cake\ORM\Entity\text|array|null $meta
* @property \Cake\I18n\FrozenTime|null $created
* @property \Cake\I18n\FrozenTime|null $modified
* @property \Cake\I18n\DateTime|null $created
* @property \Cake\I18n\DateTime|null $modified
*/
class File extends Entity
{
Expand All @@ -33,7 +33,7 @@ class File extends Entity
*
* @var array
*/
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false,
'Referer' => false,
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function ssn(string $check): bool
*/
public static function birthdate(Time $check): bool
{
$today = new FrozenTime('00:00:00');
$today = new \Cake\I18n\DateTime('00:00:00');
if ($check->toUnixString() > $today->toUnixString()) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Plugin extends BasePlugin
*
* @var string
*/
protected $name = 'ButterCream';
protected ?string $name = 'ButterCream';

/**
* Load all the plugin configuration and bootstrap logic.
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/AjaxHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AjaxHelper extends Helper
*
* @var array
*/
protected $_defaultConfig = [
protected array $_defaultConfig = [
'templates' => [
'tag' => '<{{tag}}{{attrs}}>{{content}}</{{tag}}>',
],
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/GravatarHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GravatarHelper extends Helper
*
* @var array
*/
public $helpers = ['Html'];
public array $helpers = ['Html'];

/**
* Takes and email address and options and returns a gravatar
Expand Down
4 changes: 2 additions & 2 deletions src/View/Helper/NestedTreeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class NestedTreeHelper extends Helper
*
* @var array
*/
public $helpers = ['Html'];
public array $helpers = ['Html'];

/**
* Default config for this class
*
* @var array
*/
protected $_defaultConfig = [
protected array $_defaultConfig = [
'templates' => [
'container' => '<div{{attrs}}>{{content}}</div>',
'list' => '<ul{{attrs}}>{{content}}</ul>',
Expand Down
4 changes: 2 additions & 2 deletions src/View/Helper/TableHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class TableHelper extends Helper
*
* @var array
*/
public $helpers = ['Html', 'Paginator'];
public array $helpers = ['Html', 'Paginator'];

/**
* Default config for this class
*
* @var array
*/
protected $_defaultConfig = [
protected array $_defaultConfig = [
'templates' => [
'tableheader' => '<th{{attrs}}>{{content}}{{help}}</th>',
],
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/TimeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function userFormat($date, ?string $format = null, $invalid = false, $tim
}
try {
if ($date instanceof DateTimeInterface) {
$date = new FrozenTime($date);
$date = new \Cake\I18n\DateTime($date);
}
$date->timezone = $timezone;

Expand Down

0 comments on commit d0eceab

Please sign in to comment.