Failed Conditions
Push — master ( 85c284...561f65 )
by Sébastien
02:44
created

src/Video/ConversionParamsInterface.php (6 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\MediaTools\Video;
6
7
interface ConversionParamsInterface
8
{
9
    public const PARAM_VIDEO_CODEC         = 'VIDEO_CODEC';
10
    public const PARAM_VIDEO_BITRATE       = 'VIDEO_BITRATE';
11
    public const PARAM_VIDEO_MIN_BITRATE   = 'VIDEO_MIN_BITRATE';
12
    public const PARAM_VIDEO_MAX_BITRATE   = 'VIDEO_MAX_BITRATE';
13
    public const PARAM_VIDEO_QUALITY_SCALE = 'VIDEO_QUALITY_SCALE';
14
    public const PARAM_VIDEO_FILTER        = 'VIDEO_FILTER';
15
    public const PARAM_AUDIO_CODEC         = 'AUDIO_CODEC';
16
    public const PARAM_AUDIO_BITRATE       = 'AUDIO_BITRATE';
17
    public const PARAM_CRF                 = 'CRF';
18
    public const PARAM_PIX_FMT             = 'PIX_FMT';
19
    public const PARAM_PRESET              = 'PRESET';
20
    public const PARAM_TUNE                = 'TUNE';
21
    public const PARAM_STREAMABLE          = 'STREAMABLE';
22
    public const PARAM_QUALITY             = 'QUALITY';
23
    public const PARAM_OUTPUT_FORMAT       = 'OUTPUT_FORMAT';
24
    public const PARAM_FRAME_PARALLEL      = 'FRAME_PARALLEL';
25
    public const PARAM_TILE_COLUMNS        = 'TILE_COLUMNS';
26
27
    public const PARAM_SEEK_START        = 'SEEK_START';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 1 space but found 8 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
28
    public const PARAM_SEEK_END          = 'SEEK_END';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 10 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
29
30
    // Only for vp9
31
    public const PARAM_SPEED             = 'SPEED';
32
    public const PARAM_THREADS           = 'THREADS';
33
    public const PARAM_KEYFRAME_SPACING  = 'KEYFRAME_SPACING';
34
35
    // File Options
36
    public const PARAM_OVERWRITE_FILE    = 'OVERWRITE_FILE';
0 ignored issues
show
Equals sign not aligned correctly; expected 1 space but found 4 spaces

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

$a   = "a";
$ab  = "ab";
$abc = "abc";

will report issues in lines 1 and 2.

Loading history...
37
38
    public const PARAM_FILTER            = 'FILTER';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 12 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
39
    public const PARAM_NOAUDIO           = 'NOAUDIO';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 11 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
40
    public const PARAM_VIDEO_FRAMES      = 'VIDEO_FRAMES';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 1 space but found 6 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
41
42
    /**
43
     * Built-in params.
44
     *
45
     * @var string[]
46
     */
47
    public const BUILTIN_PARAMS = [
48
        self::PARAM_VIDEO_QUALITY_SCALE,
49
        self::PARAM_VIDEO_CODEC,
50
        self::PARAM_VIDEO_BITRATE,
51
        self::PARAM_VIDEO_MIN_BITRATE,
52
        self::PARAM_VIDEO_MAX_BITRATE,
53
        self::PARAM_VIDEO_FILTER,
54
        self::PARAM_AUDIO_CODEC,
55
        self::PARAM_AUDIO_BITRATE,
56
        self::PARAM_CRF,
57
        self::PARAM_PIX_FMT,
58
        self::PARAM_PRESET,
59
        self::PARAM_TUNE,
60
        self::PARAM_STREAMABLE,
61
        self::PARAM_QUALITY,
62
        self::PARAM_OUTPUT_FORMAT,
63
        self::PARAM_FRAME_PARALLEL,
64
        self::PARAM_TILE_COLUMNS,
65
        self::PARAM_THREADS,
66
        self::PARAM_SPEED,
67
        self::PARAM_KEYFRAME_SPACING,
68
        self::PARAM_OVERWRITE_FILE,
69
        self::PARAM_FILTER,
70
        self::PARAM_NOAUDIO,
71
        self::PARAM_VIDEO_FRAMES,
72
        self::PARAM_SEEK_START,
73
        self::PARAM_SEEK_END,
74
    ];
75
76
    /**
77
     * Return the internal array holding params.
78
     *
79
     * @return array<string, mixed>
80
     */
81
    public function toArray(): array;
82
}
83