Missing class import via use statement (line '112', column '63'). Open
$this->metadata = new scormMetadata('manifest', $child);
- 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 '106', column '54'). Open
$oItem = new scormItem('manifest', $child);
- 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
Avoid unused local variables such as '$dummy'. Open
foreach ($this->sub_items as $id => $dummy) {
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The property $mastery_score is not named in camelCase. Open
class scormItem extends learnpathItem
{
public $identifier = '';
public $identifierref = '';
public $isvisible = '';
- 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
The parameter $rel_order is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- 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 $abs_order is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- 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 $from_outside is not named in camelCase. Open
public function save($from_outside = true, $prereqs_complete = false)
{
parent::save($from_outside, $prereqs_complete);
// Under certain conditions, the scorm_contact should not be set, because no scorm signal was sent.
$this->scorm_contact = true;
- 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 $prereqs_complete is not named in camelCase. Open
public function save($from_outside = true, $prereqs_complete = false)
{
parent::save($from_outside, $prereqs_complete);
// Under certain conditions, the scorm_contact should not be set, because no scorm signal was sent.
$this->scorm_contact = true;
- 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 property $scorm_contact is not named in camelCase. Open
class scormItem extends learnpathItem
{
public $identifier = '';
public $identifierref = '';
public $isvisible = '';
- 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
The property $sub_items is not named in camelCase. Open
class scormItem extends learnpathItem
{
public $identifier = '';
public $identifierref = '';
public $isvisible = '';
- 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
The class scormItem is not named in CamelCase. Open
class scormItem extends learnpathItem
{
public $identifier = '';
public $identifierref = '';
public $isvisible = '';
- 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
The property $max_time_allowed is not named in camelCase. Open
class scormItem extends learnpathItem
{
public $identifier = '';
public $identifierref = '';
public $isvisible = '';
- 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
Spaces must be used for alignment; tabs are not allowed Open
* @author Yannick Warnier <ywarnier@beeznest.org>
- Exclude checks
Member variable "scorm_contact" is not in valid camel caps format Open
public $scorm_contact;
- Exclude checks
Variable "max_score" is not in valid camel caps format Open
$this->max_score = $child->firstChild->nodeValue;
- Exclude checks
Variable "prereq_string" is not in valid camel caps format Open
$this->prereq_string = $child->firstChild->nodeValue;
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
$tmp_children = $child->childNodes;
- Exclude checks
Variable "sub_items" is not in valid camel caps format Open
$oSubitem = &$this->sub_items[$id];
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
$tmp_children = $child->childNodes;
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Missing parameter name Open
* @param int Optional relative order of the item at this level
- Exclude checks
Variable "prereqs_complete" is not in valid camel caps format Open
parent::save($from_outside, $prereqs_complete);
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
$tmp_children = $child->childNodes;
- Exclude checks
Variable "max_time_allowed" is not in valid camel caps format Open
'maxtimeallowed' => $this->max_time_allowed,
- Exclude checks
Variable "from_outside" is not in valid camel caps format Open
public function save($from_outside = true, $prereqs_complete = false)
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
$tmp_children = $child->childNodes;
- Exclude checks
Variable "prereq_string" is not in valid camel caps format Open
'prerequisites' => !empty($this->prereq_string) ? $this->prereq_string : '',
- Exclude checks
Variable "sub_items" is not in valid camel caps format Open
foreach ($this->sub_items as $id => $dummy) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @author Yannick Warnier <ywarnier@beeznest.org>
- Exclude checks
Variable "scorm_contact" is not in valid camel caps format Open
$this->scorm_contact = false;
- Exclude checks
Missing parameter name Open
* @param array Reference to the array to complete with the current item
- Exclude checks
Variable "max_score" is not in valid camel caps format Open
'max_score' => $this->max_score,
- Exclude checks
Superfluous parameter comment Open
* @param int $course_id
- Exclude checks
Variable "max_time_allowed" is not in valid camel caps format Open
$this->max_time_allowed = $child->firstChild->nodeValue;
- Exclude checks
Method name "scormItem::get_flat_list" is not in camel caps format Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
- Exclude checks
Variable "rel_order" is not in valid camel caps format Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
- Exclude checks
Variable "rel_order" is not in valid camel caps format Open
'rel_order' => $rel_order,
- Exclude checks
Missing parameter name Open
* @param int Optional absolute order (pointer) of the item in this learning path
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Variable "mastery_score" is not in valid camel caps format Open
'masteryscore' => $this->mastery_score,
- Exclude checks
Missing parameter name Open
* @param bool Save from URL params (1) or from object attributes (0)
- Exclude checks
Member variable "sub_items" is not in valid camel caps format Open
public $sub_items = [];
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
$tmp_children = $child->childNodes;
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Variable "prereqs_complete" is not in valid camel caps format Open
public function save($from_outside = true, $prereqs_complete = false)
- Exclude checks
Variable "abs_order" is not in valid camel caps format Open
$oSubitem->get_flat_list($list, $abs_order, $i, $level + 1);
- Exclude checks
Variable "from_outside" is not in valid camel caps format Open
parent::save($from_outside, $prereqs_complete);
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
if (1 == $tmp_children->length && '' != $child->firstChild->nodeValue) {
- Exclude checks
Variable "mastery_score" is not in valid camel caps format Open
$this->mastery_score = $child->firstChild->nodeValue;
- Exclude checks
Variable "abs_order" is not in valid camel caps format Open
$abs_order++;
- Exclude checks
Variable "tmp_children" is not in valid camel caps format Open
$tmp_children = $child->childNodes;
- Exclude checks
Variable "abs_order" is not in valid camel caps format Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
- Exclude checks
Member variable "max_time_allowed" is not in valid camel caps format Open
public $max_time_allowed = '00:00:00';
- Exclude checks
Member variable "mastery_score" is not in valid camel caps format Open
public $mastery_score = '';
- Exclude checks
Missing parameter name Open
* @param int Optional level. If not given, assumes it's level 0
- Exclude checks
Variable "abs_order" is not in valid camel caps format Open
'abs_order' => $abs_order,
- Exclude checks
Variable "scorm_contact" is not in valid camel caps format Open
$this->scorm_contact = true;
- Exclude checks
Variable "sub_items" is not in valid camel caps format Open
$this->sub_items[$oItem->identifier] = $oItem;
- Exclude checks
Variable "prereq_string" is not in valid camel caps format Open
'prerequisites' => !empty($this->prereq_string) ? $this->prereq_string : '',
- Exclude checks
Class name "scormItem" is not in camel caps format Open
class scormItem extends learnpathItem
- Exclude checks
The variable $abs_order is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $abs_order is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $abs_order is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_outside is not named in camelCase. Open
public function save($from_outside = true, $prereqs_complete = false)
{
parent::save($from_outside, $prereqs_complete);
// Under certain conditions, the scorm_contact should not be set, because no scorm signal was sent.
$this->scorm_contact = true;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_children is not named in camelCase. Open
public function __construct($type = 'manifest', &$element = null)
{
if (isset($element)) {
// Parsing using PHP5 DOMXML methods.
switch ($type) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $rel_order is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $prereqs_complete is not named in camelCase. Open
public function save($from_outside = true, $prereqs_complete = false)
{
parent::save($from_outside, $prereqs_complete);
// Under certain conditions, the scorm_contact should not be set, because no scorm signal was sent.
$this->scorm_contact = true;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method get_flat_list is not named in camelCase. Open
public function get_flat_list(&$list, &$abs_order, $rel_order = 1, $level = 0)
{
$list[] = [
'abs_order' => $abs_order,
'datafromlms' => $this->datafromlms,
- 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() {
}
}