src/Core/ExceptionsMessages.php
protected function getMessages(string $locale = "en"):array
    {
        $path = __DIR__ . "/../Messages/" . $locale . "/messages.json";

        if (file_exists($path)) {
            $jsonMessages = file_get_contents($path);

            return json_decode($jsonMessages, true);
        }

        return [];
    }
protected function getMessages(string $locale = "en"):array
    {
        $path = __DIR__ . "/../Messages/" . $locale . "/messages.json";

        if (file_exists($path)) {
            $jsonMessages = file_get_contents($path);

            return json_decode($jsonMessages, true);
        }

        return [];
    }
protected function getMessages ( string $ locale = "en" ) : array { $ path = __DIR__ . "/../Messages/" . $ locale . "/messages.json" ; if ( file_exists ( $ path ) ) { $ jsonMessages = file_get_contents ( $ path ) ; return json_decode ( $ jsonMessages , true ) ; } return [ ] ; }
Returns an array of possible exceptions messages

@param string $locale
@return array
Returns an array of possible exceptions messages