Skip to content

Commit

Permalink
Merge pull request #277 from cakephp/widget-properties
Browse files Browse the repository at this point in the history
Add rector rules for view Widgets
  • Loading branch information
othercorey authored Apr 7, 2024
2 parents 824c910 + 836e645 commit e6f43c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/rector/sets/cakephp50.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

// View properties
new AddPropertyTypeDeclaration('Cake\View\View', 'layout', $stringType),
new AddPropertyTypeDeclaration('Cake\View\Widget\BasicWidget', 'defaults', $arrayType),

// TestSuite properties
new AddPropertyTypeDeclaration('Cake\TestSuite\TestCase', 'fixtures', $arrayType),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);

class SomeWidget extends \Cake\View\Widget\BasicWidget {
protected $defaults = [];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);

class SomeWidget extends \Cake\View\Widget\BasicWidget {
protected array $defaults = [];
}

0 comments on commit e6f43c8

Please sign in to comment.