| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PlayDirective extends Directive |
||
| 10 | { |
||
| 11 | public const TYPE = 'AudioPlayer.Play'; |
||
| 12 | |||
| 13 | public const PLAY_BEHAVIOR_REPLACE_ALL = 'REPLACE_ALL'; |
||
| 14 | public const PLAY_BEHAVIOR_ENQUEUE = 'ENQUEUE'; |
||
| 15 | public const PLAY_BEHAVIOR_REPLACE_ENQUEUED = 'REPLACE_ENQUEUED'; |
||
| 16 | |||
| 17 | 2 | public function __construct( |
|
| 18 | public ?string $playBehavior = null, |
||
| 19 | public ?AudioItem $audioItem = null |
||
| 20 | ) { |
||
| 21 | 2 | parent::__construct(self::TYPE); |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | public static function create(AudioItem $audioItem, string $playBehavior = self::PLAY_BEHAVIOR_REPLACE_ALL): self |
|
| 27 | } |
||
| 28 | } |
||
| 29 |