Code Duplication    Length = 10-10 lines in 2 locations

src/Padawan/Domain/Project/FQCN.php 1 location

@@ 42-51 (lines=10) @@
39
    /**
40
     * @inheritdoc
41
     */
42
    public function join(FQN $join) {
43
        $result = new self($join->getLast());
44
        $resultParts = $this->getParts();
45
        $joiningParts = $join->getParts();
46
        if ($this->getLast() === $join->getFirst()) {
47
            array_shift($joiningParts);
48
        }
49
        $result->setParts(array_merge($resultParts, $joiningParts));
50
        return $result;
51
    }
52
    public function getClassName() {
53
        return $this->getLast();
54
    }

src/Padawan/Domain/Project/FQN.php 1 location

@@ 29-38 (lines=10) @@
26
     *
27
     * @return FQN
28
     */
29
    public function join(FQN $join) {
30
        $result = new self();
31
        $resultParts = $this->getParts();
32
        $joiningParts = $join->getParts();
33
        if ($this->getLast() === $join->getFirst()) {
34
            array_shift($joiningParts);
35
        }
36
        $result->setParts(array_merge($resultParts, $joiningParts));
37
        return $result;
38
    }
39
    public function getFirst() {
40
        $parts = $this->getParts();
41
        return array_shift($parts);