Test Setup Failed
Push — develop ( fb72f9...afdb67 )
by Joseph
03:04
created

EditDouble   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A edit() 0 9 2
A environment() 0 3 1
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
}