YetiForceCompany/YetiForceCRM

View on GitHub
modules/ModTracker/models/Field.php

Summary

Maintainability
A
0 mins
Test Coverage
F
44%

Reference to undeclared property \ModTracker_Field_Model->parent
Open

        return $this->parent;
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Saw possibly unextractable annotation for a fragment of comment '* @param Vtiger_Field_Model': after Vtiger_Field_Model, did not see an element name (will guess based on comment order)
Open

     * @param Vtiger_Field_Model
Severity: Info
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->parent
Open

        return $this->fieldInstance->getUITypeModel()->getHistoryDisplayValue($this->get('postvalue'), $this->parent);
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->fieldInstance
Open

        return $this->fieldInstance->getUITypeModel()->getHistoryDisplayValue($this->get('prevalue'), $this->parent);
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Returning type false but getModuleName() is declared to return string
Open

        return $this->getParent()->getModule()->getName();
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->parent (Did you mean $parent)
Open

        $this->parent = $parent;
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->parent
Open

        return $this->fieldInstance->getUITypeModel()->getHistoryDisplayValue($this->get('prevalue'), $this->parent);
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->fieldInstance
Open

        return $this->fieldInstance;
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Saw possibly unextractable annotation for a fragment of comment '* @param Vtiger_Record_Model': after Vtiger_Record_Model, did not see an element name (will guess based on comment order)
Open

     * @param Vtiger_Record_Model
Severity: Info
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->fieldInstance
Open

        return $this->fieldInstance->getUITypeModel()->getHistoryDisplayValue($this->get('postvalue'), $this->parent);
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Reference to undeclared property \ModTracker_Field_Model->fieldInstance
Open

        $this->fieldInstance = $fieldModel;
Severity: Minor
Found in modules/ModTracker/models/Field.php by phan

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class ModTracker_Field_Model extends Vtiger_Record_Model

The class ModTracker_Field_Model is not named in CamelCase.
Open

class ModTracker_Field_Model extends Vtiger_Record_Model
{
    /**
     * Function to set parent to this model.
     *
Severity: Minor
Found in modules/ModTracker/models/Field.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to set parent to this model.

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed $fieldModel

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->fieldInstance->getUITypeModel()->getHistoryDisplayValue($this->get('postvalue'), $this->parent);

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to get parent.

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return Vtiger_Field_Model

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function returns the module name of the field.

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getModuleName(): string

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->parent = $parent;

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getName(): string

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed $parent

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->fieldInstance;

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getNewValue()

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->fieldInstance = $fieldModel;

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->parent;

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getFieldInstance()

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to get name.

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return Vtiger_Record_Model

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to set Field instance.

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to get Field instance.

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to get Old value of this Field.

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param Vtiger_Field_Model

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to get new(updated) value of this Field.

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->getParent()->getModule()->getName();

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getOldValue()

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

    public function setParent($parent)

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

    public function setFieldInstance($fieldModel)

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->getFieldInstance()->get('label');

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param Vtiger_Record_Model

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getParent()

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this;

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this;

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->fieldInstance->getUITypeModel()->getHistoryDisplayValue($this->get('prevalue'), $this->parent);

Class name "ModTracker_Field_Model" is not in camel caps format
Open

class ModTracker_Field_Model extends Vtiger_Record_Model

There are no issues that match your filters.

Category
Status