mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

The parameter $slide_id is not named in camelCase.
Open

    private function delete_slide($slide_id)
    {
        // Get the existing terms and only keep the ones we don't want removed
        $new_terms     = [];
        $current_terms = wp_get_object_terms($slide_id, 'ml-slider', ['fields' => 'ids']);

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 $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

Avoid variables with short names like $bv. Configured minimum length is 3.
Open

        $bv   = new BlockView();

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $form_state is not named in camelCase.
Open

function magnific_popup_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  
  // Gallery Mode is TRUE when this field supports multiple items.

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

class Parsedown
{
    #
    # Multiton (http://en.wikipedia.org/wiki/Multiton_pattern)
    #

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

class Parsedown
{
    #
    # Multiton (http://en.wikipedia.org/wiki/Multiton_pattern)
    #

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

    public function update($new_instance, $old_instance)
    {
        $instance              = [];
        $instance['slider_id'] = strip_tags($new_instance['slider_id']);
        $instance['title']     = strip_tags($new_instance['title']);

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

    public function slide_is_unassigned_or_image_slide($slider_id, $slide_id)
    {
        $type = get_post_meta($slide_id, 'ml-slider_type', true);

        return !mb_strlen($type) || 'image' === $type;

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

    public function add_or_update_or_delete_meta($post_id, $name, $value)
    {
        $key = 'ml-slider_' . $name;

        if ('false' === $value || '' === $value || !$value) {

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

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function __construct($id, $shortcode_settings)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $md. Configured minimum length is 3.
Open

    public static function makeHeadlinePretty($md)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $v1. Configured minimum length is 3.
Open

function compareVersion($v1, $v2)
Severity: Minor
Found in admin/moduleUpdateFunction.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $slider_id is not named in camelCase.
Open

    public function slide_is_unassigned_or_image_slide($slider_id, $slide_id)
    {
        $type = get_post_meta($slide_id, 'ml-slider_type', true);

        return !mb_strlen($type) || 'image' === $type;

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

Avoid variables with short names like $md. Configured minimum length is 3.
Open

            $md = file_get_contents($file);

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $db. Configured minimum length is 3.
Open

        $db = \XoopsDatabaseFactory::getDatabaseConnection();
Severity: Minor
Found in admin/blocksadmin.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $dest_size is not named in camelCase.
Open

    private function resize_image($orig_size, $dest_size, $dest_file_name)
    {
        // load image
        $image = wp_get_image_editor($this->path);

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

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function set_slider($id)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $new_settings is not named in camelCase.
Open

    public function update_settings($new_settings)
    {
        $old_settings = $this->get_settings();

        // convert submitted checkbox values from 'on' or 'off' to boolean values

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

class MetaFlexSlider extends MetaSlider
{
    protected $js_function          = 'flexslider';
    protected $js_path              = 'sliders/flexslider/jquery.flexslider-min.js';
    protected $css_path             = 'sliders/flexslider/flexslider.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

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function __construct($id, $shortcode_settings)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Severity
Category
Status
Source
Language