Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
3 / 3 |
| ArgsTrait | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
3 / 3 |
| getArgs | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| setArgs | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| <?php | |
| declare(strict_types=1); | |
| namespace Korobochkin\WPKit\Cron\Traits; | |
| /** | |
| * Trait ArgsTrait | |
| * @package Korobochkin\WPKit\Cron\Traits | |
| */ | |
| trait ArgsTrait | |
| { | |
| /** | |
| * @var array Args for event. | |
| */ | |
| protected $args = array(); | |
| /** | |
| * Returns the args for this particular event. | |
| * | |
| * @return array Args which will be passed to event during execution. | |
| */ | |
| public function getArgs() | |
| { | |
| return $this->args; | |
| } | |
| /** | |
| * Sets the args for particular event. | |
| * | |
| * @param $args array Args for event. | |
| * | |
| * @return $this For chain calls. | |
| */ | |
| public function setArgs(array $args) | |
| { | |
| $this->args = $args; | |
| return $this; | |
| } | |
| } |