Code Duplication    Length = 3-5 lines in 2 locations

src/services/DocumentorService.php 2 locations

@@ 608-610 (lines=3) @@
605
                            ];
606
                            $paths[$url][$method]['responses'][200]['schema']['properties']['data'] = $classDefinition;
607
                            $dtos += self::extractSwaggerDefinition($class, $object);
608
                            if(!isset($paths[$url][$method]['tags']) || !in_array($class, $paths[$url][$method]['tags'])) {
609
                                $paths[$url][$method]['tags'][] = $class;
610
                            }
611
                            if(array_key_exists('payload', $endpoint)) {
612
                                $paths[$url][$method]['parameters'][] = [
613
                                    'in' => 'body',
@@ 619-623 (lines=5) @@
616
                                    'schema' => $classDefinition
617
                                ];
618
                            }
619
                        } else {
620
                            if(!isset($paths[$url][$method]['tags']) || !in_array($endpoint['class'], $paths[$url][$method]['tags'])) {
621
                                $paths[$url][$method]['tags'][] = $endpoint['class'];
622
                            }
623
                        }
624
                    }
625
                }
626
            }