Completed
Pull Request — develop (#817)
by Robbie
04:29
created

TemplateHintsCommand::_afterSave()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace N98\Magento\Command\Developer;
4
5
use N98\Magento\Command\AbstractMagentoStoreConfigCommand;
6
7 View Code Duplication
class TemplateHintsCommand extends AbstractMagentoStoreConfigCommand
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $commandName = 'dev:template-hints';
13
14
    /**
15
     * @var string
16
     */
17
    protected $commandDescription = 'Toggles template hints';
18
19
    /**
20
     * @var string
21
     */
22
    protected $toggleComment = 'Template Hints';
23
24
    /**
25
     * @var string
26
     */
27
    protected $configPath = 'dev/debug/template_hints';
28
29
    /**
30
     * @var string
31
     */
32
    protected $scope = self::SCOPE_STORE_VIEW;
33
34
    /**
35
     * Add admin store to interactive prompt
36
     *
37
     * @var bool
38
     */
39
    protected $withAdminStore = true;
40
41
    /**
42
     * If required, handle the output and possible change of the developer IP restrictions
43
     *
44
     * @param \Mage_Core_Model_Store $store
45
     * @param bool $disabled
46
     */
47
    protected function _afterSave(\Mage_Core_Model_Store $store, $disabled)
48
    {
49
        $this->detectAskAndSetDeveloperIp($store, $disabled);
50
    }
51
}
52