Skip to content

Commit a603396

Browse files
committed
Renamed PropContext to PropertyContext
1 parent 95da486 commit a603396

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/PropContext.php renamed to src/PropertyContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Http\Request;
66

7-
class PropContext
7+
class PropertyContext
88
{
99
public function __construct(
1010
public string $key,

src/ProvidesInertiaProperty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
interface ProvidesInertiaProperty
66
{
7-
public function toInertiaProp(PropContext $prop): mixed;
7+
public function toInertiaProperty(PropertyContext $prop): mixed;
88
}

src/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function resolvePropertyInstances(array $props, Request $request, ?string
273273
$currentKey = $parentKey ? $parentKey.'.'.$key : $key;
274274

275275
if ($value instanceof ProvidesInertiaProperty) {
276-
$value = $value->toInertiaProp(new PropContext($currentKey, $props, $request));
276+
$value = $value->toInertiaProperty(new PropertyContext($currentKey, $props, $request));
277277
}
278278

279279
if ($value instanceof Arrayable) {

tests/Stubs/MergeWithSharedProp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
namespace Inertia\Tests\Stubs;
44

55
use Inertia\Inertia;
6-
use Inertia\PropContext;
6+
use Inertia\PropertyContext;
77
use Inertia\ProvidesInertiaProperty;
88

99
class MergeWithSharedProp implements ProvidesInertiaProperty
1010
{
1111
public function __construct(protected array $items = []) {}
1212

13-
public function toInertiaProp(PropContext $prop): mixed
13+
public function toInertiaProperty(PropertyContext $prop): mixed
1414
{
1515
return array_merge(Inertia::getShared($prop->key, []), $this->items);
1616
}

0 commit comments

Comments
 (0)