src/Output/Products.php
public function show(OutputInterface $output, array $response)
    {
        $this->printList($output,
            ['Name', 'Description', 'Source', 'Archive', 'Key', 'Type', 'License', 'Version', 'Group', 'Updated At'],
            ['name', 'description', 'links', 'archives', 'prod_key', 'prod_type', 'license_info', 'version', 'group_id', 'updated_at'],
            $response,
            function ($heading, $value) {
                if ('Source' === $heading) {
                    if (!empty($value)) {
                        return array_pop($value)['link'];
                    }
                }

                if ('Archive' === $heading) {
                    return array_pop($value)['link'];
                }

                return $value;
            }
        );

        $this->printTable($output,
            ['Name', 'Current', 'Requested'],
            ['name', 'parsed_version', 'version'],
            $response['dependencies']
        );
    }
public function show(OutputInterface $output, array $response)
    {
        $this->printList($output,
            ['Name', 'Description', 'Source', 'Archive', 'Key', 'Type', 'License', 'Version', 'Group', 'Updated At'],
            ['name', 'description', 'links', 'archives', 'prod_key', 'prod_type', 'license_info', 'version', 'group_id', 'updated_at'],
            $response,
            function ($heading, $value) {
                if ('Source' === $heading) {
                    if (!empty($value)) {
                        return array_pop($value)['link'];
                    }
                }

                if ('Archive' === $heading) {
                    return array_pop($value)['link'];
                }

                return $value;
            }
        );

        $this->printTable($output,
            ['Name', 'Current', 'Requested'],
            ['name', 'parsed_version', 'version'],
            $response['dependencies']
        );
    }
public function show ( OutputInterface $ output , array $ response ) { $ this -> printList ( $ output , [ 'Name' , 'Description' , 'Source' , 'Archive' , 'Key' , 'Type' , 'License' , 'Version' , 'Group' , 'Updated At' ] , [ 'name' , 'description' , 'links' , 'archives' , 'prod_key' , 'prod_type' , 'license_info' , 'version' , 'group_id' , 'updated_at' ] , $ response , function ( $ heading , $ value ) { if ( 'Source' === $ heading ) { if ( ! empty ( $ value ) ) { return array_pop ( $ value ) [ 'link' ] ; } } if ( 'Archive' === $ heading ) { return array_pop ( $ value ) [ 'link' ] ; } return $ value ; } ) ; $ this -> printTable ( $ output , [ 'Name' , 'Current' , 'Requested' ] , [ 'name' , 'parsed_version' , 'version' ] , $ response [ 'dependencies' ] ) ; }
output for the show API.

@param OutputInterface $output
@param array           $response
output for the show API .