src/Charcoal/Property/ObjectProperty.php
protected function parseChoices($objs)
    {
        if (!is_array($objs) && !$objs instanceof Traversable) {
            throw new InvalidArgumentException('Must be iterable');
        }

        $parsed = [];
        foreach ($objs as $choice) {
            $choice = $this->parseChoice($choice);
            if ($choice !== null) {
                $choiceIdent = $choice['value'];
                $parsed[$choiceIdent] = $choice;
            }
        }

        return $parsed;
    }
protected function parseChoices($objs)
    {
        if (!is_array($objs) && !$objs instanceof Traversable) {
            throw new InvalidArgumentException('Must be iterable');
        }

        $parsed = [];
        foreach ($objs as $choice) {
            $choice = $this->parseChoice($choice);
            if ($choice !== null) {
                $choiceIdent = $choice['value'];
                $parsed[$choiceIdent] = $choice;
            }
        }

        return $parsed;
    }
protected function parseChoices ( $ objs ) { if ( ! is_array ( $ objs ) && ! $ objs instanceof Traversable ) { throw new InvalidArgumentException ( 'Must be iterable' ) ; } $ parsed = [ ] ; foreach ( $ objs as $ choice ) { $ choice = $ this -> parseChoice ( $ choice ) ; if ( $ choice !== null ) { $ choiceIdent = $ choice [ 'value' ] ; $ parsed [ $ choiceIdent ] = $ choice ; } } return $ parsed ; }
Parse the given objects into choice structures.

@param  ModelInterface[]|Traversable $objs One or more objects to format.
@throws InvalidArgumentException If the collection of objects is not iterable.
@return array Returns a collection of choice structures.
Parse the given objects into choice structures .