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

TableBuilder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A outputTable() 0 8 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