mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

The parameter $orig_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

The parameter $view_mode 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 $inline_tags 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 $container_width is not named in camelCase.
Open

class MetaSliderImageHelper
{
    private $smart_crop = 'false';
    private $container_width; // slideshow width
    private $container_height; // slideshow height

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

    public function save_slide($slide_id, $slider_id, $fields)
    {
        $this->set_slider($slider_id);
        $this->set_slide($slide_id);
        $this->save($fields);

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

function magnific_popup_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  if (!_magnific_popup_check_status()) {
    return FALSE;
  }
  // Add Magnific Popup library to page.

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

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

        $dh = opendir($dir);
Severity: Minor
Found in admin/main.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 class MetaSlider_Widget is not named in CamelCase.
Open

class MetaSlider_Widget extends WP_Widget
{
    /**
     * Register widget with WordPress.
     */

CamelCaseClassName

Since: 0.2

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

Example

class class_name {
}

Source

The property $em_regex 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 class rex_magnific_popup_utils is not named in CamelCase.
Open

class rex_magnific_popup_utils
{
    /**
     * @param $params
     * @return mixed

CamelCaseClassName

Since: 0.2

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

Example

class class_name {
}

Source

The parameter $slide_id is not named in camelCase.
Open

    public function slide_exists_in_slideshow($slider_id, $slide_id)
    {
        return has_term((string)$slider_id, 'ml-slider', $slide_id);
    }

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 $id         = 0; // 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 $use_image_editor is not named in camelCase.
Open

    public function __construct($slide_id, $width, $height, $smart_crop, $use_image_editor = true)
    {
        $upload_dir = wp_upload_dir();

        $this->id               = $slide_id;

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

    private function get_crop_dimensions($image_width, $image_height)
    {
        if ('false' === $this->smart_crop) {
            return ['width' => $this->container_width, 'height' => $this->container_height];
        }

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 $fs. Configured minimum length is 3.
Open

        $fs       = FileSet::getByID($this->fsID);

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

class MetaSliderImageHelper
{
    private $smart_crop = 'false';
    private $container_width; // slideshow width
    private $container_height; // slideshow height

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

    public function __construct($slide_id, $width, $height, $smart_crop, $use_image_editor = true)
    {
        $upload_dir = wp_upload_dir();

        $this->id               = $slide_id;

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

    public function get_slide($slide_id, $slider_id)
    {
        $this->set_slider($slider_id);
        $this->set_slide($slide_id);

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

Severity
Category
Status
Source
Language