Code Duplication    Length = 12-13 lines in 2 locations

source/SignatureGenerator.php 1 location

@@ 148-159 (lines=12) @@
145
            }
146
            $this->addEmptyLine = true;
147
        }
148
        if (is_array($methods)) {
149
            if ($this->addEmptyLine) {
150
                $this->addContent('');
151
            }
152
            $lastArrayKey = $this->getLastArrayKey($methods);
153
            foreach($methods as $key => $method) {
154
                $this->addGeneratorAsContent($method, true);
155
                if ($key !== $lastArrayKey) {
156
                    $this->addContent('');
157
                }
158
            }
159
        }
160
161
        $this->addContent('}');
162
        $this->addEmptyLine = false;

source/TraitGenerator.php 1 location

@@ 109-121 (lines=13) @@
106
            }
107
            $addEmptyLine = true;
108
        }
109
        if (is_array($properties)) {
110
            if ($addEmptyLine) {
111
                $this->addContent('');
112
            }
113
            $lastArrayKey = $this->getLastArrayKey($properties);
114
            foreach($properties as $key => $property) {
115
                $this->addGeneratorAsContent($property, true);
116
                if ($key !== $lastArrayKey) {
117
                    $this->addContent('');
118
                }
119
            }
120
            $addEmptyLine = true;
121
        }
122
        if (is_array($methods)) {
123
            if ($addEmptyLine) {
124
                $this->addContent('');