@@ -61,7 +61,7 @@ public function addStylesDirectly(array|string $assets, array $attributes = []):
61
61
foreach ((array )$ assets as &$ item ) {
62
62
$ item = ltrim (trim ($ item ), '/ ' );
63
63
64
- if (! in_array ($ item , $ this ->appendedStyles )) {
64
+ if (!in_array ($ item , $ this ->appendedStyles )) {
65
65
$ this ->appendedStyles [$ item ] = [
66
66
'src ' => $ item ,
67
67
'attributes ' => $ attributes ,
@@ -73,14 +73,14 @@ public function addStylesDirectly(array|string $assets, array $attributes = []):
73
73
}
74
74
75
75
public function addScriptsDirectly (
76
- array |string $ assets ,
77
- string $ location = self ::ASSETS_SCRIPT_POSITION_FOOTER ,
76
+ array |string $ assets ,
77
+ string $ location = self ::ASSETS_SCRIPT_POSITION_FOOTER ,
78
78
array $ attributes = []
79
79
): static {
80
80
foreach ((array )$ assets as &$ item ) {
81
81
$ item = ltrim (trim ($ item ), '/ ' );
82
82
83
- if (! in_array ($ item , $ this ->appendedScripts [$ location ])) {
83
+ if (!in_array ($ item , $ this ->appendedScripts [$ location ])) {
84
84
$ this ->appendedScripts [$ location ][$ item ] = [
85
85
'src ' => $ item ,
86
86
'attributes ' => $ attributes ,
@@ -133,7 +133,7 @@ public function removeItemDirectly(array|string $assets, ?string $location = nul
133
133
$ item = ltrim (trim ($ item ), '/ ' );
134
134
135
135
if (
136
- $ location
136
+ $ location
137
137
&& in_array ($ location , [self ::ASSETS_SCRIPT_POSITION_HEADER , self ::ASSETS_SCRIPT_POSITION_FOOTER ])
138
138
) {
139
139
Arr::forget ($ this ->appendedScripts [$ location ], $ item );
@@ -158,7 +158,7 @@ public function getScripts(?string $location = null): array
158
158
foreach ($ this ->scripts as $ script ) {
159
159
$ configName = 'resources.scripts. ' . $ script ;
160
160
161
- if (! empty ($ location ) && $ location !== Arr::get ($ this ->config , $ configName . '.location ' )) {
161
+ if (!empty ($ location ) && $ location !== Arr::get ($ this ->config , $ configName . '.location ' )) {
162
162
continue ; // Skip assets that don't match this location
163
163
}
164
164
@@ -174,7 +174,7 @@ public function getScripts(?string $location = null): array
174
174
public function getStyles (array $ lastStyles = []): array
175
175
{
176
176
$ styles = [];
177
- if (! empty ($ lastStyles )) {
177
+ if (!empty ($ lastStyles )) {
178
178
$ this ->styles = array_merge ($ this ->styles , $ lastStyles );
179
179
}
180
180
@@ -226,13 +226,13 @@ protected function itemToHtml(string $name, string $type = 'style'): string
226
226
{
227
227
$ html = '' ;
228
228
229
- if (! in_array ($ type , ['style ' , 'script ' ])) {
229
+ if (!in_array ($ type , ['style ' , 'script ' ])) {
230
230
return $ html ;
231
231
}
232
232
233
233
$ configName = 'resources. ' . $ type . 's. ' . $ name ;
234
234
235
- if (! Arr::has ($ this ->config , $ configName )) {
235
+ if (!Arr::has ($ this ->config , $ configName )) {
236
236
return $ html ;
237
237
}
238
238
@@ -250,7 +250,7 @@ protected function itemToHtml(string $name, string $type = 'style'): string
250
250
*/
251
251
protected function getSourceUrl (string $ configName )
252
252
{
253
- if (! Arr::has ($ this ->config , $ configName )) {
253
+ if (!Arr::has ($ this ->config , $ configName )) {
254
254
return '' ;
255
255
}
256
256
@@ -265,7 +265,7 @@ protected function getSourceUrl(string $configName)
265
265
266
266
protected function isUsingCdn (string $ configName ): bool
267
267
{
268
- return Arr::get ($ this ->config , $ configName . '.use_cdn ' , false ) && ! $ this ->config ['offline ' ];
268
+ return Arr::get ($ this ->config , $ configName . '.use_cdn ' , false ) && !$ this ->config ['offline ' ];
269
269
}
270
270
271
271
protected function getSource (string $ configName , ?string $ location = null ): array
@@ -279,7 +279,7 @@ protected function getSource(string $configName, ?string $location = null): arra
279
279
$ scripts = [];
280
280
281
281
foreach ((array )$ src as $ s ) {
282
- if (! $ s ) {
282
+ if (!$ s ) {
283
283
continue ;
284
284
}
285
285
0 commit comments