Skip to content

Commit 04dfc1b

Browse files
CS fixes
1 parent f1e03d0 commit 04dfc1b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ContainerBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public function addObjectResource(object|string $object): static
291291
{
292292
if ($this->trackResources) {
293293
if (\is_object($object)) {
294-
$object = \get_class($object);
294+
$object = $object::class;
295295
}
296296
if (!isset($this->classReflectors[$object])) {
297297
$this->classReflectors[$object] = new \ReflectionClass($object);
@@ -1037,7 +1037,7 @@ private function createService(Definition $definition, array &$inlineServices, b
10371037
if (null !== $factory) {
10381038
$service = $factory(...$arguments);
10391039

1040-
if (\is_object($tryProxy) && \get_class($service) !== $parameterBag->resolveValue($definition->getClass())) {
1040+
if (\is_object($tryProxy) && $service::class !== $parameterBag->resolveValue($definition->getClass())) {
10411041
throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', $definition->getClass(), get_debug_type($service)));
10421042
}
10431043

Dumper/PhpDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ private function exportParameters(array $parameters, string $path = '', int $ind
16651665
throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path.'/'.$key));
16661666
} elseif ($value instanceof \UnitEnum) {
16671667
$hasEnum = true;
1668-
$value = sprintf('\%s::%s', \get_class($value), $value->name);
1668+
$value = sprintf('\%s::%s', $value::class, $value->name);
16691669
} else {
16701670
$value = $this->export($value);
16711671
}
@@ -1917,7 +1917,7 @@ private function dumpValue(mixed $value, bool $interpolate = true): string
19171917
return $code;
19181918
}
19191919
} elseif ($value instanceof \UnitEnum) {
1920-
return sprintf('\%s::%s', \get_class($value), $value->name);
1920+
return sprintf('\%s::%s', $value::class, $value->name);
19211921
} elseif ($value instanceof AbstractArgument) {
19221922
throw new RuntimeException($value->getTextWithContext());
19231923
} elseif (\is_object($value) || \is_resource($value)) {

LazyProxy/Instantiator/InstantiatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface InstantiatorInterface
2525
/**
2626
* Instantiates a proxy object.
2727
*
28-
* @param string $id Identifier of the requested service
28+
* @param string $id Identifier of the requested service
2929
* @param callable(object=) $realInstantiator A callback that is capable of producing the real service instance
3030
*
3131
* @return object

0 commit comments

Comments
 (0)