mambax7/extgallery

View on GitHub
assets/js/ml-slider/inc/slider/metaslider.coin.class.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$retVal' which will lead to PHP notices.
Open

        $retVal;

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid unused local variables such as '$retVal'.
Open

        $retVal;

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

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

class MetaCoinSlider extends MetaSlider

The property $js_function is not named in camelCase.
Open

class MetaCoinSlider extends MetaSlider
{
    protected $js_function = 'coinslider';
    protected $js_path     = 'sliders/coinslider/coin-slider.min.js';
    protected $css_path    = 'sliders/coinslider/coin-slider-styles.css';

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 $css_path is not named in camelCase.
Open

class MetaCoinSlider extends MetaSlider
{
    protected $js_function = 'coinslider';
    protected $js_path     = 'sliders/coinslider/coin-slider.min.js';
    protected $css_path    = 'sliders/coinslider/coin-slider-styles.css';

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 $js_path is not named in camelCase.
Open

class MetaCoinSlider extends MetaSlider
{
    protected $js_function = 'coinslider';
    protected $js_path     = 'sliders/coinslider/coin-slider.min.js';
    protected $css_path    = 'sliders/coinslider/coin-slider-styles.css';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Method name "MetaCoinSlider::get_html" is not in camel caps format
Open

    protected function get_html()

Method name "MetaCoinSlider::get_param" is not in camel caps format
Open

    protected function get_param($param)

The variable $return_value is not named in camelCase.
Open

    protected function get_html()
    {
        $return_value = "<div id='" . $this->get_identifier() . "' class='coin-slider'>";

        foreach ($this->slides as $slide) {

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 $return_value is not named in camelCase.
Open

    protected function get_html()
    {
        $return_value = "<div id='" . $this->get_identifier() . "' class='coin-slider'>";

        foreach ($this->slides as $slide) {

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 $return_value is not named in camelCase.
Open

    protected function get_html()
    {
        $return_value = "<div id='" . $this->get_identifier() . "' class='coin-slider'>";

        foreach ($this->slides as $slide) {

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 $return_value is not named in camelCase.
Open

    protected function get_html()
    {
        $return_value = "<div id='" . $this->get_identifier() . "' class='coin-slider'>";

        foreach ($this->slides as $slide) {

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_param is not named in camelCase.
Open

    protected function get_param($param)
    {
        $params = [
            'effect'     => 'animation',
            'width'      => 'width',

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_html is not named in camelCase.
Open

    protected function get_html()
    {
        $return_value = "<div id='" . $this->get_identifier() . "' class='coin-slider'>";

        foreach ($this->slides as $slide) {

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status