src/Acl/Policies/SquadPolicy.php
Avoid unused parameters such as '$squad'. Open
Open
public function manage_roles(User $user, Squad $squad)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$ability'. Open
Open
public function before(User $user, string $ability)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$squad'. Open
Open
public function delete(User $user, Squad $squad)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$squad'. Open
Open
public function manage_moderators(User $user, Squad $squad)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The method manage_roles is not named in camelCase. Open
Open
public function manage_roles(User $user, Squad $squad)
{
return $user->isAdmin();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method manage_moderators is not named in camelCase. Open
Open
public function manage_moderators(User $user, Squad $squad)
{
return $user->isAdmin();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method manage_candidates is not named in camelCase. Open
Open
public function manage_candidates(User $user, Squad $squad)
{
return $squad->type == 'manual' && $squad->moderators->where('id', $user->id)->isNotEmpty();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method show_members is not named in camelCase. Open
Open
public function show_members(User $user, Squad $squad)
{
return ($squad->members->where('id', $user->id)->isNotEmpty() &&
! $squad->is_classified) ||
$squad->moderators->where('id', $user->id)->isNotEmpty();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method manage_members is not named in camelCase. Open
Open
public function manage_members(User $user, Squad $squad)
{
return $squad->moderators->where('id', $user->id)->isNotEmpty();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}