Method wp_bootstrap_gallery
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
Function wp_bootstrap_gallery
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The function wp_bootstrap_gallery() has 155 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- Exclude checks
The function wp_bootstrap_gallery() has an NPath complexity of 8064. The configured NPath complexity threshold is 200. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function wp_bootstrap_gallery() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$order' which will lead to PHP notices. Open
'order' => $order,
- Read upRead up
- Exclude checks
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 using undefined variables such as '$order' which will lead to PHP notices. Open
'order' => $order,
- Read upRead up
- Exclude checks
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 using undefined variables such as '$order' which will lead to PHP notices. Open
if ( 'RAND' === $order ) {
- Read upRead up
- Exclude checks
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 using undefined variables such as '$order' which will lead to PHP notices. Open
'order' => $order,
- Read upRead up
- Exclude checks
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 using undefined variables such as '$size' which will lead to PHP notices. Open
$output .= wp_get_attachment_link( $att_id, $size, true ) . "\n";
- Read upRead up
- Exclude checks
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 using undefined variables such as '$size' which will lead to PHP notices. Open
$size_class = sanitize_html_class( $size );
- Read upRead up
- Exclude checks
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
The method wp_bootstrap_gallery uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$attachments = get_children( array(
'post_parent' => $id,
'post_status' => 'inherit',
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method wp_bootstrap_gallery uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$attachment_count++;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused parameters such as '$content'. Open
function wp_bootstrap_gallery( $content, $attr ) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused local variables such as '$attachment_image'. Open
$attachment_image = wp_get_attachment_image( $id, 'full' );
- 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
Avoid unused local variables such as '$size_class'. Open
$size_class = sanitize_html_class( $size );
- 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
Avoid unused local variables such as '$float'. Open
$float = (is_rtl()) ? 'right' : 'left';
- 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
Avoid variables with short names like $id. Configured minimum length is 3. Open
$id = intval( $id );
- Read upRead up
- Exclude checks
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
Array double arrow not aligned correctly; expected 7 space(s) between "'size'" and double arrow, but found 10. Open
'size' => 'thumbnail',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_parent' => $id,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$float = (is_rtl()) ? 'right' : 'left';
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$selector = "gallery-{$instance}";
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$size_class = sanitize_html_class( $size );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'include' => '',
- Exclude checks
Array double arrow not aligned correctly; expected 6 space(s) between "'post_type'" and double arrow, but found 9. Open
'post_type' => 'attachment',
- Exclude checks
Array double arrow not aligned correctly; expected 1 space(s) between "'post_mime_type'" and double arrow, but found 4. Open
'post_mime_type' => 'image',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'order' => $order,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$output = "<div class='row' id='$selector'>";
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
case 3:
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 8,4,4 );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 6,6,4,4,4 );
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'post_status'" and double arrow, but found 7. Open
'post_status' => 'inherit',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$captiontag = tag_escape( $captiontag );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'orderby' => 'menu_order ID',
- Exclude checks
Expected 1 space between comma and "6"; 0 found Open
$span_array = array( 6,6 );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_status' => 'inherit',
- Exclude checks
Array double arrow not aligned correctly; expected 6 space(s) between "'order'" and double arrow, but found 9. Open
'order' => 'ASC',
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 6,6,4,4,4 );
- Exclude checks
Array double arrow not aligned correctly; expected 6 space(s) between "'post_type'" and double arrow, but found 9. Open
'post_type' => 'attachment',
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'icontag'" and double arrow, but found 7. Open
'icontag' => 'div',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'captiontag' => 'figcaption',
- Exclude checks
Array double arrow not aligned correctly; expected 8 space(s) between "'orderby'" and double arrow, but found 11. Open
'orderby' => $orderby,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_status' => 'inherit',
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
/* Two half width images. */
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'order' => $order,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
/* One full width image with three 1/3 width images underneath. */
- Exclude checks
Array double arrow not aligned correctly; expected 8 space(s) between "'orderby'" and double arrow, but found 11. Open
'orderby' => $orderby,
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'post_status'" and double arrow, but found 7. Open
'post_status' => 'inherit',
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 12,4,4,4 );
- Exclude checks
Array double arrow not aligned correctly; expected 1 space(s) between "'post_mime_type'" and double arrow, but found 4. Open
'post_mime_type' => 'image',
- Exclude checks
Expected 1 space between comma and "6"; 0 found Open
$span_array = array( 12,6,6,4 );
- Exclude checks
Expected 1 space between comma and "6"; 0 found Open
$span_array = array( 6,6,4,4,4 );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 6,6,4,4,4 );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
/* One full width image with two 1/2 width images underneath. All remaining images 1/3 width underneath. */
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 12,6,6,4 );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
extract() usage is highly discouraged, due to the complexity and unintended issues it might cause. Open
extract( shortcode_atts( array(
- Exclude checks
Array double arrow not aligned correctly; expected 1 space(s) between "'captiontag'" and double arrow, but found 4. Open
'captiontag' => 'figcaption',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_type' => 'attachment',
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'post_parent'" and double arrow, but found 7. Open
'post_parent' => $id,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_type' => 'attachment',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$columns = intval( min( array( 8, $columns ) ) );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 6,6 );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 12,4,4,4 );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'orderby' => $orderby,
- Exclude checks
Array double arrow not aligned correctly; expected 8 space(s) between "'orderby'" and double arrow, but found 11. Open
'orderby' => $orderby,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 12,4,4,4 );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
case 5:
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'orderby'" and double arrow, but found 7. Open
'orderby' => 'menu_order ID',
- Exclude checks
Array double arrow not aligned correctly; expected 9 space(s) between "'id'" and double arrow, but found 12. Open
'id' => $post->ID,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_status' => 'inherit',
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 12,4,4,4 );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 6,6,4,4,4 );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'itemtag' => 'figure',
- Exclude checks
Array double arrow not aligned correctly; expected 8 space(s) between "'include'" and double arrow, but found 11. Open
'include' => $include,
- Exclude checks
Array double arrow not aligned correctly; expected 6 space(s) between "'post_type'" and double arrow, but found 9. Open
'post_type' => 'attachment',
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
/* One 2/3 width image with two 1/3 width images to the right, and three 1/3 width images underneath. */
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'id' => $post->ID,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
$itemtag = tag_escape( $itemtag );
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'columns'" and double arrow, but found 7. Open
'columns' => 3,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'include' => $include,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
case 2:
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_mime_type' => 'image',
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4 );
- Exclude checks
Array double arrow not aligned correctly; expected 8 space(s) between "'exclude'" and double arrow, but found 11. Open
'exclude' => $exclude,
- Exclude checks
Expected 1 space between comma and "6"; 0 found Open
$span_array = array( 12,6,6,4 );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
/* One 3/4 width image with two 1/4 width images to the right. */
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space Open
$attachment_link = wp_get_attachment_link( $id, 'full', ! ( isset( $attr['link'] ) and 'file' === $attr['link'] ) );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4 );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'exclude' => '',
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'post_status'" and double arrow, but found 7. Open
'post_status' => 'inherit',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'exclude' => $exclude,
- Exclude checks
Array double arrow not aligned correctly; expected 1 space(s) between "'post_mime_type'" and double arrow, but found 4. Open
'post_mime_type' => 'image',
- Exclude checks
Array double arrow not aligned correctly; expected 10 space(s) between "'order'" and double arrow, but found 13. Open
'order' => $order,
- Exclude checks
Expected 1 space after open parenthesis; 0 found Open
$float = (is_rtl()) ? 'right' : 'left';
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4,4,4,4 );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4,4,4,4 );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'order' => 'ASC',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'orderby' => $orderby,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 8,4,4,4,4,4 );
- Exclude checks
Please spell "WordPress" correctly. Found 1 misspelling(s): Wordpress Open
* Description: A custom Wordpress gallery for dynamic thumbnail layout using Twitter Bootstrap 2 thumbnail layouts.
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'include'" and double arrow, but found 7. Open
'include' => '',
- Exclude checks
Array double arrow not aligned correctly; expected 10 space(s) between "'order'" and double arrow, but found 13. Open
'order' => $order,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'orderby' => $orderby,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_mime_type' => 'image',
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'post_parent'" and double arrow, but found 7. Open
'post_parent' => $id,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_mime_type' => 'image',
- Exclude checks
Expected 1 space before close parenthesis; 0 found Open
$float = (is_rtl()) ? 'right' : 'left';
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
case 4:
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'icontag' => 'div',
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
/* Two half width images with fout 1/4 width images underneath. */
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'exclude'" and double arrow, but found 7. Open
'exclude' => '',
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4,4,4,4 );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4,4,4,4 );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_type' => 'attachment',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'order' => $order,
- Exclude checks
Array double arrow not aligned correctly; expected 10 space(s) between "'order'" and double arrow, but found 13. Open
'order' => $order,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
$span_array = array( 12 );
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
case 6:
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 8,4,4,4,4,4 );
- Exclude checks
Expected 1 space between comma and "4"; 0 found Open
$span_array = array( 12,6,6,4 );
- Exclude checks
Array double arrow not aligned correctly; expected 4 space(s) between "'itemtag'" and double arrow, but found 7. Open
'itemtag' => 'figure',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'columns' => 3,
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'size' => 'thumbnail',
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
'post_parent' => $id,
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
break;
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
default:
- Exclude checks
Logical operator "and" is prohibited; use "&&" instead Open
$attachment_link = wp_get_attachment_link( $id, 'full', ! ( isset( $attr['link'] ) and 'file' === $attr['link'] ) );
- Exclude checks
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $_attachments is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_count is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $_attachments is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_count is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_link is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $_attachments is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $att_id is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $size_class is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_count is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_count is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_count is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_image is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $attachment_link is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $att_id is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}
Source
The variable $span_array is not named in camelCase. Open
function wp_bootstrap_gallery( $content, $attr ) {
global $instance, $post;
$instance++;
if ( isset( $attr['orderby'] ) ) {
- 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();
}
}