Code Duplication    Length = 16-16 lines in 2 locations

src/Utils/DefaultNamingStrategy.php 2 locations

@@ 156-171 (lines=16) @@
153
     *
154
     * @return string
155
     */
156
    private function toSingularCamelCase(string $str): string
157
    {
158
        // Let's first check if this is not in the exceptions directory.
159
        if (isset($this->exceptions[$str])) {
160
            return $this->exceptions[$str];
161
        }
162
163
        $tokens = preg_split("/[_ ]+/", $str);
164
165
        $str = '';
166
        foreach ($tokens as $token) {
167
            $str .= ucfirst(Inflector::singularize($token));
168
        }
169
170
        return $str;
171
    }
172
173
    /**
174
     * Put string to camel case form.
@@ 180-195 (lines=16) @@
177
     *
178
     * @return string
179
     */
180
    private function toCamelCase(string $str): string
181
    {
182
        // Let's first check if this is not in the exceptions directory.
183
        if (isset($this->exceptions[$str])) {
184
            return $this->exceptions[$str];
185
        }
186
187
        $tokens = preg_split("/[_ ]+/", $str);
188
189
        $str = '';
190
        foreach ($tokens as $token) {
191
            $str .= ucfirst($token);
192
        }
193
194
        return $str;
195
    }
196
197
    /**
198
     * Returns the class name for the DAO factory.