| 1 | <?php |
||
| 13 | class Start extends Event |
||
| 14 | { |
||
| 15 | const EVENT_NAME = 'profiler.timeline_start'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var mixed |
||
| 19 | */ |
||
| 20 | protected $data; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $label; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $key; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | protected $timestamp; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Start constructor. |
||
| 39 | * @param mixed $data |
||
| 40 | * @param string $label |
||
| 41 | * @param string $key |
||
| 42 | * @param float $timestamp |
||
| 43 | */ |
||
| 44 | 4 | public function __construct($key, $label, $data = null, $timestamp = null) |
|
| 51 | |||
| 52 | |||
| 53 | /** |
||
| 54 | * @return mixed |
||
| 55 | */ |
||
| 56 | 4 | public function getData() |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | 4 | public function getLabel() |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | 4 | public function getKey() |
|
| 76 | |||
| 77 | /** |
||
| 78 | * @return integer |
||
| 79 | */ |
||
| 80 | 4 | public function getTimestamp() |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @return array |
||
| 87 | */ |
||
| 88 | 2 | public function toArray() |
|
| 92 | } |
||
| 93 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.