public static function createNewClient(string $name, $redirectUris = null): Client
    {
        if (isset($redirectUris) && is_string($redirectUris)) {
            $redirectUris = explode(' ', $redirectUris);
        }

        if (isset($redirectUris) && is_array($redirectUris)) {
            foreach ($redirectUris as &$redirectUri) {
                $redirectUri = trim((string) $redirectUri);
            }
        }

        $client = new static();

        $client->id = (string) Uuid::uuid4();
        $client->name = $name;
        $client->redirectUris = $redirectUris ?? [];

        return $client;
    }
public static function createNewClient(string $name, $redirectUris = null): Client
    {
        if (isset($redirectUris) && is_string($redirectUris)) {
            $redirectUris = explode(' ', $redirectUris);
        }

        if (isset($redirectUris) && is_array($redirectUris)) {
            foreach ($redirectUris as &$redirectUri) {
                $redirectUri = trim((string) $redirectUri);
            }
        }

        $client = new static();

        $client->id = (string) Uuid::uuid4();
        $client->name = $name;
        $client->redirectUris = $redirectUris ?? [];

        return $client;
    }
public static function createNewClient ( string $ name , $ redirectUris = null ) : Client { if ( isset ( $ redirectUris ) && is_string ( $ redirectUris ) ) { $ redirectUris = explode ( ' ' , $ redirectUris ) ; } if ( isset ( $ redirectUris ) && is_array ( $ redirectUris ) ) { foreach ( $ redirectUris as & $ redirectUri ) { $ redirectUri = trim ( ( string ) $ redirectUri ) ; } } $ client = new static ( ) ; $ client -> id = ( string ) Uuid :: uuid4 ( ) ; $ client -> name = $ name ; $ client -> redirectUris = $ redirectUris ?? [ ] ; return $ client ; }
Create a new Client

@param string|string[]|null $redirectUris Client allowed redirect direct url's
Create a new Client