assets/js/magnific_popup/drupal/magnific_popup/includes/magnific_popup.image_styles.inc
Avoid unused local variables such as '$module_path'. Open
Open
$module_path = drupal_get_path('module', 'magnific_popup');
- 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
Line exceeds 120 characters; contains 214 characters Open
Open
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
];
- Exclude checks
Opening brace should be on a new line Open
Open
function magnific_popup_image_default_styles() {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
$styles = [];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
return $styles;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
$module_path = drupal_get_path('module', 'magnific_popup');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
$styles['magnific_popup_thumbnail'] = [
- Exclude checks
The variable $module_path is not named in camelCase. Open
Open
function magnific_popup_image_default_styles() {
$styles = [];
$module_path = drupal_get_path('module', 'magnific_popup');
// Exported image style: thumbnail.
$styles['magnific_popup_thumbnail'] = [
- 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();
}
}