public function formattedCredentials(string $relationship, string $formatter)
    {
        if (empty($this->credentialFormatters[$formatter])) {
            throw new NoCredentialFormatterFoundException(sprintf('There is no credential formatter named "%s" registered. Did you remember to call registerFormatter()?', $formatter));
        }

        return $this->credentialFormatters[$formatter]($this->credentials($relationship));
    }
public function formattedCredentials(string $relationship, string $formatter)
    {
        if (empty($this->credentialFormatters[$formatter])) {
            throw new NoCredentialFormatterFoundException(sprintf('There is no credential formatter named "%s" registered. Did you remember to call registerFormatter()?', $formatter));
        }

        return $this->credentialFormatters[$formatter]($this->credentials($relationship));
    }
public function formattedCredentials ( string $ relationship , string $ formatter ) { if ( empty ( $ this -> credentialFormatters [ $ formatter ] ) ) { throw new NoCredentialFormatterFoundException ( sprintf ( 'There is no credential formatter named "%s" registered. Did you remember to call registerFormatter()?' , $ formatter ) ) ; } return $ this -> credentialFormatters [ $ formatter ] ( $ this -> credentials ( $ relationship ) ) ; }
Returns credentials for the specified relationship as formatted by the specified formatter.

@param string relationship
The relationship whose credentials should be formatted.
@param string formatter
The registered formatter to use.  This must match a formatter previously registered
with registerFormatter().
@return mixed
The credentials formatted with the given formatter.
@throws NoCredentialFormatterFoundException
Returns credentials for the specified relationship as formatted by the specified formatter .