Skip to content

Commit cbc4d74

Browse files
committed
style: apply fixes from qa
1 parent 0b6115d commit cbc4d74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Tempest/View/src/Components/Icon.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function compile(ViewComponentElement $element): string
5050
* it will be downloaded it on the fly and cached for future use.
5151
* If the icon is already in the cache, it will be served from there.
5252
*/
53-
public function render(string $name, ?string $class): ?string
53+
public function render(string $name, ?string $class): string
5454
{
5555
$svg = self::svg($name);
5656

@@ -61,7 +61,7 @@ public function render(string $name, ?string $class): ?string
6161
}
6262

6363
if ($class !== null) {
64-
$svg = self::injectClass($svg, $class);
64+
return self::injectClass($svg, $class);
6565
}
6666

6767
return $svg;

tests/Integration/View/IconComponentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function test_it_forwards_the_class_attribute(): void
161161
),
162162
);
163163
}
164-
164+
165165
public function test_with_dynamic_data(): void
166166
{
167167
$mockHttpClient = $this->createMock(HttpClient::class);
@@ -175,7 +175,7 @@ public function test_with_dynamic_data(): void
175175

176176
$rendered = $this->render(
177177
'<x-icon :name="$iconName" class="size-5" />',
178-
iconName: "ph:eye",
178+
iconName: 'ph:eye',
179179
);
180180

181181
$this->assertSame(

0 commit comments

Comments
 (0)