@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function getOptions($options) |
38 | 38 | { |
39 | - if(!is_array($options)) |
|
39 | + if (!is_array($options)) |
|
40 | 40 | { |
41 | 41 | $options = [ |
42 | 42 | 'class' => (string)$options |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected function buildIconClasses($icon, $extraClasses) |
57 | 57 | { |
58 | - return 'fa ' . $this->getIcon($icon) . ( $extraClasses != "" ? ' ' . $extraClasses : '' ); |
|
58 | + return 'fa ' . $this->getIcon($icon) . ($extraClasses != "" ? ' ' . $extraClasses : ''); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -68,19 +68,19 @@ discard block |
||
68 | 68 | protected function buildAttributes($options, $classes) |
69 | 69 | { |
70 | 70 | $attributes = []; |
71 | - $attributes[] = 'class="' . $classes .'"'; |
|
71 | + $attributes[] = 'class="' . $classes . '"'; |
|
72 | 72 | |
73 | 73 | unset($options['class']); |
74 | 74 | |
75 | - if(is_array($options)) |
|
75 | + if (is_array($options)) |
|
76 | 76 | { |
77 | - foreach($options as $attribute => $value) |
|
77 | + foreach ($options as $attribute => $value) |
|
78 | 78 | { |
79 | 79 | $attributes[] = $this->createAttribute($attribute, $value); |
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | - return (count($attributes) > 0) ? implode(' ', $attributes) : '' ; |
|
83 | + return (count($attributes) > 0) ? implode(' ', $attributes) : ''; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function buildIcon($attributes) |
105 | 105 | { |
106 | - return '<i ' . $attributes .'></i>'; |
|
106 | + return '<i ' . $attributes . '></i>'; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | } |
110 | 110 | \ No newline at end of file |
@@ -20,18 +20,18 @@ |
||
20 | 20 | public function boot() |
21 | 21 | { |
22 | 22 | Blade::directive('fa', function($arguments) { |
23 | - list($icon, $attributes) = explode(',', str_replace(['(',')',' ', "'"], '', $arguments), 2); |
|
23 | + list($icon, $attributes) = explode(',', str_replace(['(', ')', ' ', "'"], '', $arguments), 2); |
|
24 | 24 | |
25 | 25 | $options = []; |
26 | 26 | |
27 | - if($attributes != "") |
|
27 | + if ($attributes != "") |
|
28 | 28 | { |
29 | 29 | $rawAttributes = str_replace(['array(', '[', ']', ')'], "", $attributes); |
30 | 30 | $arrAttributes = explode(",", $rawAttributes); |
31 | 31 | |
32 | - if(count($arrAttributes) > 0) |
|
32 | + if (count($arrAttributes) > 0) |
|
33 | 33 | { |
34 | - foreach($arrAttributes as $string) |
|
34 | + foreach ($arrAttributes as $string) |
|
35 | 35 | { |
36 | 36 | $attr = explode("=>", $string); |
37 | 37 | $options[$attr[0]] = $attr[1]; |