1 | <?php |
||
57 | trait VideoCreatedEventTrait |
||
58 | { |
||
59 | /** |
||
60 | * The id of the video |
||
61 | * @var string |
||
62 | */ |
||
63 | private $videoId; |
||
64 | |||
65 | /** |
||
66 | * List of encoding ids of this video |
||
67 | * @var string[] |
||
68 | */ |
||
69 | private $encodingIds = array(); |
||
70 | |||
71 | /** |
||
72 | * Constructs a new VideoCreatedEvent. |
||
73 | * |
||
74 | * @param string $videoId Video id |
||
75 | * @param string[] $encodingIds Ids of the video's encodings |
||
76 | */ |
||
77 | 4 | public function __construct($videoId, array $encodingIds) |
|
82 | |||
83 | /** |
||
84 | * Returns the video id. |
||
85 | * |
||
86 | * @return string The video id |
||
87 | */ |
||
88 | 3 | public function getVideoId() |
|
92 | |||
93 | /** |
||
94 | * Returns the video's encoding ids. |
||
95 | * |
||
96 | * @return string[] The encoding ids |
||
97 | */ |
||
98 | 3 | public function getEncodingIds() |
|
102 | } |
||
103 |
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.