dev/src/ComponentManager.php
public function componentsVersion($componentId = null)
    {
        $components = $this->components ?: $this->loadComponents();

        array_walk($components, function (&$component) {
            $component = $component['version'];
        });

        return $componentId
            ? [$componentId => $components[$componentId]]
            : $components;
    }
public function componentsVersion($componentId = null)
    {
        $components = $this->components ?: $this->loadComponents();

        array_walk($components, function (&$component) {
            $component = $component['version'];
        });

        return $componentId
            ? [$componentId => $components[$componentId]]
            : $components;
    }
public function componentsVersion ( $ componentId = null ) { $ components = $ this -> components ? : $ this -> loadComponents ( ) ; array_walk ( $ components , function ( & $ component ) { $ component = $ component [ 'version' ] ; } ) ; return $ componentId ? [ $ componentId => $ components [ $ componentId ] ] : $ components ; }
Get the latest version of each component.

@param string $componentId [optional] If set, only this component's data
will be returned.
@return string[]
Get the latest version of each component .