Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
20.00% |
1 / 5 |
|
33.33% |
1 / 3 |
CRAP | |
0.00% |
0 / 1 |
| Video | |
20.00% |
1 / 5 |
|
33.33% |
1 / 3 |
12.19 | |
0.00% |
0 / 1 |
| supportedTranslateModes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| value | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| structure | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Field; |
| 6 | |
| 7 | use Cosray\Schema\TranslateMode; |
| 8 | use Cosray\Value; |
| 9 | |
| 10 | class Video extends File |
| 11 | { |
| 12 | /** @return list<TranslateMode> */ |
| 13 | protected function supportedTranslateModes(): array |
| 14 | { |
| 15 | return [TranslateMode::Symmetric, TranslateMode::Asymmetric]; |
| 16 | } |
| 17 | |
| 18 | public function value(): Value\Video |
| 19 | { |
| 20 | return new Value\Video($this->owner, $this, $this->valueContext); |
| 21 | } |
| 22 | |
| 23 | public function structure(mixed $value = null): array |
| 24 | { |
| 25 | if ($this->isAsymmetricallyTranslated()) { |
| 26 | return $this->getTranslatableFileStructure('video', $value); |
| 27 | } |
| 28 | |
| 29 | return $this->getFileStructure('video', $value); |
| 30 | } |
| 31 | } |