WhitespaceCompactor   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A supports() 0 4 2
1
<?php
2
3
/*
4
 * This file is part of Rocketeer
5
 *
6
 * (c) Maxime Fabre <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 */
12
13
namespace Rocketeer\Console\Compilation;
14
15
use Herrera\Box\Compactor\Php;
16
17
/**
18
 * Strips out whitespace in the Rocketeer file
19
 * before the PHAR compilation.
20
 */
21
class WhitespaceCompactor extends Php
22
{
23
    /**
24
     * Checks whether a given file is to be stripped or not
25
     * Configuration file are left as is.
26
     *
27
     * @param string $file
28
     *
29
     * @return bool
30
     */
31
    public function supports($file)
32
    {
33
        return dirname($file) !== 'src/config' && parent::supports($file);
34
    }
35
}
36