Session middleware #165
Annotations
10 errors and 1 warning
test:
src/Database/Models/DatabaseModel.php#L28
* [Forbidden public property] Do not use public properties. Use method access instead.
|
test:
src/Database/Models/DatabaseModel.php#L1
* [Ternary to null coalescing] @@ -143,3 +143,3 @@
- $value = isset($this->{$propertyName}) ? $this->{$propertyName} : null;
+ $value = $this->{$propertyName} ?? null;
* [Having `classes` with more than 5 cyclomatic complexity is prohibited - Consider refactoring] 14 cyclomatic complexity
* [No extra blank lines] @@ -240,3 +240,2 @@
-
return $data;
* [Ordered class elements] @@ -23,2 +23,4 @@
+ public stdClass $pivot;
+
protected string $table;
@@ -27,4 +29,2 @@
- public stdClass $pivot;
-
/**
@@ -46,4 +46,2 @@
- abstract protected static function table(): string;
-
public static function query(): DatabaseQueryBuilder
@@ -198,2 +196,4 @@
}
+
+ abstract protected static function table(): string;
|
test:
src/Database/Models/DatabaseModel.php#L218
* [Disallow mixed type hint] Usage of "mixed" type hint is disallowed.
|
test:
src/Database/Models/DatabaseModel.php#L58
* [Parameter type hint] @param annotation of method \Phenix\Database\Models\DatabaseModel::create() does not specify type hint for items of its traversable parameter $attributes.
|
test:
src/Database/Models/DatabaseModel.php#L83
* [Parameter type hint] Method \Phenix\Database\Models\DatabaseModel::find() has useless @param annotation for parameter $id.
|
test:
src/Database/Models/DatabaseModel.php#L84
* [Parameter type hint] @param annotation of method \Phenix\Database\Models\DatabaseModel::find() does not specify type hint for items of its traversable parameter $columns.
|
test:
src/Database/Models/DatabaseModel.php#L137
* [Return type hint] Method \Phenix\Database\Models\DatabaseModel::toArray() does not have @return annotation for its traversable return value.
|
test:
src/Database/Models/DatabaseModel.php#L240
* [Superfluous whitespace] Functions must not contain multiple empty lines in a row; found 2 empty lines
|
test:
src/Database/Models/DatabaseModel.php#L59
* [Doc comment spacing] Expected 1 line between different annotations types, found 0.
|
test:
src/Database/Models/DatabaseModel.php#L60
* [Doc comment spacing] Expected 1 line between different annotations types, found 0.
|
SonarScanner
This action is deprecated and will be removed in a future release. Please use the sonarqube-scan-action action instead. The sonarqube-scan-action is a drop-in replacement for this action.
|