@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | $userId = $this->_authSession->getUser()->getId(); |
31 | 31 | $config = $this->_configRepository->getByUserId($userId); |
32 | - if($config->getData('use_devdashboard')) { |
|
32 | + if ($config->getData('use_devdashboard')) { |
|
33 | 33 | return 'devdashboard/index/index'; |
34 | 34 | } |
35 | 35 | else { |
@@ -31,8 +31,7 @@ |
||
31 | 31 | $config = $this->_configRepository->getByUserId($userId); |
32 | 32 | if($config->getData('use_devdashboard')) { |
33 | 33 | return 'devdashboard/index/index'; |
34 | - } |
|
35 | - else { |
|
34 | + } else { |
|
36 | 35 | return $callable(); |
37 | 36 | } |
38 | 37 |
@@ -7,9 +7,9 @@ |
||
7 | 7 | { |
8 | 8 | |
9 | 9 | protected $_whitelist =[ |
10 | - 'user_id', |
|
11 | - 'configuration', |
|
12 | - 'use_devdashboard' |
|
10 | + 'user_id', |
|
11 | + 'configuration', |
|
12 | + 'use_devdashboard' |
|
13 | 13 | ]; |
14 | 14 | |
15 | 15 | protected $_configRepository; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | class SaveConfig |
7 | 7 | { |
8 | 8 | |
9 | - protected $_whitelist =[ |
|
9 | + protected $_whitelist = [ |
|
10 | 10 | 'user_id', |
11 | 11 | 'configuration', |
12 | 12 | 'use_devdashboard' |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $filtered = []; |
64 | 64 | |
65 | - foreach($this->_whitelist as $key) { |
|
65 | + foreach ($this->_whitelist as $key) { |
|
66 | 66 | $filtered[$key] = $data[$key]; |
67 | 67 | } |
68 | 68 | return $filtered; |
@@ -4,6 +4,6 @@ |
||
4 | 4 | { |
5 | 5 | protected function _construct() |
6 | 6 | { |
7 | - $this->_init('Firegento\DevDashboard\Model\Config','Firegento\DevDashboard\Model\ResourceModel\Config'); |
|
7 | + $this->_init('Firegento\DevDashboard\Model\Config', 'Firegento\DevDashboard\Model\ResourceModel\Config'); |
|
8 | 8 | } |
9 | 9 | } |
@@ -4,6 +4,6 @@ |
||
4 | 4 | { |
5 | 5 | protected function _construct() |
6 | 6 | { |
7 | - $this->_init('firegento_devdashboard_config','firegento_devdashboard_config_id'); |
|
7 | + $this->_init('firegento_devdashboard_config', 'firegento_devdashboard_config_id'); |
|
8 | 8 | } |
9 | 9 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | 'firegento_devdashboard_config_id', |
26 | 26 | Table::TYPE_INTEGER, |
27 | 27 | null, |
28 | - ['identity' => true, 'nullable' => false, 'primary' => true, 'unsigned' => true,], |
|
28 | + ['identity' => true, 'nullable' => false, 'primary' => true, 'unsigned' => true, ], |
|
29 | 29 | 'Entity ID' |
30 | 30 | )->addColumn( |
31 | 31 | 'user_id', |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | 'creation_time', |
38 | 38 | Table::TYPE_TIMESTAMP, |
39 | 39 | null, |
40 | - ['nullable' => false, 'default' => Table::TIMESTAMP_INIT,], |
|
40 | + ['nullable' => false, 'default' => Table::TIMESTAMP_INIT, ], |
|
41 | 41 | 'Creation Time' |
42 | 42 | )->addColumn( |
43 | 43 | 'update_time', |
44 | 44 | Table::TYPE_TIMESTAMP, |
45 | 45 | null, |
46 | - ['nullable' => false, 'default' => Table::TIMESTAMP_INIT_UPDATE,], |
|
46 | + ['nullable' => false, 'default' => Table::TIMESTAMP_INIT_UPDATE, ], |
|
47 | 47 | 'Modification Time' |
48 | 48 | )->addColumn( |
49 | 49 | 'configuration', |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | 'use_devdashboard', |
56 | 56 | Table::TYPE_SMALLINT, |
57 | 57 | null, |
58 | - ['nullable' => false, 'default' => '0',], |
|
58 | + ['nullable' => false, 'default' => '0', ], |
|
59 | 59 | 'Use Developer Dashboard' |
60 | 60 | )->addColumn( |
61 | 61 | 'is_active', |
62 | 62 | Table::TYPE_SMALLINT, |
63 | 63 | null, |
64 | - ['nullable' => false, 'default' => '1',], |
|
64 | + ['nullable' => false, 'default' => '1', ], |
|
65 | 65 | 'Use Developer Dashboard' |
66 | 66 | )->addForeignKey( |
67 | 67 | $installer->getFkName( |