1 | <?php |
||
60 | trait EncodingProgressEventTrait |
||
61 | { |
||
62 | /** |
||
63 | * The id of the encoded video |
||
64 | * @var string |
||
65 | */ |
||
66 | private $videoId; |
||
67 | |||
68 | /** |
||
69 | * The id of the encoding |
||
70 | * @var string |
||
71 | */ |
||
72 | private $encodingId; |
||
73 | |||
74 | /** |
||
75 | * The encoding progress |
||
76 | * @var int |
||
77 | */ |
||
78 | private $progress; |
||
79 | |||
80 | /** |
||
81 | * Constructs a new EncodingProgressEvent. |
||
82 | * |
||
83 | * @param string $videoId Video id |
||
84 | * @param string $encodingId Encoding id |
||
85 | * @param int $progress Progress of the encoding |
||
86 | */ |
||
87 | 4 | public function __construct($videoId, $encodingId, $progress) |
|
93 | |||
94 | /** |
||
95 | * Returns the video id. |
||
96 | * |
||
97 | * @return string The video id |
||
98 | */ |
||
99 | 3 | public function getVideoId() |
|
103 | |||
104 | /** |
||
105 | * Returns the encoding id. |
||
106 | * |
||
107 | * @return string The encoding id |
||
108 | */ |
||
109 | 3 | public function getEncodingId() |
|
113 | |||
114 | /** |
||
115 | * Returns the encoding progress. |
||
116 | * |
||
117 | * @return int The progress |
||
118 | */ |
||
119 | 3 | public function getProgress() |
|
123 | } |
||
124 |
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.