This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
25
{
26
\DB::transaction(function () use ($groupId, $permissionIds) {
The variable $group_id does not exist. Did you forget to declare it?
This check marks access to variables or properties that have not been declared yet. While PHP
has no explicit notion of declaring a variable, accessing it before a value is assigned
to it is most likely a bug.
Loading history...
33
}
34
35
/**
36
* Return the users in the given group in pages.
37
*
38
* @param integer $groupId
39
* @param integer $perPage
40
* @param array $relations
41
* @param string $sortBy
42
* @param boolean $desc
43
* @return collection
44
*/
45
public function users($groupId, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 1)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.