Completed
Push — master ( 148650...0fb3ed )
by Bill
10s
created

TableBuilder::outputTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Bmitch\Envsync\Builders;
4
5
use Symfony\Component\Console\Helper\Table;
6
use Symfony\Component\Console\Output\ConsoleOutput;
7
8
class TableBuilder
9
{
10
    /**
11
     * Takes the provided $data and outputs a table on the console output.
12
     * @param  array $data Enviroment variable results data.
13
     * @return void
14
     */
15
    public function outputTable(array $data)
16
    {
17
        $headers = ['Variable', 'In Source', 'In .env.example', 'In .env'];
18
19
        $table = new Table(new ConsoleOutput);
20
21
        $table->setHeaders($headers)->setRows($data)->render();
22
    }
23
}
24