SymfonyGuess   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 3
c 2
b 1
f 0
lcom 0
cbo 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A suggestPatterns() 0 8 2
A getPossiblePatterns() 0 8 1
1
<?php
2
3
namespace Openl10n\Cli\File\Guess;
4
5
class SymfonyGuess implements PatternGuess
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function suggestPatterns($inDir)
11
    {
12
        if (!is_file($inDir.'/app/AppKernel.php')) {
13
            return [];
14
        }
15
16
        return $this->getPossiblePatterns();
17
    }
18
19
    protected function getPossiblePatterns()
20
    {
21
        return [
22
            'src/*/Bundle/*Bundle/Resources/translations/*.<locale>.*',
23
            'src/*/*Bundle/Resources/translations/*.<locale>.*',
24
            'app/Resources/translations/*.<locale>.*',
25
        ];
26
    }
27
}
28