DictionaryController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A syncAction() 0 7 1
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 *
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 *
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Bundle\AppBundle\Controller\Admin;
14
15
use Symfony\Component\HttpFoundation\RedirectResponse;
16
use WellCommerce\Bundle\AppBundle\Manager\DictionaryManager;
17
use WellCommerce\Bundle\CoreBundle\Controller\Admin\AbstractAdminController;
18
19
/**
20
 * Class DictionaryController
21
 *
22
 * @author  Adam Piotrowski <[email protected]>
23
 */
24
class DictionaryController extends AbstractAdminController
25
{
26
    /**
27
     * @var DictionaryManager
28
     */
29
    protected $manager;
30
    
31
    public function syncAction() : RedirectResponse
32
    {
33
        $this->manager->syncDictionary();
34
        $this->manager->getFlashHelper()->addSuccess('translation.flashes.success.synchronization');
0 ignored issues
show
Bug introduced by
The method getFlashHelper() cannot be called from this context as it is declared protected in class WellCommerce\Bundle\Core...\AbstractContainerAware.

This check looks for access to methods that are not accessible from the current context.

If you need to make a method accessible to another context you can raise its visibility level in the defining class.

Loading history...
35
        
36
        return $this->redirectToAction('index');
37
    }
38
}
39