1 | <?php |
||
33 | class NotebookService { |
||
34 | |||
35 | private $groupMapper; |
||
36 | private $utils; |
||
37 | private $sharing; |
||
38 | |||
39 | public function __construct(NotebookMapper $groupMapper, Utils $utils, NextNoteShareBackend $shareBackend) { |
||
44 | |||
45 | /** |
||
46 | * Find a group by id |
||
47 | * |
||
48 | * @param $notebook_id |
||
49 | * @param null $user_id |
||
50 | * @param bool $deleted |
||
51 | * @return Notebook[]|Notebook |
||
52 | */ |
||
53 | public function find($notebook_id=null, $user_id = null, $deleted = false) { |
||
56 | /** |
||
57 | * Find a group by name |
||
58 | * |
||
59 | * @param $group_name string |
||
60 | * @param null $user_id |
||
61 | * @param bool $deleted |
||
62 | * @return Notebook[]|Notebook |
||
63 | */ |
||
64 | public function findByName($group_name=null, $user_id = null, $deleted = false) { |
||
67 | |||
68 | /** |
||
69 | * Creates a group |
||
70 | * |
||
71 | * @param array|Notebook $group |
||
72 | * @param $userId |
||
73 | * @return Notebook|Entity |
||
74 | * @throws \Exception |
||
75 | */ |
||
76 | public function create($group, $userId) { |
||
91 | |||
92 | /** |
||
93 | * Update a group |
||
94 | * |
||
95 | * @param $group array|Notebook |
||
96 | * @return Notebook|Entity|bool |
||
97 | * @throws \Exception |
||
98 | * @internal param $userId |
||
99 | * @internal param $vault |
||
100 | */ |
||
101 | public function update($group) { |
||
117 | |||
118 | /** |
||
119 | * Delete a group |
||
120 | * |
||
121 | * @param $group_id |
||
122 | * @param string $user_id |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function delete($group_id, $user_id = null) { |
||
138 | |||
139 | private function checkPermissions() { |
||
142 | } |
||
143 |
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.