diff --git a/en/controllers/components.rst b/en/controllers/components.rst index fb0b6ea190..774fa65fec 100644 --- a/en/controllers/components.rst +++ b/en/controllers/components.rst @@ -234,7 +234,7 @@ You can load other components by adding them to the `$components` property:: class CustomComponent extends Component { // The other component your component uses - protected $components = ['Existing']; + protected array $components = ['Existing']; // Execute any other additional setup for your component. public function initialize(array $config): void diff --git a/en/views/helpers.rst b/en/views/helpers.rst index 5c603d7789..f393807058 100644 --- a/en/views/helpers.rst +++ b/en/views/helpers.rst @@ -122,7 +122,7 @@ your helper requires. For example:: /** * @var array */ - protected $_defaultConfig = [ + protected array $_defaultConfig = [ 'errorClass' => 'error', 'templates' => [ 'label' => '', @@ -268,7 +268,7 @@ just as you would in a controller:: class LinkHelper extends Helper { - protected $helpers = ['Html']; + protected array $helpers = ['Html']; public function makeEdit($title, $url) { @@ -317,7 +317,7 @@ If you would like to access a View variable inside a helper, you can use class AwesomeHelper extends Helper { - public $helpers = ['Html']; + public array $helpers = ['Html']; public function someMethod() {