1 | <?php |
||
26 | class ClientBuilder |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $baseUri; |
||
33 | |||
34 | /** |
||
35 | * @var AuthenticationInterface |
||
36 | */ |
||
37 | private $authentication; |
||
38 | |||
39 | /** |
||
40 | * @var SerializerInterface |
||
41 | */ |
||
42 | private $serializer; |
||
43 | |||
44 | /** |
||
45 | * @var boolean |
||
46 | */ |
||
47 | private $debug; |
||
48 | |||
49 | |||
50 | /** |
||
51 | * @param string $baseUri |
||
52 | * @param AuthenticationInterface $authenticationMethod |
||
53 | * |
||
54 | * @return ClientBuilder |
||
55 | */ |
||
56 | public static function create($baseUri, AuthenticationInterface $authenticationMethod) |
||
60 | |||
61 | /** |
||
62 | * ClientBuilder constructor. |
||
63 | * |
||
64 | * @param $baseUri |
||
65 | * @param AuthenticationInterface $authentication |
||
66 | */ |
||
67 | private function __construct($baseUri, AuthenticationInterface $authentication) |
||
76 | |||
77 | /** |
||
78 | * @return Client |
||
79 | */ |
||
80 | public function build() |
||
97 | |||
98 | /** |
||
99 | * @param SerializerInterface $serializer |
||
100 | */ |
||
101 | public function setSerializer(SerializerInterface $serializer) |
||
105 | |||
106 | |||
107 | /** |
||
108 | * @param boolean $debug |
||
109 | * |
||
110 | * @return $this |
||
111 | */ |
||
112 | public function setDebug($debug) |
||
117 | |||
118 | private function buildDefaultSerializer() |
||
125 | } |
||
126 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.