Test Setup Failed
Branch develop (afdb67)
by Joseph
05:47 queued 02:50
created

EditDouble::environment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Tests;
4
5
use STS\EnvSecurity\Console\Edit;
6
7
/**
8
 * Test double for our Edit command
9
 */
10
class EditDouble extends Edit
11
{
12
    protected $signature = 'env:edit {environment : Which environment file you wish to decrypt} {--append=}';
13
14
    protected function environment()
15
    {
16
        return "testing";
17
    }
18
19
    protected function edit($contents)
20
    {
21
        $this->info('Plaintext contents: ' . $contents);
22
23
        if($this->option('append')) {
24
            $contents = trim($contents . " " . $this->option('append'));
25
        }
26
27
        return $contents;
28
    }
29
}