Passed
Push — master ( de7162...f256de )
by Brian
739:27 queued 623:54
created
ayecode/wp-ayecode-ui/includes/components/class-aui-component-input.php 1 patch
Braces   +12 added lines, -13 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			if($type=='file' ){
59 59
 				$args['label_after'] = true; // if type file we need the label after
60 60
 				$args['class'] .= ' custom-file-input ';
61
-			}elseif($type=='checkbox'){
61
+			} elseif($type=='checkbox'){
62 62
 				$args['label_after'] = true; // if type file we need the label after
63 63
 				$args['class'] .= ' custom-control-input ';
64 64
 			}
@@ -141,8 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 			// label after
143 143
 			if(!empty($args['label']) && $args['label_after']){
144
-				if($type == 'file'){$label_args['class'] .= 'custom-file-label';}
145
-				elseif($type == 'checkbox'){$label_args['class'] .= 'custom-control-label';}
144
+				if($type == 'file'){$label_args['class'] .= 'custom-file-label';} elseif($type == 'checkbox'){$label_args['class'] .= 'custom-control-label';}
146 145
 				$output .= self::label( $label_args, $type );
147 146
 			}
148 147
 
@@ -153,13 +152,13 @@  discard block
 block discarded – undo
153 152
 					'content' => $output,
154 153
 					'class'   => 'form-group custom-file'
155 154
 				) );
156
-			}elseif($type == 'checkbox'){
155
+			} elseif($type == 'checkbox'){
157 156
 				$wrap_class = $args['switch'] ? 'custom-switch' : 'custom-checkbox';
158 157
 				$output = self::wrap( array(
159 158
 					'content' => $output,
160 159
 					'class'   => 'custom-control '.$wrap_class
161 160
 				) );
162
-			}elseif($type == 'password' && $args['password_toggle'] && !$args['input_group_right']){
161
+			} elseif($type == 'password' && $args['password_toggle'] && !$args['input_group_right']){
163 162
 
164 163
 
165 164
 				// allow password field to toggle view
@@ -243,7 +242,7 @@  discard block
 block discarded – undo
243 242
 
244 243
 		// label
245 244
 		if(!empty($args['label']) && is_array($args['label'])){
246
-		}elseif(!empty($args['label'])){
245
+		} elseif(!empty($args['label'])){
247 246
 			$output .= self::label(array('title'=>$args['label'],'for'=>$args['id']));
248 247
 		}
249 248
 
@@ -267,7 +266,7 @@  discard block
 block discarded – undo
267 266
 
268 267
 			wp_editor( $content, $editor_id, $settings );
269 268
 			$output .= ob_get_clean();
270
-		}else{
269
+		} else{
271 270
 
272 271
 			// open
273 272
 			$output .= '<textarea ';
@@ -366,7 +365,7 @@  discard block
 block discarded – undo
366 365
 			// maybe hide labels //@todo set a global option for visibility class
367 366
 			if($type == 'file' || $type == 'checkbox'){
368 367
 				$class = $args['class'];
369
-			}else{
368
+			} else{
370 369
 				$class = 'sr-only '.$args['class'];
371 370
 			}
372 371
 
@@ -452,7 +451,7 @@  discard block
 block discarded – undo
452 451
 			$output .= '</'.sanitize_html_class($args['type']).'>';
453 452
 
454 453
 
455
-		}else{
454
+		} else{
456 455
 			$output = $args['content'];
457 456
 		}
458 457
 
@@ -493,7 +492,7 @@  discard block
 block discarded – undo
493 492
 		if(!empty($args['select2'])){
494 493
 			$args['class'] .= ' aui-select2';
495 494
 			$is_select2 = true;
496
-		}elseif( strpos($args['class'], 'aui-select2') !== false){
495
+		} elseif( strpos($args['class'], 'aui-select2') !== false){
497 496
 			$is_select2 = true;
498 497
 		}
499 498
 
@@ -512,7 +511,7 @@  discard block
 block discarded – undo
512 511
 
513 512
 		// label
514 513
 		if(!empty($args['label']) && is_array($args['label'])){
515
-		}elseif(!empty($args['label'])){
514
+		} elseif(!empty($args['label'])){
516 515
 			$output .= self::label(array('title'=>$args['label'],'for'=>$args['id']));
517 516
 		}
518 517
 
@@ -582,12 +581,12 @@  discard block
 block discarded – undo
582 581
 
583 582
 						$output .= '<option value="' . esc_attr($option_value) . '" ' . $selected . '>' . $option_label . '</option>';
584 583
 					}
585
-				}else{
584
+				} else{
586 585
 					$selected = '';
587 586
 					if(!empty($args['value'])){
588 587
 						if(is_array($args['value'])){
589 588
 							$selected = in_array($val,$args['value']) ? 'selected="selected"' : '';
590
-						}else{
589
+						} else{
591 590
 							$selected = selected( $args['value'], $val, false);
592 591
 						}
593 592
 					}
Please login to merge, or discard this patch.
ayecode/wp-ayecode-ui/includes/components/class-aui-component-button.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 			if($type=='a'){
50 50
 				$new_window = !empty($args['new_window']) ? ' target="_blank" ' : '';
51 51
 				$output .= '<a href="' . $args['href'] . '"'.$new_window;
52
-			}elseif($type=='badge'){
52
+			} elseif($type=='badge'){
53 53
 				$output .= '<span ';
54
-			}else{
54
+			} else{
55 55
 				$output .= '<button type="' . $type . '" ';
56 56
 			}
57 57
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 			// close
119 119
 			if($type=='a'){
120 120
 				$output .= '</a>';
121
-			}elseif($type=='badge'){
121
+			} elseif($type=='badge'){
122 122
 				$output .= '</span>';
123
-			}else{
123
+			} else{
124 124
 				$output .= '</button>';
125 125
 			}
126 126
 
Please login to merge, or discard this patch.
ayecode/wp-ayecode-ui/includes/components/class-aui-component-alert.php 1 patch
Braces   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,10 +42,7 @@
 block discarded – undo
42 42
 
43 43
 			// set default icon
44 44
 			if(!$icon && $args['icon']!==false && $type){
45
-				if($type=='danger'){$icon = '<i class="fas fa-exclamation-circle"></i>';}
46
-				elseif($type=='warning'){$icon = '<i class="fas fa-exclamation-triangle"></i>';}
47
-				elseif($type=='success'){$icon = '<i class="fas fa-check-circle"></i>';}
48
-				elseif($type=='info'){$icon = '<i class="fas fa-info-circle"></i>';}
45
+				if($type=='danger'){$icon = '<i class="fas fa-exclamation-circle"></i>';} elseif($type=='warning'){$icon = '<i class="fas fa-exclamation-triangle"></i>';} elseif($type=='success'){$icon = '<i class="fas fa-check-circle"></i>';} elseif($type=='info'){$icon = '<i class="fas fa-info-circle"></i>';}
49 46
 			}
50 47
 
51 48
 			$data = '';
Please login to merge, or discard this patch.
ayecode/wp-ayecode-ui/includes/components/class-aui-component-dropdown.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			// dropdown-menu
56 56
 			if(!empty($args['dropdown_menu'])){
57 57
 				$output .= $args['dropdown_menu'];
58
-			}elseif(!empty($args['dropdown_items'])){
58
+			} elseif(!empty($args['dropdown_items'])){
59 59
 				$output .= '<div class="dropdown-menu '.AUI_Component_Helper::esc_classes($args['dropdown_menu_class']).'" aria-labelledby="'.sanitize_html_class($args['id']).'">';
60 60
 				$output .= aui()->render($args['dropdown_items']);
61 61
 				$output .= '</div>';
Please login to merge, or discard this patch.
vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -473,12 +473,12 @@
 block discarded – undo
473 473
 				wp_enqueue_script( 'bootstrap-js-bundle' );
474 474
 				$script = $this->inline_script();
475 475
 				wp_add_inline_script( 'bootstrap-js-bundle', $script );
476
-			}elseif($this->settings[$js_setting]=='popper'){
476
+			} elseif($this->settings[$js_setting]=='popper'){
477 477
 				$url = $this->url.'assets/js/popper.min.js';
478 478
 				wp_register_script( 'bootstrap-js-popper', $url, array('jquery'), $this->latest );
479 479
 				wp_enqueue_script( 'bootstrap-js-popper' );
480 480
 				$load_inline = true;
481
-			}else{
481
+			} else{
482 482
 				$load_inline = true;
483 483
 			}
484 484
 
Please login to merge, or discard this patch.