for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Soluble\MediaTools;
use Soluble\MediaTools\Config\FFMpegConfig;
use Soluble\MediaTools\Exception\FileNotFoundException;
use Soluble\MediaTools\Video\Detection\InterlaceDetect;
use Soluble\MediaTools\Video\Detection\InterlaceDetectGuess;
use Soluble\MediaTools\Video\DetectionServiceInterface;
use Symfony\Component\Process\Exception\RuntimeException as SPRuntimeException;
class VideoDetectionService implements DetectionServiceInterface
{
/** @var FFMpegConfig */
protected $ffmpegConfig;
public function __construct(FFMpegConfig $ffmpegConfig)
$this->ffmpegConfig = $ffmpegConfig;
This check looks for improperly formatted assignments.
Every assignment must have exactly one space before and one space after the equals operator.
To illustrate:
$a = "a"; $ab = "ab"; $abc = "abc";
will have no issues, while
will report issues in lines 1 and 2.
}
/**
* @param int $maxFramesToAnalyze interlacement detection can be heavy, limit the number of frames to analyze
*
* @throws SPRuntimeException
* @throws FileNotFoundException
*/
public function detectInterlacement(string $file, int $maxFramesToAnalyze = InterlaceDetect::DEFAULT_INTERLACE_MAX_FRAMES): InterlaceDetectGuess
$interlaceDetect = new InterlaceDetect($this->ffmpegConfig);
return $interlaceDetect->guessInterlacing($file, $maxFramesToAnalyze);
This check looks for improperly formatted assignments.
Every assignment must have exactly one space before and one space after the equals operator.
To illustrate:
will have no issues, while
will report issues in lines 1 and 2.