Passed
Push — master ( ef2bc9...940364 )
by
unknown
04:03
created
src/Plugin/SaveConfig.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Model/ResourceModel/Config/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Model/ResourceModel/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Setup/UpgradeSchema.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/Controller/Adminhtml/Ajax/Getconfig.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@
 block discarded – undo
74 74
             }
75 75
         }
76 76
         catch (\Exception $e) {
77
-          $message = [
78
-              'success' => false,
79
-              'mesage' => $e->getMessage()
80
-          ];
77
+            $message = [
78
+                'success' => false,
79
+                'mesage' => $e->getMessage()
80
+            ];
81 81
         }
82 82
 
83 83
         /** @var \Magento\Framework\Controller\Result\Json $result */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         try {
65 65
             /** @var  Config $config */
66 66
             $config = $this->_configRepository->getByUserId($userId);
67
-            if($config->getId()){
67
+            if ($config->getId()) {
68 68
                 $message = [
69 69
                     'success' => true,
70 70
                     'user_id' => $config->getData('user_id'),
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@
 block discarded – undo
72 72
                     'configuration' => $config->getData('configuration')
73 73
                 ];
74 74
             }
75
-        }
76
-        catch (\Exception $e) {
75
+        } catch (\Exception $e) {
77 76
           $message = [
78 77
               'success' => false,
79 78
               'mesage' => $e->getMessage()
Please login to merge, or discard this patch.
src/Controller/Adminhtml/Ajax/Setconfig.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $configuration = $this->getRequest()->getParam('configuration');
48 48
         $useDevdashboard = $this->getRequest()->getParam('use_devdashboard');
49 49
 
50
-        if($configuration === null || $useDevdashboard === null) {
50
+        if ($configuration === null || $useDevdashboard === null) {
51 51
             $message = [
52 52
                 'success' => false,
53 53
                 'message' => 'You should at least give configuration or dev-dashboard'
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
                 /** @var Config $config */
61 61
                 $config = $this->_configRepository->getByUserId($userId);
62 62
 
63
-                if($configuration !== null) {
63
+                if ($configuration !== null) {
64 64
                     $config->setData('configuration', $configuration);
65 65
                 }
66 66
 
67
-                if($useDevdashboard !== null) {
67
+                if ($useDevdashboard !== null) {
68 68
                     $config->setData('use_devdashboard', $useDevdashboard);
69 69
                 }
70 70
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
                 'success' => false,
53 53
                 'message' => 'You should at least give configuration or dev-dashboard'
54 54
             ];
55
-        }
56
-        else {
55
+        } else {
57 56
             $userId = $this->_authSession->getUser()->getId();
58 57
             try {
59 58
 
Please login to merge, or discard this patch.
src/Plugin/UseDevDashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
         /** @var Config $config */
41 41
         $config = $this->_configRepository->getByUserId($userId);
42
-        if($config->getData('use_devdashboard')) {
42
+        if ($config->getData('use_devdashboard')) {
43 43
             return 'devdashboard/index/index';
44 44
         }
45 45
 
Please login to merge, or discard this patch.