src/Repository/Model/Clip.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 ?int $artist;
- Exclude checks
The parameter $object_type is not named in camelCase. Open
Open
public static function migrate($object_type, $old_object_id, $new_object_id)
{
if ($object_type == 'artist') {
$sql = "UPDATE `clip` SET `artist` = ? WHERE `artist` = ?";
$params = array($new_object_id, $old_object_id);
- 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 parameter $old_object_id is not named in camelCase. Open
Open
public static function migrate($object_type, $old_object_id, $new_object_id)
{
if ($object_type == 'artist') {
$sql = "UPDATE `clip` SET `artist` = ? WHERE `artist` = ?";
$params = array($new_object_id, $old_object_id);
- 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 parameter $clip_id is not named in camelCase. Open
Open
public function __construct($clip_id = 0)
{
if (!$clip_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 parameter $new_object_id is not named in camelCase. Open
Open
public static function migrate($object_type, $old_object_id, $new_object_id)
{
if ($object_type == 'artist') {
$sql = "UPDATE `clip` SET `artist` = ? WHERE `artist` = ?";
$params = array($new_object_id, $old_object_id);
- 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
Method name "_get_artist_id" should not be prefixed with an underscore to indicate visibility Open
Open
private static function _get_artist_id($data): ?int
- Exclude checks