Skip to content

Commit 54dfb64

Browse files
committed
Remove deprecation usage
1 parent 46977c9 commit 54dfb64

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/Controller/Component/CommonComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function initialize(array $config): void {
4545
* @param \Cake\Event\EventInterface $event
4646
* @return void
4747
*/
48-
public function startup(EventInterface $event) {
48+
public function startup(EventInterface $event): void {
4949
if ($this->getConfig('notrim') || Configure::read('DataPreparation.notrim')) {
5050
return;
5151
}

src/Model/Behavior/JsonableBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function decodeItems(EntityInterface $entity) {
150150
* @param \ArrayObject $options
151151
* @return void
152152
*/
153-
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) {
153+
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options): void {
154154
$fields = $this->_getMappedFields();
155155

156156
foreach ($fields as $map => $field) {

src/Model/Behavior/PasswordableBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public function beforeRules(EventInterface $event, EntityInterface $entity, Arra
308308
* @throws \RuntimeException
309309
* @return void
310310
*/
311-
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) {
311+
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options): void {
312312
$formField = $this->_config['formField'];
313313
$field = $this->_config['field'];
314314

src/Model/Behavior/SluggedBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function beforeRules(EventInterface $event, EntityInterface $entity, Arra
203203
* @param \ArrayObject $options
204204
* @return void
205205
*/
206-
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) {
206+
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options): void {
207207
if ($this->_config['on'] === 'beforeSave') {
208208
$this->slug($entity);
209209
}

src/Model/Behavior/StringBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function processItems(EntityInterface $entity, $type = 'input') {
106106
* @param \ArrayObject $options
107107
* @return void
108108
*/
109-
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) {
109+
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options): void {
110110
$this->processItems($entity, 'input');
111111
}
112112

tests/test_app/Controller/Component/AppleComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AppleComponent extends Component {
2323
* @param \Cake\Event\EventInterface $event
2424
* @return void
2525
*/
26-
public function startup(EventInterface $event) {
26+
public function startup(EventInterface $event): void {
2727
}
2828

2929
}

tests/test_app/Controller/Component/BananaComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BananaComponent extends Component {
2323
* @param \Cake\Event\EventInterface $event
2424
* @return void
2525
*/
26-
public function startup(EventInterface $event) {
26+
public function startup(EventInterface $event): void {
2727
$this->_registry->getController()->bar = 'fail';
2828
}
2929

tests/test_app/Controller/Component/TestComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function beforeFilter(EventInterface $event): void {
2929
* @param \Cake\Event\EventInterface $event
3030
* @return void
3131
*/
32-
public function startup(EventInterface $event) {
32+
public function startup(EventInterface $event): void {
3333
$this->isStartup = true;
3434
}
3535

0 commit comments

Comments
 (0)