Completed
Push — master ( ab60f2...c901a1 )
by Ricardo
07:00
created

Docker::isDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fabrica\Task\External\Shell;
4
5
/**
6
 * Ln Criar Link Simbolico
7
 */
8
9
class Docker
10
{
11
    protected $path = false;
12
13
    protected $directory = false;
14
    
15
    public function isDirectory()
16
    {
17
        return $this->directory;
18
    }
19
    
20
    /**
21
     *  Isto irá remover imagens não marcadas (com tag `<none>`), 
22
     *  que são as folhas da árvore de imagens (não camadas intermediárias).
23
     */
24
    public function forceRemoveImages($target)
0 ignored issues
show
Unused Code introduced by
The parameter $target is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
        return 'docker rmi $(docker images -q -f "dangling=true")';
27
    }
28
    
29
    //Para remover todas as images acrescente a opção “-a” ou “–all”.
30
    public function move($target)
0 ignored issues
show
Unused Code introduced by
The parameter $target is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        return 'docker rmi $(docker images -q -a)';
33
    }
34
    
35
    //
36
    //  Para remover todas as images incluindo as que estão sendo utilizadas por containers acrescente a opção “-f” ou “–force” após o comando “rmi”.
37
    public function forceRemove($target)
0 ignored issues
show
Unused Code introduced by
The parameter $target is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
38
    {
39
        return 'docker rmi -f $(docker images -q -a)';
40
    }
41
42
    //Para remover apenas containers completos.
43
    public function completeRemove($target)
0 ignored issues
show
Unused Code introduced by
The parameter $target is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
44
    {
45
        return 'docker rm $(docker ps -q -f "status=exited")';
46
    }
47
48
    //Para remover todos os containers, incluindo os que estão rodando.
49
    public function forceRemoveAllCntaneirs($target)
0 ignored issues
show
Unused Code introduced by
The parameter $target is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
50
    {
51
        return 'docker rm -f $(docker ps -q -a)';
52
    }
53
}