1 | <?php |
||
7 | class ConnectionLogger extends Logger implements ConnectionInterface |
||
8 | { |
||
9 | /** |
||
10 | * The connection to watch. |
||
11 | * |
||
12 | * @var \Ratchet\ConnectionInterface |
||
13 | */ |
||
14 | protected $connection; |
||
15 | |||
16 | /** |
||
17 | * Create a new instance and add a connection to watch. |
||
18 | * |
||
19 | * @param \Ratchet\ConnectionInterface $connection |
||
|
|||
20 | * @return self |
||
21 | */ |
||
22 | public static function decorate(ConnectionInterface $app): self |
||
28 | |||
29 | /** |
||
30 | * Set a new connection to watch. |
||
31 | * |
||
32 | * @param \Ratchet\ConnectionInterface $connection |
||
33 | * @return $this |
||
34 | */ |
||
35 | public function setConnection(ConnectionInterface $connection) |
||
41 | |||
42 | /** |
||
43 | * Send data through the connection. |
||
44 | * |
||
45 | * @param string $data |
||
46 | * @return void |
||
47 | */ |
||
48 | public function send($data) |
||
56 | |||
57 | /** |
||
58 | * Close the connection. |
||
59 | * |
||
60 | * @return void |
||
61 | */ |
||
62 | public function close() |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function __set($name, $value) |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function __get($name) |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function __isset($name) |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function __unset($name) |
||
100 | } |
||
101 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.