| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class DetectionService implements DetectionServiceInterface |
||
| 15 | { |
||
| 16 | /** @var FFProbeConfig */ |
||
| 17 | protected $ffprobeConfig; |
||
| 18 | |||
| 19 | /** @var FFMpegConfig */ |
||
| 20 | protected $ffmpegConfig; |
||
| 21 | |||
| 22 | /** @var array */ |
||
| 23 | protected $interlaceDetectCache; |
||
| 24 | |||
| 25 | public function __construct(FFProbeConfig $ffProbeConfig, FFMpegConfig $ffmpegConfig) |
||
| 26 | { |
||
| 27 | $this->ffprobeConfig = $ffProbeConfig; |
||
| 28 | $this->ffmpegConfig = $ffmpegConfig; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getInterlaceDetect(): InterlaceDetect |
||
| 33 | } |
||
|
|
|||
| 34 | |||
| 35 | /** |
||
| 36 | * @param int $maxFramesToAnalyze interlacement detection can be heavy, limit the number of frames to analyze |
||
| 37 | * |
||
| 38 | * @throws SPRuntimeException |
||
| 39 | * @throws FileNotFoundException |
||
| 40 | */ |
||
| 41 | public function detectInterlacement(string $file, int $maxFramesToAnalyze = 1000): InterlaceGuess |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: