Skip to content

Commit 7bfd0c1

Browse files
author
igor-chepurnoi
committed
remove unused code
1 parent 136d401 commit 7bfd0c1

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

CallbackEvent.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use yii\base\Application;
66
use yii\base\InvalidParamException;
7-
use yii\base\Object;
87

98
/**
109
* Class CallbackEvent
@@ -37,13 +36,13 @@ public function __construct($callback, array $parameters = [], $config = [])
3736
$this->callback = $callback;
3837
$this->parameters = $parameters;
3938

40-
Object::__construct($config);
41-
4239
if (!is_string($this->callback) && !is_callable($this->callback)) {
4340
throw new InvalidParamException(
4441
'Invalid scheduled callback event. Must be string or callable.'
4542
);
4643
}
44+
45+
parent::__construct($config);
4746
}
4847

4948
/**

Event.php

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public function __construct($command, $config = [])
9393
{
9494
$this->command = $command;
9595
$this->_output = $this->getDefaultOutput();
96+
9697
parent::__construct($config);
9798
}
9899

ScheduleController.php

+4-7
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ class ScheduleController extends Controller
2626
public $scheduleFile = '@app/config/schedule.php';
2727

2828
/**
29-
* Returns the names of valid options for the action (id)
30-
*
31-
* @param string $actionID
32-
*
33-
* @return array
29+
* @inheritdoc
3430
*/
3531
public function options($actionID)
3632
{
@@ -40,16 +36,17 @@ public function options($actionID)
4036
}
4137

4238
/**
43-
* Initializes the object.
39+
* @inheritdoc
4440
*/
4541
public function init()
4642
{
43+
parent::init();
44+
4745
if (Yii::$app->has($this->schedule)) {
4846
$this->schedule = Instance::ensure($this->schedule, Schedule::className());
4947
} else {
5048
$this->schedule = Yii::createObject(Schedule::className());
5149
}
52-
parent::init();
5350
}
5451

5552
/**

0 commit comments

Comments
 (0)