Skip to content

Commit 25bb17e

Browse files
committed
Merge branch '3.x' into 4.x
2 parents 0b40c5c + d62e0af commit 25bb17e

5 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/Blueprint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ private function getUsagePathAndLines(Layer $layer, string $objectName, string $
267267

268268
/** @var array<int, Name|Expr> $nodes */
269269
$names = array_values(array_filter(
270-
$nodes, static function ($node) use ($target): bool {
270+
$nodes, static function (\PhpParser\Node\Expr|\PhpParser\Node\Name $node) use ($target): bool {
271271
$name = $node instanceof Name ? $node->toString() : PhpCoreExpressions::getName($node);
272272

273273
return $name === $target;

src/Expectations/ToBeUsedIn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static function make(Expectation $expectation, array|string $targets): Gr
3030
$expectation,
3131
array_map(
3232
// @phpstan-ignore-next-line
33-
static fn ($target): SingleArchExpectation => ToUse::make(expect($target), $expectation->value), $targets
33+
static fn (string $target): SingleArchExpectation => ToUse::make(expect($target), $expectation->value), $targets
3434
)
3535
);
3636
}

src/Factories/LayerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function make(LayerOptions $options, string $name, bool $onlyUserDefinedU
4646
$uses = $object->uses->getIterator();
4747

4848
$object->uses = new ObjectUses(array_values(
49-
array_filter(iterator_to_array($uses), function ($use) use ($options): bool {
49+
array_filter(iterator_to_array($uses), function (string $use) use ($options): bool {
5050
foreach ($options->exclude as $exclude) {
5151
if (str_starts_with($use, $exclude)) {
5252
return false;

src/Repositories/ObjectsRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function allByNamespace(string $namespace, bool $onlyUserDefinedUses = tr
125125
private function functionsByNamespace(string $name): array
126126
{
127127
return array_map(
128-
static function ($functionName): string {
128+
static function (string $functionName): string {
129129
$reflection = new ReflectionFunction($functionName);
130130

131131
return $reflection->getName();

src/Support/AssertLocker.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ private static function reflection(): ReflectionProperty
4646
{
4747
$reflectionClass = new ReflectionClass(Assert::class);
4848

49-
$property = $reflectionClass->getProperty('count');
50-
$property->setAccessible(true);
51-
52-
return $property;
49+
return $reflectionClass->getProperty('count');
5350
}
5451
}

0 commit comments

Comments
 (0)