public function getCurrencyCode()
    {
        if (!isset($this->currency, $this->assignment->bank)) {
            return null;
        }

        return CurrencyCode::getInstance([
            'currency' => $this->currency->id,
            'bank' => $this->assignment->bank->id
        ]);
    }
public function getCurrencyCode()
    {
        if (!isset($this->currency, $this->assignment->bank)) {
            return null;
        }

        return CurrencyCode::getInstance([
            'currency' => $this->currency->id,
            'bank' => $this->assignment->bank->id
        ]);
    }
public function getCurrencyCode ( ) { if ( ! isset ( $ this -> currency , $ this -> assignment -> bank ) ) { return null ; } return CurrencyCode :: getInstance ( [ 'currency' => $ this -> currency -> id , 'bank' => $ this -> assignment -> bank -> id ] ) ; }
Returns the correct CurrencyCode

@return CurrencyCode
@return null         If foreigns aren't set
Returns the correct CurrencyCode