Code Duplication    Length = 11-11 lines in 2 locations

src/Repositories/PGTicketRepository.php 1 location

@@ 102-112 (lines=11) @@
99
     * @param string $totalLength
100
     * @return string|false
101
     */
102
    protected function getAvailableTicket($totalLength)
103
    {
104
        return $this->ticketGenerator->generate(
105
            $totalLength,
106
            'PGT-',
107
            function ($ticket) {
108
                return is_null($this->getByTicket($ticket, false));
109
            },
110
            10
111
        );
112
    }
113
}
114

src/Repositories/TicketRepository.php 1 location

@@ 109-119 (lines=11) @@
106
     * @param string  $prefix
107
     * @return string|false
108
     */
109
    protected function getAvailableTicket($totalLength, $prefix)
110
    {
111
        return $this->ticketGenerator->generate(
112
            $totalLength,
113
            $prefix,
114
            function ($ticket) {
115
                return is_null($this->getByTicket($ticket, false));
116
            },
117
            10
118
        );
119
    }
120
}