Test Failed
Push — master ( 584abf...5520e1 )
by Björn
27:03
created
module/Admin/src/Admin/Controller/ApplicationsController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
 class ApplicationsController extends BaseActionController
24 24
 {
25 25
 	
26
-	/**
27
-	 * @var array|\Admin\Model\ClientsTable
28
-	 */
29
-	protected $clientsTable;
26
+    /**
27
+     * @var array|\Admin\Model\ClientsTable
28
+     */
29
+    protected $clientsTable;
30 30
 	
31
-	/**
32
-	 * @var array|\Admin\Model\ApplicationsTable
33
-	 */
34
-	protected $applicationsTable;
31
+    /**
32
+     * @var array|\Admin\Model\ApplicationsTable
33
+     */
34
+    protected $applicationsTable;
35 35
     
36 36
     /**
37 37
      * initialize titles and toolbar items
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
         $dataObj = array();
84 84
         foreach ($aApplicationslist as $row) {
85 85
             $data[] = $row;
86
-            $dataObj[] = (object)$row;
86
+            $dataObj[] = (object) $row;
87 87
         }
88
-        if ( $this->isXHR() ) {
88
+        if ($this->isXHR()) {
89 89
             $datatablesData = array('data' => $data);
90 90
             $datatablesData['data'] = array_map(
91
-                function ($row) use ($oController) {
91
+                function($row) use ($oController) {
92 92
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
93 93
                     '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
94 94
                         'admin/applicationsedit',
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $applications->exchangeArray($form->getData());
144 144
                 $this->getApplicationsTable()->saveApplication($applications);
145 145
                 $this->flashMessenger()->addSuccessMessage($this->translate('application has been saved'));
146
-                if ( $this->isXHR() ) {
146
+                if ($this->isXHR()) {
147 147
                     $tmplVars["showForm"] = false;
148 148
                 } else {
149 149
                     return $this->redirect()->toRoute('admin/applicationsedit', array('action' => 'index'));
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             return $this->redirect()->toRoute('admin/applicationsedit');
184 184
         }
185 185
 
186
-        $form  = new ApplicationsForm();
186
+        $form = new ApplicationsForm();
187 187
         $form->bind($applications);
188 188
 
189 189
         $clients = $this->getClientsTable()->fetchAll()->toArray();
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             if ($form->isValid()) {
202 202
                 $this->getApplicationsTable()->saveApplication($applications);
203 203
                 $this->flashMessenger()->addSuccessMessage($this->translate("application has been saved"));
204
-                if ( $this->isXHR() ) {
204
+                if ($this->isXHR()) {
205 205
                     $tmplVars["showForm"] = false;
206 206
                 } else {
207 207
                     return $this->redirect()->toRoute('admin/applicationsedit', array('action' => 'index'));
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                 $id = (int) $request->getPost('id');
250 250
                 $this->getApplicationsTable()->deleteApplication($id);
251 251
                 $this->flashMessenger()->addSuccessMessage($this->translate("application has been deleted"));
252
-                if ( $this->isXHR() ) {
252
+                if ($this->isXHR()) {
253 253
                     $tmplVars["showForm"] = false;
254 254
                 } else {
255 255
                     return $this->redirect()->toRoute('admin/applicationsedit', array('action' => 'index'));
Please login to merge, or discard this patch.
module/Admin/src/Admin/Controller/ClientsController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 class ClientsController extends BaseActionController
24 24
 {
25 25
 	
26
-	/**
27
-	 * @var array|\Admin\Model\ClientsTable
28
-	 */
29
-	protected $clientsTable;
26
+    /**
27
+     * @var array|\Admin\Model\ClientsTable
28
+     */
29
+    protected $clientsTable;
30 30
     
31 31
     /**
32 32
      * initialize titles and toolbar items
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $tmplVars = $this->getTemplateVars();
71 71
         $aClientslist = $this->getClientsTable()->fetchAll();
72
-        if ( $this->isXHR() ) {
72
+        if ($this->isXHR()) {
73 73
             $datatablesData = array('data' => $aClientslist->toArray());
74 74
             $oController = $this;
75 75
             $datatablesData['data'] = array_map(
76
-                function ($row) use ($oController) {
76
+                function($row) use ($oController) {
77 77
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
78 78
                         '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
79 79
                             'admin/clientsedit',
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 $clients->exchangeArray($form->getData());
122 122
                 $this->getClientsTable()->saveClients($clients);
123 123
                 $this->flashMessenger()->addSuccessMessage($this->translate('client has been saved'));
124
-                if ( $this->isXHR() ) {
124
+                if ($this->isXHR()) {
125 125
                     $tmplVars["showForm"] = false;
126 126
                 } else {
127 127
                     return $this->redirect()->toRoute('admin/clientsedit', array('action' => 'index'));
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             return $this->redirect()->toRoute('admin/clientsedit');
162 162
         }
163 163
 
164
-        $form  = new ClientsForm();
164
+        $form = new ClientsForm();
165 165
         $form->bind($clients);
166 166
 
167 167
         $request = $this->getRequest();
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             if ($form->isValid()) {
173 173
                 $this->getClientsTable()->saveClients($clients);
174 174
                 $this->flashMessenger()->addSuccessMessage($this->translate("client has been saved"));
175
-                if ( $this->isXHR() ) {
175
+                if ($this->isXHR()) {
176 176
                     $tmplVars["showForm"] = false;
177 177
                 } else {
178 178
                     return $this->redirect()->toRoute('admin/clientsedit', array('action' => 'index'));
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 $id = (int) $request->getPost('id');
222 222
                 $this->getClientsTable()->deleteClients($id);
223 223
                 $this->flashMessenger()->addSuccessMessage($this->translate("client has been deleted"));
224
-                if ( $this->isXHR() ) {
224
+                if ($this->isXHR()) {
225 225
                     $tmplVars["showForm"] = false;
226 226
                 } else {
227 227
                     return $this->redirect()->toRoute('admin/clientsedit', array('action' => 'index'));
Please login to merge, or discard this patch.
module/Admin/src/Admin/Controller/SettingsController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
 class SettingsController extends BaseActionController
24 24
 {
25 25
 	
26
-	/**
27
-	 * @var array|\Admin\Model\SettingsTable
28
-	 */
26
+    /**
27
+     * @var array|\Admin\Model\SettingsTable
28
+     */
29 29
     protected $settingsTable;
30 30
     
31 31
     /**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $tmplVars = $this->getTemplateVars();
71 71
         $aSettingslist = $this->getSettingsTable()->fetchAll();
72
-        if ( $this->isXHR() ) {
72
+        if ($this->isXHR()) {
73 73
             $datatablesData = array('data' => $aSettingslist->toArray());
74 74
             $oController = $this;
75 75
             $datatablesData['data'] = array_map(
76
-                function ($row) use ($oController) {
76
+                function($row) use ($oController) {
77 77
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
78 78
                     '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
79 79
                         'admin/settingsedit',
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 $settings->exchangeArray($form->getData());
122 122
                 $this->getSettingsTable()->saveSettings($settings);
123 123
                 $this->flashMessenger()->addSuccessMessage($this->translate('setting has been saved'));
124
-                if ( $this->isXHR() ) {
124
+                if ($this->isXHR()) {
125 125
                     $tmplVars["showForm"] = false;
126 126
                 } else {
127 127
                     return $this->redirect()->toRoute('admin/settingsedit', array('action' => 'index'));
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             return $this->redirect()->toRoute('admin/settingsedit');
162 162
         }
163 163
 
164
-        $form  = new SettingsForm();
164
+        $form = new SettingsForm();
165 165
         $form->bind($settings);
166 166
 
167 167
         $request = $this->getRequest();
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             if ($form->isValid()) {
173 173
                 $this->getSettingsTable()->saveSettings($settings);
174 174
                 $this->flashMessenger()->addSuccessMessage($this->translate("setting has been saved"));
175
-                if ( $this->isXHR() ) {
175
+                if ($this->isXHR()) {
176 176
                     $tmplVars["showForm"] = false;
177 177
                 } else {
178 178
                     return $this->redirect()->toRoute('admin/settingsedit', array('action' => 'index'));
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 $id = (int) $request->getPost('id');
222 222
                 $this->getSettingsTable()->deleteSettings($id);
223 223
                 $this->flashMessenger()->addSuccessMessage($this->translate("setting has been deleted"));
224
-                if ( $this->isXHR() ) {
224
+                if ($this->isXHR()) {
225 225
                     $tmplVars["showForm"] = false;
226 226
                 } else {
227 227
                     return $this->redirect()->toRoute('admin/settingsedit', array('action' => 'index'));
Please login to merge, or discard this patch.
module/Admin/src/Admin/Form/UserProfileForm.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@
 block discarded – undo
82 82
             array(
83 83
             'name' => 'facebook',
84 84
             'attributes' => array(
85
-                   'type'  => 'url',
86
-               ),
87
-               'options' => array(
88
-                   'label' => 'Facebook',
89
-               ),
85
+                    'type'  => 'url',
86
+                ),
87
+                'options' => array(
88
+                    'label' => 'Facebook',
89
+                ),
90 90
             )
91 91
         );
92 92
         $this->add(
Please login to merge, or discard this patch.
module/Admin/src/Admin/Form/AclroleForm.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@
 block discarded – undo
76 76
             array(
77 77
             'name' => 'reset',
78 78
             'attributes' => array(
79
-                   'type'  => 'reset',
80
-                  'value' => 'reset',
81
-                  'id' => 'resetbutton',
82
-               ),
79
+                    'type'  => 'reset',
80
+                    'value' => 'reset',
81
+                    'id' => 'resetbutton',
82
+                ),
83 83
             'options' => array(
84 84
             'label' => 'reset',
85 85
             ),
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
             array(
30 30
             'name' => 'aclroles_id',
31 31
             'attributes' => array(
32
-            'type'  => 'hidden' ,
32
+            'type'  => 'hidden',
33 33
             ),
34 34
             )
35 35
         );
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/UserTable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
         return $resultSet;
35 35
     }
36 36
 
37
-    public function getUserByEmailOrUsername( $id )
37
+    public function getUserByEmailOrUsername($id)
38 38
     {
39
-        if (empty($id) ) {
39
+        if (empty($id)) {
40 40
             return false;
41 41
         }
42 42
         $resultSet = $this->tableGateway->select(
43
-            function (Select $select) use ($id) {
43
+            function(Select $select) use ($id) {
44 44
                 $select->where(
45 45
                     array(
46 46
                     "username = '".$id."'",
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         'aclrole'        => $user->aclrole,
80 80
         );
81 81
 
82
-        $id = (int)$user->user_id;
82
+        $id = (int) $user->user_id;
83 83
         if ($id == 0) {
84 84
             $this->tableGateway->insert($data);
85 85
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/UserProfileTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         'icq'            => $user->icq,
64 64
         );
65 65
 
66
-        $id = (int)$user->user_id;
66
+        $id = (int) $user->user_id;
67 67
         if ($id == 0) {
68 68
             throw new \Exception('invalid user');
69 69
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/ApplicationsTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function fetchAll($scope = '')
47 47
     {
48 48
         $resultSet = $this->tableGateway->select(
49
-            function (Select $select) use ($scope) {
49
+            function(Select $select) use ($scope) {
50 50
                 if (!empty($scope)) {
51 51
                     $select->where('scope = \''.$scope.'\'')->order('type, name ASC');
52 52
                 } else {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         'client_id'    => $applications->client_id,
102 102
         );
103 103
 
104
-        $id = (int)$applications->application_id;
104
+        $id = (int) $applications->application_id;
105 105
         if ($id == 0) {
106 106
             $this->tableGateway->insert($data);
107 107
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/ClientsTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function fetchAll($scope = '')
32 32
     {
33 33
         $resultSet = $this->tableGateway->select(
34
-            function (Select $select) use ($scope) {
34
+            function(Select $select) use ($scope) {
35 35
                 if (!empty($scope)) {
36 36
                     $select->where('scope = \''.$scope.'\'')->order('type, name ASC');
37 37
                 } else {
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
         return $this->fetchAll('application');
48 48
     }
49 49
 
50
-    public function fetchUser( $id )
50
+    public function fetchUser($id)
51 51
     {
52 52
         if (!$id) { return array(); 
53 53
         }
54 54
         $resultSet = $this->tableGateway->select(
55
-            function (Select $select) use ($id) {
55
+            function(Select $select) use ($id) {
56 56
                 if (!empty($id)) {
57
-                    $select->where(array( '(scope = \'user\') AND (ref_id = \''.((int)$id).'\')' ))->order('type, name ASC');
57
+                    $select->where(array('(scope = \'user\') AND (ref_id = \''.((int) $id).'\')'))->order('type, name ASC');
58 58
                 } else {
59 59
                     $select->order('type, name ASC');
60 60
                 }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         'statistics'    => $clients->statistics,
87 87
         );
88 88
 
89
-        $id = (int)$clients->clients_id;
89
+        $id = (int) $clients->clients_id;
90 90
         if ($id == 0) {
91 91
             $this->tableGateway->insert($data);
92 92
         } else {
Please login to merge, or discard this patch.