1 | <?php |
||
7 | class LdapService |
||
8 | { |
||
9 | /** |
||
10 | * @var Ldap |
||
11 | */ |
||
12 | protected $ldap; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $rdn; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $password; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $base; |
||
28 | |||
29 | /** |
||
30 | * @param Ldap $ldap |
||
31 | * @param string $rdn |
||
32 | * @param string $password |
||
33 | * @param string $base |
||
34 | */ |
||
35 | public function __construct( |
||
47 | |||
48 | /** |
||
49 | * |
||
50 | */ |
||
51 | protected function bind() |
||
55 | |||
56 | /** |
||
57 | * @param array $data |
||
58 | * @param string $type |
||
59 | * @param string $format |
||
60 | * @return string |
||
61 | */ |
||
62 | public function createFilter(array $data = [], $type = '&', $format = '%s') |
||
79 | |||
80 | /** |
||
81 | * @param $filter |
||
82 | * @param array $attributes |
||
83 | * @param bool $attrsOnly |
||
84 | * @param int $sizeLimit |
||
85 | * @param int $timeLimit |
||
86 | * @return mixed |
||
87 | */ |
||
88 | public function search($filter, $attributes = [], $attrsOnly = false, $sizeLimit = 0, $timeLimit = 0) |
||
115 | |||
116 | /** |
||
117 | * @param $filter |
||
118 | * @param array $attributes |
||
119 | * @param bool $attrsOnly |
||
120 | * @param int $sizeLimit |
||
121 | * @param int $timeLimit |
||
122 | * @return mixed |
||
123 | */ |
||
124 | public function fuzzy($filter, $attributes = [], $attrsOnly = false, $sizeLimit = 0, $timeLimit = 0) |
||
131 | } |
||
132 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.