Code Duplication    Length = 16-17 lines in 2 locations

src/Query/Dialect/Mysql/Union.php 1 location

@@ 72-87 (lines=16) @@
69
     * @return string
70
     * @access protected
71
     */
72
    protected function buildUnion(
73
        /*# string */ $prefix,
74
        array $settings
75
    )/*# : string */ {
76
        $clause = &$this->getClause('UNION');
77
        $flat = $this->flatSettings($settings);
78
79
        $res = '';
80
        foreach ($clause as $idx => $field) {
81
            $parts = [];
82
            $prefix = $idx ? $field[1] : '';
83
            $parts[] = $this->quoteItem($field[0], $flat);
84
            $res .= $this->joinClause($prefix, '', $parts, $settings);
85
        }
86
        return ltrim($res);
87
    }
88
89
    /**
90
     * @param  string $type

src/Query/Traits/Clause/JoinTrait.php 1 location

@@ 178-194 (lines=17) @@
175
     * @return string
176
     * @access protected
177
     */
178
    protected function buildJoin(
179
        /*# string */ $prefix,
180
        array $settings
181
    )/*# : string */ {
182
        $string = '';
183
        $clause = &$this->getClause('JOIN');
184
        foreach ($clause as $cls) {
185
            $result = [];
186
            $prefix = $cls[1]; // join type
187
            $result[] = $this->buildJoinTable($cls, $settings); // join table
188
            if (!empty($cls[4])) {
189
                $result[] = $this->buildJoinOn($cls, $settings);
190
            }
191
            $string .= $this->joinClause($prefix, '', $result, $settings);
192
        }
193
        return $string;
194
    }
195
196
    /**
197
     * Build TABLE part