src/Repository/Model/Personal_Video.php
Avoid unused parameters such as '$gtypes'. Open
Open
public static function insert(array $data, ?array $gtypes = array(), ?array $options = array()): int
- 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 '$options'. Open
Open
public static function insert(array $data, ?array $gtypes = array(), ?array $options = array()): int
- 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
syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST)
Open
Open
public ?string $location;
- Exclude checks
The parameter $object_id is not named in camelCase. Open
Open
public function __construct($object_id = 0)
{
if (!$object_id) {
return;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class Personal_Video is not named in CamelCase. Open
Open
class Personal_Video extends Video
{
protected const DB_TABLENAME = 'personal_video';
public ?string $location;
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Class name "Personal_Video" is not in camel caps format Open
Open
class Personal_Video extends Video
- Exclude checks