Skip to content

Commit 29bbef7

Browse files
committed
better detect
1 parent d952706 commit 29bbef7

15 files changed

+191
-687
lines changed

app/Contexts/AbstractContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function searchForVar(string $name): AssignmentValue|string|null
120120
public function searchForProperty(string $name)
121121
{
122122
if ($this instanceof ClassDefinition) {
123-
return collect($this->properties)->first(fn ($prop) => $prop['name'] === $name);
123+
return collect($this->properties)->first(fn($prop) => $prop['name'] === $name);
124124
}
125125

126126
return $this->parent?->searchForProperty($name) ?? null;
@@ -146,7 +146,7 @@ public function toArray(): array
146146
(count($this->start) > 0) ? ['start' => $this->start] : [],
147147
(count($this->end) > 0) ? ['end' => $this->end] : [],
148148
($this->hasChildren)
149-
? ['children' => array_map(fn ($child) => $child->toArray(), $this->children)]
149+
? ['children' => array_map(fn($child) => $child->toArray(), $this->children)]
150150
: [],
151151
);
152152
}

app/Contexts/Blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Contexts;
4+
5+
class Blade extends AbstractContext
6+
{
7+
public function type(): string
8+
{
9+
return 'blade';
10+
}
11+
}

0 commit comments

Comments
 (0)