Filesystem   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 13.03%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 10
lcom 1
cbo 1
dl 0
loc 76
ccs 3
cts 23
cp 0.1303
rs 10
c 1
b 0
f 1

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fetchTranslation() 0 6 2
A updateTranslation() 0 4 1
A flagTranslation() 0 3 1
A createAsset() 0 3 1
A downloadAllTranslations() 0 3 1
A importAllTranslations() 0 3 1
A synchronizeAllTranslations() 0 3 1
A uploadAllTranslations() 0 3 1
1
<?php
2
3
namespace Happyr\TranslationBundle\Service;
4
5
use Happyr\TranslationBundle\Model\Message;
6
use Happyr\TranslationBundle\Translation\FilesystemUpdater;
7
8
class Filesystem implements TranslationServiceInterface
9
{
10
    /**
11
     * @var FilesystemUpdater filesystemService
12
     */
13
    private $filesystemService;
14
15
    /**
16
     *
17
     * @param FilesystemUpdater $filesystemService
18
     */
19 1
    public function __construct(FilesystemUpdater $filesystemService)
20
    {
21 1
        $this->filesystemService = $filesystemService;
22 1
    }
23
24
    /**
25
     * @inheritDoc
26
     */
27
    public function fetchTranslation(Message $message, $updateFs = false)
28
    {
29
        if ($updateFs) {
30
            $this->filesystemService->updateMessageCatalog([$message]);
31
        }
32
    }
33
34
    /**
35
     * @inheritDoc
36
     */
37
    public function updateTranslation(Message $message)
38
    {
39
        $this->filesystemService->updateMessageCatalog([$message]);
40
    }
41
42
    /**
43
     * @inheritDoc
44
     */
45
    public function flagTranslation(Message $message, $type = 0)
46
    {
47
    }
48
49
    /**
50
     * @inheritDoc
51
     */
52
    public function createAsset(Message $message)
53
    {
54
    }
55
56
    /**
57
     * @inheritDoc
58
     */
59
    public function downloadAllTranslations()
60
    {
61
    }
62
63
    /**
64
     * @inheritDoc
65
     */
66
    public function importAllTranslations()
67
    {
68
    }
69
70
    /**
71
     * @inheritDoc
72
     */
73
    public function synchronizeAllTranslations()
74
    {
75
    }
76
77
    /**
78
     * @inheritDoc
79
     */
80
    public function uploadAllTranslations()
81
    {
82
    }
83
}
84