Code Duplication    Length = 11-11 lines in 2 locations

src/Stringy.php 2 locations

@@ 2374-2384 (lines=11) @@
2371
     *
2372
     * @return static
2373
     */
2374
    public function kebabCase(): self
2375
    {
2376
        $words = \array_map(
2377
            static function (self $word) {
2378
                return $word->toLowerCase();
2379
            },
2380
            $this->words('', true)
2381
        );
2382
2383
        return new static(\implode('-', $words), $this->encoding);
2384
    }
2385
2386
    /**
2387
     * Returns the last $n characters of the string.
@@ 3695-3705 (lines=11) @@
3692
     *
3693
     * @return static
3694
     */
3695
    public function snakeCase(): self
3696
    {
3697
        $words = \array_map(
3698
            static function (self $word) {
3699
                return $word->toLowerCase();
3700
            },
3701
            $this->words('', true)
3702
        );
3703
3704
        return new static(\implode('_', $words), $this->encoding);
3705
    }
3706
3707
    /**
3708
     * Convert a string to snake_case.