SymfonyGuess::getPossiblePatterns()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
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