| @@ 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 | } |
|
| @@ 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); |
|