Skip to content

Commit 7290b3a

Browse files
committed
Fix psalm issues
1 parent 4d7352a commit 7290b3a

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

DataCollector/DoctrineDataCollector.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ public function __construct(ManagerRegistry $registry, bool $shouldValidateSchem
6666
$this->registry = $registry;
6767
$this->shouldValidateSchema = $shouldValidateSchema;
6868

69-
if ($debugDataHolder === null) {
70-
parent::__construct($registry);
71-
} else {
72-
parent::__construct($registry, $debugDataHolder);
73-
}
69+
parent::__construct($registry, $debugDataHolder);
7470
}
7571

7672
public function collect(Request $request, Response $response, ?Throwable $exception = null): void

DependencyInjection/DoctrineExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ protected function loadOrmEntityManagerMappingInformation(array $entityManager,
844844
$mappingService = $this->getObjectManagerElementName($entityManager['name'] . '_' . $driverType . '_metadata_driver');
845845
$mappingDriverDef = $container->getDefinition($mappingService);
846846
$args = $mappingDriverDef->getArguments();
847-
/** @psalm-suppress TypeDoesNotContainType $this->drivers is set by $this->loadMappingInformation() call */
848847
if ($driverType === 'annotation') {
849848
$args[2] = $entityManager['report_fields_where_declared'];
850849
} elseif ($driverType === 'attribute') {

Mapping/DisconnectedMetadataFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,10 @@ public function findNamespaceAndPathForMetadata(ClassMetadataCollection $metadat
117117
$ns = $r->getNamespaceName();
118118
} elseif ($path) {
119119
// Get namespace by removing the last component of the FQCN
120-
/** @psalm-suppress NoValue */
121120
$nsParts = explode('\\', $all[0]->name);
122121
array_pop($nsParts);
123122
$ns = implode('\\', $nsParts);
124123
} else {
125-
/** @psalm-suppress NoValue */
126124
throw new RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name));
127125
}
128126

Tests/ProfilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function setUp(): void
6666

6767
if (class_exists(CodeExtension::class)) {
6868
$this->twig->addExtension(new CodeExtension('', '', ''));
69-
} else {
69+
} elseif (class_exists(CodeExtensionLegacy::class)) {
7070
$this->twig->addExtension(new CodeExtensionLegacy('', '', ''));
7171
}
7272

0 commit comments

Comments
 (0)