Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function getGridMetadata(string $classFqn, string $variant): GridMetadata |
||
20 | { |
||
21 | if (null === $metadata = $this->metadataFactory->getMetadataForClass($classFqn)) { |
||
22 | throw new \InvalidArgumentException('Could not locate grid metadata'); |
||
23 | } |
||
24 | |||
25 | return $this->resolveGridMetadata($metadata->getGrids(), $variant); |
||
26 | } |
||
27 | |||
50 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.