1 | <?php |
||
57 | trait EncodingProgressEventTrait |
||
58 | { |
||
59 | /** |
||
60 | * The id of the encoded video |
||
61 | * @var string |
||
62 | */ |
||
63 | private $videoId; |
||
64 | |||
65 | /** |
||
66 | * The id of the encoding |
||
67 | * @var string |
||
68 | */ |
||
69 | private $encodingId; |
||
70 | |||
71 | /** |
||
72 | * The encoding progress |
||
73 | * @var int |
||
74 | */ |
||
75 | private $progress; |
||
76 | |||
77 | /** |
||
78 | * Constructs a new EncodingProgressEvent. |
||
79 | * |
||
80 | * @param string $videoId Video id |
||
81 | * @param string $encodingId Encoding id |
||
82 | * @param int $progress Progress of the encoding |
||
83 | */ |
||
84 | 4 | public function __construct($videoId, $encodingId, $progress) |
|
90 | |||
91 | /** |
||
92 | * Returns the video id. |
||
93 | * |
||
94 | * @return string The video id |
||
95 | */ |
||
96 | 3 | public function getVideoId() |
|
100 | |||
101 | /** |
||
102 | * Returns the encoding id. |
||
103 | * |
||
104 | * @return string The encoding id |
||
105 | */ |
||
106 | 3 | public function getEncodingId() |
|
110 | |||
111 | /** |
||
112 | * Returns the encoding progress. |
||
113 | * |
||
114 | * @return int The progress |
||
115 | */ |
||
116 | 3 | public function getProgress() |
|
120 | } |
||
121 |
This check looks for classes that have been defined more than once in the same file.
If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.