1 | <?php |
||
12 | class ClientIdProvider |
||
13 | { |
||
14 | const COOKIE_NAME = '_ga'; |
||
15 | |||
16 | /** |
||
17 | * @var RequestStack requestStack |
||
18 | */ |
||
19 | protected $requestStack; |
||
20 | |||
21 | 1 | public function __construct(RequestStack $requestStack) |
|
25 | |||
26 | /** |
||
27 | * Get client id from cookie... if we can. |
||
28 | * |
||
29 | * @return false|string |
||
30 | */ |
||
31 | 1 | public function getClientId() |
|
43 | |||
44 | /** |
||
45 | * Return the value of a cookie. |
||
46 | * |
||
47 | * @param string $name |
||
|
|||
48 | * |
||
49 | * @return mixed|false |
||
50 | */ |
||
51 | protected function getClientIdFormCookie() |
||
65 | |||
66 | /** |
||
67 | * Get the client id from the cookie value. |
||
68 | * |
||
69 | * The contents of the cookie might be "GA1.2.1110480476.1405690517" |
||
70 | * The 3rd section is the user id. |
||
71 | * The 4th section is the session id. |
||
72 | * The client id is the user id + the session id |
||
73 | * |
||
74 | * @param $cookieValue |
||
75 | * |
||
76 | * @link http://stackoverflow.com/a/16107194/1526789 |
||
77 | * |
||
78 | * @return string|bool clientId or boolean false |
||
79 | */ |
||
80 | 1 | protected function extractCookie($cookieValue) |
|
89 | } |
||
90 |
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.