Skip to content

Commit 38e24bf

Browse files
committed
bot: fix cs [skip ci]
1 parent 669bc2d commit 38e24bf

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/Bundle/Maker/Factory/MakeFactoryPHPDocMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
final class MakeFactoryPHPDocMethod
1818
{
19-
public function __construct(private string $objectName, private string $prototype, private bool $returnsCollection, private bool $isStatic = true, private string|null $repository = null)
19+
public function __construct(private string $objectName, private string $prototype, private bool $returnsCollection, private bool $isStatic = true, private ?string $repository = null)
2020
{
2121
}
2222

@@ -52,7 +52,7 @@ public static function createAll(MakeFactoryData $makeFactoryData): array
5252
return $methods;
5353
}
5454

55-
public function toString(string|null $staticAnalysisTool = null): string
55+
public function toString(?string $staticAnalysisTool = null): string
5656
{
5757
$annotation = $staticAnalysisTool ? "{$staticAnalysisTool}-method" : 'method';
5858
$static = $this->isStatic ? 'static' : ' ';

src/Bundle/Maker/Factory/NamespaceGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __invoke(Generator $generator, string $originalClass, string $ba
6262
return $baseNamespace;
6363
}
6464

65-
private function namespaceSuffixFromDoctrineMapping(string $originalClass): string|null
65+
private function namespaceSuffixFromDoctrineMapping(string $originalClass): ?string
6666
{
6767
$originalClassNamespace = Str::getNamespace($originalClass);
6868

src/Bundle/Maker/Factory/ObjectDefaultPropertiesGuesser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function shouldAddPropertyToFactory(MakeFactoryQuery $makeFactoryQuery,
8585
return $property->hasType();
8686
}
8787

88-
private function getPropertyType(\ReflectionProperty $property): string|null
88+
private function getPropertyType(\ReflectionProperty $property): ?string
8989
{
9090
if (!$property->hasType()) {
9191
$type = $this->getConstructorParameterForProperty($property)?->getType();
@@ -100,7 +100,7 @@ private function getPropertyType(\ReflectionProperty $property): string|null
100100
return $type->getName();
101101
}
102102

103-
private function getConstructorParameterForProperty(\ReflectionProperty $property): \ReflectionParameter|null
103+
private function getConstructorParameterForProperty(\ReflectionProperty $property): ?\ReflectionParameter
104104
{
105105
if ($constructor = $property->getDeclaringClass()->getConstructor()) {
106106
foreach ($constructor->getParameters() as $parameter) {

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ private static function normalizeObject(object $object): object
447447
*
448448
* @return array{cascade: bool, inversedField: ?string, inverseIsCollection: bool, isOwningSide: bool}|null
449449
*/
450-
private static function getRelationshipMetadata(EntityManagerInterface $entityManager, string $factoryClass, string $relationshipName): array|null
450+
private static function getRelationshipMetadata(EntityManagerInterface $entityManager, string $factoryClass, string $relationshipName): ?array
451451
{
452452
$metadata = $entityManager->getClassMetadata($factoryClass);
453453

tests/Fixtures/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ class Kernel extends BaseKernel
4141
private string $ormResetMode = ORMDatabaseResetter::RESET_MODE_SCHEMA;
4242

4343
private array $factoriesRegistered = [];
44-
private string|null $defaultMakeFactoryNamespace = null;
44+
private ?string $defaultMakeFactoryNamespace = null;
4545

4646
public static function create(
4747
bool $enableDoctrine = true,
4848
string $ormResetMode = ORMDatabaseResetter::RESET_MODE_SCHEMA,
4949
array $factoriesRegistered = [],
50-
string|null $defaultMakeFactoryNamespace = null,
50+
?string $defaultMakeFactoryNamespace = null,
5151
): self {
5252
$kernel = new self('test', true);
5353

tests/Fixtures/Object/SomeObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class SomeObject
1717
{
1818
public $propertyWithoutType;
1919
public string $stringMandatory;
20-
public string|null $stringNullable;
20+
public ?string $stringNullable;
2121
public string $stringWithDefault = '';
2222
public int $intMandatory;
2323
public float $floatMandatory;

0 commit comments

Comments
 (0)