Skip to content

Commit e792c41

Browse files
committed
add check condition and phpdoc
1 parent cbc92d8 commit e792c41

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

inc/Services/Assets.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ public function get_min_file( string $type ): string {
133133

134134
$assets = $this->get_assets_json_index_file();
135135

136+
if ( empty( $assets ) ) {
137+
return '';
138+
}
139+
136140
switch ( $type ) {
137141
case 'css':
138142
$file = $assets['app.css'] ?? '';

inc/Services/Theme.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
class Theme implements Service {
1010

11+
/**
12+
* @var Service|bool
13+
*/
1114
protected $asset;
1215

1316
/**
@@ -89,12 +92,9 @@ private function i18n(): void {
8992
/**
9093
* Set default path for ARI for minified files
9194
*
92-
* @param string $attr
93-
*
9495
* @return string
95-
*
9696
*/
97-
public function set_ari_responsive_image_default_img_path( string $attr ): string {
97+
public function set_ari_responsive_image_default_img_path(): string {
9898
return '/dist/';
9999
}
100100

0 commit comments

Comments
 (0)