public/plugin/customcertificate/src/CustomCertificatePlugin.php
Missing class import via use statement (line '263', column '44'). Open
Open
$extraFieldValue = new ExtraFieldValue('user_certificate');
- 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
The property $course_settings is not named in camelCase. Open
Open
class CustomCertificatePlugin extends Plugin
{
const TABLE_CUSTOMCERTIFICATE = 'plugin_customcertificate';
public $isCoursePlugin = true;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Variable "certificate_data" is not in valid camel caps format Open
Open
if ($certificate->user_id == api_get_user_id() && !empty($certificate->certificate_data)) {
- Exclude checks
Member variable "course_settings" is not in valid camel caps format Open
Open
public $course_settings = [
- Exclude checks
Variable "certificate_data" is not in valid camel caps format Open
Open
'item_id' => $certificate->certificate_data['id'],
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
Open
if ($certificate->user_id == api_get_user_id() && !empty($certificate->certificate_data)) {
- Exclude checks
Variable "certificate_data" is not in valid camel caps format Open
Open
$certificateId = $certificate->certificate_data['id'];
- Exclude checks