Skip to content

Commit 9def3f5

Browse files
committed
refactor: unblocked against laravel#57467
1 parent 8a2166f commit 9def3f5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Illuminate/View/ComponentAttributeBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,10 @@ public function __toString()
495495
$value = $key === 'x-data' || str_starts_with($key, 'wire:') ? '' : $key;
496496
}
497497

498-
if ($key === $value) {
498+
if($key === $value) {
499499
$string .= ' '.$key;
500500
} else {
501-
$string .= ' '.$key.'="'.str_replace('"', '\\"', trim($value)).'"';
501+
$string .= ' ' . $key . '="' . str_replace('"', '\\"', trim($value)) . '"';
502502
}
503503
}
504504

tests/View/ViewComponentAttributeBagTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function testAttributeRetrieval()
5353
'test-empty-string' => '',
5454
]);
5555

56-
$this->assertSame('test-string="ok" test-true="test-true" test-0="0" test-0-string="0" test-empty-string=""', (string) $bag);
57-
$this->assertSame('test-string="ok" test-true="test-true" test-0="0" test-0-string="0" test-empty-string=""', (string) $bag->merge());
56+
$this->assertSame('test-string="ok" test-true test-0="0" test-0-string="0" test-empty-string=""', (string) $bag);
57+
$this->assertSame('test-string="ok" test-true test-0="0" test-0-string="0" test-empty-string=""', (string) $bag->merge());
5858

5959
$bag = (new ComponentAttributeBag)
6060
->merge([
@@ -74,7 +74,7 @@ public function testAttributeRetrieval()
7474
'test-empty-string' => '',
7575
]);
7676

77-
$this->assertSame('test-string="ok" test-true="test-true" test-0="0" test-0-string="0" test-empty-string=""', (string) $bag);
77+
$this->assertSame('test-string="ok" test-true test-0="0" test-0-string="0" test-empty-string=""', (string) $bag);
7878

7979
$bag = (new ComponentAttributeBag)
8080
->merge([
@@ -151,7 +151,7 @@ public function testItMakesAnExceptionForAlpineXdata()
151151
'x-data' => true,
152152
]);
153153

154-
$this->assertSame('required="required" x-data=""', (string) $bag);
154+
$this->assertSame('required x-data=""', (string) $bag);
155155
}
156156

157157
public function testItMakesAnExceptionForLivewireWireAttributes()

0 commit comments

Comments
 (0)