public function getClientBySpaceId(string $spaceId): ?Client
    {
        foreach ($this->clientsConfig as $clientConfig) {
            if ($clientConfig['space'] === $spaceId) {
                return $clientConfig['service'];
            }
        }

        return null;
    }
public function getClientBySpaceId(string $spaceId): ?Client
    {
        foreach ($this->clientsConfig as $clientConfig) {
            if ($clientConfig['space'] === $spaceId) {
                return $clientConfig['service'];
            }
        }

        return null;
    }
public function getClientBySpaceId ( string $ spaceId ) : ? Client { foreach ( $ this -> clientsConfig as $ clientConfig ) { if ( $ clientConfig [ 'space' ] === $ spaceId ) { return $ clientConfig [ 'service' ] ; } } return null ; }
Returns the Contentful client which serves the space with provided ID.

If no client is found, null is returned.
Returns the Contentful client which serves the space with provided ID .