1 | <?php |
||
60 | trait EncodingCompleteEventTrait |
||
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 | * Constructs a new EncodingCompleteEvent. |
||
76 | * |
||
77 | * @param string $videoId Video id |
||
78 | * @param string $encodingId Encoding id |
||
79 | */ |
||
80 | 4 | public function __construct($videoId, $encodingId) |
|
85 | |||
86 | /** |
||
87 | * Returns the video id. |
||
88 | * |
||
89 | * @return string The video id |
||
90 | */ |
||
91 | 3 | public function getVideoId() |
|
95 | |||
96 | /** |
||
97 | * Returns the encoding id. |
||
98 | * |
||
99 | * @return string The encoding id |
||
100 | */ |
||
101 | 3 | public function getEncodingId() |
|
105 | } |
||
106 |
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.