1 | <?php |
||
20 | class PublicConnection |
||
21 | { |
||
22 | /** |
||
23 | * @var ConnectionInterface |
||
24 | */ |
||
25 | protected $connection; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $initBuffer; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $id; |
||
36 | |||
37 | /** |
||
38 | * The create time |
||
39 | * @var int |
||
40 | */ |
||
41 | protected $createAt; |
||
42 | |||
43 | public function __construct(ConnectionInterface $connection, $initBuffer = '') |
||
50 | |||
51 | public function __call($name, $arguments) |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getId() |
||
63 | |||
64 | /** |
||
65 | * @return ConnectionInterface |
||
66 | */ |
||
67 | public function getConnection() |
||
71 | |||
72 | /** |
||
73 | * @param string $initBuffer |
||
74 | */ |
||
75 | public function setInitBuffer($initBuffer) |
||
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getInitBuffer() |
||
87 | |||
88 | /** |
||
89 | * Gets the waiting duration of the connection |
||
90 | * @return float |
||
91 | */ |
||
92 | public function getWaitingDuration() |
||
96 | } |
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.