Passed
Push — master ( a26db6...b381e6 )
by Björn
04:01 queued 11s
created
module/Admin/src/Admin/Model/SettingsTable.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
                 }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         'value'        => $settings->value,
85 85
         );
86 86
 
87
-        $id = (int)$settings->settings_id;
87
+        $id = (int) $settings->settings_id;
88 88
         if ($id == 0) {
89 89
             $this->tableGateway->insert($data);
90 90
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/AclroleTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function fetchAll()
32 32
     {
33 33
         $resultSet = $this->tableGateway->select(
34
-            function (Select $select) {
34
+            function(Select $select) {
35 35
                 $select->order('roleslug ASC');
36 36
             }
37 37
         );
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function getAclroleBySlug($role_slug)
53 53
     {
54
-        $role_slug  = trim(strip_tags($role_slug));
54
+        $role_slug = trim(strip_tags($role_slug));
55 55
         $rowset = $this->tableGateway->select(
56 56
             array(
57 57
             'roleslug' => $role_slug,    
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         'rolename'            => $Aclrole->rolename,
72 72
         );
73 73
 
74
-        $id = (int)$Aclrole->aclroles_id;
74
+        $id = (int) $Aclrole->aclroles_id;
75 75
         if ($id == 0) {
76 76
             $this->tableGateway->insert($data);
77 77
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/AclresourceTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function fetchAll()
32 32
     {
33 33
         $resultSet = $this->tableGateway->select(
34
-            function (Select $select) {
34
+            function(Select $select) {
35 35
                 $select->order('resourceslug ASC');
36 36
             }
37 37
         );
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function getAclresourceBySlug($resource_slug)
53 53
     {
54
-        $resource_slug  = trim(strip_tags($resource_slug));
54
+        $resource_slug = trim(strip_tags($resource_slug));
55 55
         $rowset = $this->tableGateway->select(
56 56
             array(
57 57
             'resourceslug' => $resource_slug,    
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         'resourcename'            => $Aclresource->resourcename,
72 72
         );
73 73
 
74
-        $id = (int)$Aclresource->aclresources_id;
74
+        $id = (int) $Aclresource->aclresources_id;
75 75
         if ($id == 0) {
76 76
             $this->tableGateway->insert($data);
77 77
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/AclTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         'state'                    => $Acl->state,
71 71
         );
72 72
 
73
-        $id = (int)$Acl->acl_id;
73
+        $id = (int) $Acl->acl_id;
74 74
         if ($id == 0) {
75 75
             $this->tableGateway->insert($data);
76 76
         } else {
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/Acl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
     
35 35
     public function exchangeArray($data)
36 36
     {
37
-        $this->acl_id            = (isset($data['acl_id'])) ? $data['acl_id'] : null;
37
+        $this->acl_id = (isset($data['acl_id'])) ? $data['acl_id'] : null;
38 38
         $this->aclroles_id        = (isset($data['aclroles_id'])) ? $data['aclroles_id'] : null;
39 39
         $this->aclresources_id    = (isset($data['aclresources_id'])) ? $data['aclresources_id'] : null;
40
-        $this->state            = (isset($data['state'])) ? $data['state'] : null;
40
+        $this->state = (isset($data['state'])) ? $data['state'] : null;
41 41
     }
42 42
 
43 43
     public function getArrayCopy()
Please login to merge, or discard this patch.
module/Admin/src/Admin/Model/Aclrole.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     
34 34
     public function exchangeArray($data)
35 35
     {
36
-        $this->aclroles_id    = (isset($data['aclroles_id'])) ? $data['aclroles_id'] : null;
36
+        $this->aclroles_id = (isset($data['aclroles_id'])) ? $data['aclroles_id'] : null;
37 37
         $this->roleslug        = (isset($data['roleslug'])) ? $data['roleslug'] : null;
38 38
         $this->rolename        = (isset($data['rolename'])) ? $data['rolename'] : null;
39 39
     }
Please login to merge, or discard this patch.
module/Admin/src/Admin/View/Helper/isallowed.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
      * @access public
31 31
      * @return \ZfcUser\Entity\UserInterface
32 32
      */
33
-    public function __invoke( $resource )
33
+    public function __invoke($resource)
34 34
     {
35 35
         /**
36 36
  * @var Zend\Permissions\Acl\Acl $acl 
37 37
 **/
38 38
         $acl = $this->view->navigation()->getAcl();
39
-        if (empty($resource) || !$acl->hasResource($resource) ) {
39
+        if (empty($resource) || !$acl->hasResource($resource)) {
40 40
             return true;
41 41
         }    
42 42
         /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         } else {
50 50
             $role = 'public';
51 51
         }
52
-        return ( $acl->isAllowed($role, $resource) );
52
+        return ($acl->isAllowed($role, $resource));
53 53
     }
54 54
     
55 55
     /**
Please login to merge, or discard this patch.
module/Admin/src/Admin/View/Helper/isdenied.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
      * @access public
31 31
      * @return \ZfcUser\Entity\UserInterface
32 32
      */
33
-    public function __invoke( $resource )
33
+    public function __invoke($resource)
34 34
     {
35 35
         /**
36 36
  * @var \Zend\Permissions\Acl\Acl $acl 
37 37
 **/
38 38
         $acl = $this->view->navigation()->getAcl();
39
-        if (empty($resource) || !$acl->hasResource($resource) ) {
39
+        if (empty($resource) || !$acl->hasResource($resource)) {
40 40
             return true;
41 41
         }    
42 42
         /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         } else {
50 50
             $role = 'public';
51 51
         }
52
-        return ( !$acl->isAllowed($role, $resource) );
52
+        return (!$acl->isAllowed($role, $resource));
53 53
     }
54 54
     
55 55
     /**
Please login to merge, or discard this patch.
module/Application/src/Examples/Controller/JsonResultController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             array(
66 66
             'html' => $htmlOutput,
67 67
             'jsonVar1' => 'jsonVal2',
68
-            'jsonArray' => array(1,2,3,4,5,6)
68
+            'jsonArray' => array(1, 2, 3, 4, 5, 6)
69 69
             )
70 70
         );
71 71
     
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         'jsonArray' => array(1, 2, 3, 4, 5, 6)
85 85
         );
86 86
         $isAjax = $this->getRequest()->isXmlHttpRequest();
87
-        return isAjax?new JsonModel($data):new ViewModel($data);
87
+        return isAjax ? new JsonModel($data) : new ViewModel($data);
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.