public function getInterests(array $interests): array
    {
        $tokens = [];

        foreach ($interests as $interest) {
            $retrieved = $this->repository->retrieve($interest);

            if (!is_null($retrieved)) {
                if(is_string($retrieved)) {
                    $tokens[] = $retrieved;
                }

                if(is_array($retrieved)) {
                    foreach($retrieved as $token) {
                        if(is_string($token)) {
                            $tokens[] = $token;
                        }
                    }
                }
            }
        }

        if (empty($tokens)) {
            throw ExpoRegistrarException::emptyInterests();
        }

        return $tokens;
    }
public function getInterests(array $interests): array
    {
        $tokens = [];

        foreach ($interests as $interest) {
            $retrieved = $this->repository->retrieve($interest);

            if (!is_null($retrieved)) {
                if(is_string($retrieved)) {
                    $tokens[] = $retrieved;
                }

                if(is_array($retrieved)) {
                    foreach($retrieved as $token) {
                        if(is_string($token)) {
                            $tokens[] = $token;
                        }
                    }
                }
            }
        }

        if (empty($tokens)) {
            throw ExpoRegistrarException::emptyInterests();
        }

        return $tokens;
    }
public function getInterests ( array $ interests ) : array { $ tokens = [ ] ; foreach ( $ interests as $ interest ) { $ retrieved = $ this -> repository -> retrieve ( $ interest ) ; if ( ! is_null ( $ retrieved ) ) { if ( is_string ( $ retrieved ) ) { $ tokens [ ] = $ retrieved ; } if ( is_array ( $ retrieved ) ) { foreach ( $ retrieved as $ token ) { if ( is_string ( $ token ) ) { $ tokens [ ] = $ token ; } } } } } if ( empty ( $ tokens ) ) { throw ExpoRegistrarException :: emptyInterests ( ) ; } return $ tokens ; }
Gets the tokens of the interests

@param array $interests

@throws ExpoRegistrarException

@return array
Gets the tokens of the interests