public function licenses(OutputInterface $output, array $response)
    {
        $table = $this->createTable($output);
        $table->setHeaders(['license', 'name']);

        foreach ($response['licenses'] as $license => $projects) {
            foreach ($projects as $project) {
                $name    = $license === 'unknown' ? '<error>' . $project['name'] . '</error>' : $project['name'];
                $license = $license === 'unknown' ? '<error>unknown</error>' : $license;

                $table->addRow([$license, $name]);
            }
        }

        $table->render($output);
    }
public function licenses(OutputInterface $output, array $response)
    {
        $table = $this->createTable($output);
        $table->setHeaders(['license', 'name']);

        foreach ($response['licenses'] as $license => $projects) {
            foreach ($projects as $project) {
                $name    = $license === 'unknown' ? '<error>' . $project['name'] . '</error>' : $project['name'];
                $license = $license === 'unknown' ? '<error>unknown</error>' : $license;

                $table->addRow([$license, $name]);
            }
        }

        $table->render($output);
    }
public function licenses ( OutputInterface $ output , array $ response ) { $ table = $ this -> createTable ( $ output ) ; $ table -> setHeaders ( [ 'license' , 'name' ] ) ; foreach ( $ response [ 'licenses' ] as $ license => $ projects ) { foreach ( $ projects as $ project ) { $ name = $ license === 'unknown' ? '<error>' . $ project [ 'name' ] . '</error>' : $ project [ 'name' ] ; $ license = $ license === 'unknown' ? '<error>unknown</error>' : $ license ; $ table -> addRow ( [ $ license , $ name ] ) ; } } $ table -> render ( $ output ) ; }
output for licenses API.

@param OutputInterface $output
@param array           $response
output for licenses API .