<?php

namespace App\Identifier;

use HyungJu\ReadableURL;

class WordlistIdentifier implements IdentifierContract
{
    public function generate(): string
    {
        return (new ReadableURL(true, rand(3, 5)))->generate();
    }
}

<?php

namespace App\Identifier;

use HyungJu\ReadableURL;

class WordlistIdentifier implements IdentifierContract
{
    public function generate(): string
    {
        return trim((new ReadableURL(true, rand(3, 5)))->generate());
    }
}

Fix new line being added to wordlist identifier generator
Fix new line being added to wordlist identifier generator

It looks like strings generated using the wordlist can sometimes be generated with a new line at the end of the string, this causes the file not not be stored correctly, and for the render controller to not be able to find the record in the database, this fixes this issue by trimming the result before it's returned, so the new line is removed.