public/plugin/ai_helper/AiHelperPlugin.php
Missing class import via use statement (line '192', column '34'). Open
Open
->setRequestedAt(new DateTime())
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '76', column '19'). Open
Open
$ai = new OpenAi($apiKey, $organizationId);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
true)
- Exclude checks
Method name "AiHelperPlugin::get_name" is not in camel caps format Open
Open
public function get_name(): string
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
true)
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
true)
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
true)
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
true)
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
true)
- Exclude checks
The method get_name is not named in camelCase. Open
Open
public function get_name(): string
{
return 'ai_helper';
}
- 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() {
}
}