public function organizationExists(User $client, $organizationName)
    {
        try {
            $org = $client->getOrganization($organizationName);

            return $org->getName() == $organizationName;
        } catch (ClientException $e) {
            if (404 === $e->getCode()) {
                return false;
            }

            throw $e;
        }
    }
public function organizationExists(User $client, $organizationName)
    {
        try {
            $org = $client->getOrganization($organizationName);

            return $org->getName() == $organizationName;
        } catch (ClientException $e) {
            if (404 === $e->getCode()) {
                return false;
            }

            throw $e;
        }
    }
public function organizationExists ( User $ client , $ organizationName ) { try { $ org = $ client -> getOrganization ( $ organizationName ) ; return $ org -> getName ( ) == $ organizationName ; } catch ( ClientException $ e ) { if ( 404 === $ e -> getCode ( ) ) { return false ; } throw $ e ; } }
Checks if the specified organization is visible to the current user.

@param User   $client
@param string $organizationName

@return bool
Checks if the specified organization is visible to the current user .