Passed
Pull Request — master (#203)
by
unknown
09:33
created
Classes/Security/Security.php 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 use EWW\Dpf\Domain\Model\FrontendUser;
18 18
 use EWW\Dpf\Domain\Model\FrontendUserGroup;
19 19
 
20
-class Security
21
-{
20
+class Security {
22 21
     /**
23 22
      * frontendUserRepository
24 23
      *
@@ -45,8 +44,7 @@  discard block
 block discarded – undo
45 44
      *
46 45
      * @return null|\EWW\Dpf\Domain\Model\FrontendUser
47 46
      */
48
-    public function getUser()
49
-    {
47
+    public function getUser() {
50 48
         $token = $GLOBALS['_GET']['tx_dpf_rest_api']['token'];
51 49
         $user = $GLOBALS['TSFE']->fe_user->user;
52 50
         if (!empty($user) && is_array($user) && array_key_exists('uid', $user)) {
@@ -87,8 +85,7 @@  discard block
 block discarded – undo
87 85
      * Gets the role of the current frontend user
88 86
      * @return string
89 87
      */
90
-    public function getUserRole()
91
-    {
88
+    public function getUserRole() {
92 89
         if ($this->getUser()) {
93 90
             return $this->getUser()->getUserRole();
94 91
         }
@@ -99,8 +96,7 @@  discard block
 block discarded – undo
99 96
      * Gets the name of the current frontend user
100 97
      * @return string
101 98
      */
102
-    public function getUsername()
103
-    {
99
+    public function getUsername() {
104 100
         if ($this->getUser()) {
105 101
             return $this->getUser()->getUsername();
106 102
         }
@@ -111,8 +107,7 @@  discard block
 block discarded – undo
111 107
      * Gets the fis person id of the current frontend user
112 108
      * @return string
113 109
      */
114
-    public function getFisPersId()
115
-    {
110
+    public function getFisPersId() {
116 111
         if ($this->getUser()) {
117 112
             return $this->getUser()->getFisPersId();
118 113
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @var \EWW\Dpf\Domain\Repository\FrontendUserRepository
26 26
      * @TYPO3\CMS\Extbase\Annotation\Inject
27 27
      */
28
-    protected $frontendUserRepository = null;
28
+    protected $frontendUserRepository = NULL;
29 29
 
30 30
     /**
31 31
      * frontendUserGroupRepository
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @var \EWW\Dpf\Domain\Repository\FrontendUserGroupRepository
34 34
      * @TYPO3\CMS\Extbase\Annotation\Inject
35 35
      */
36
-    protected $frontendUserGroupRepository = null;
36
+    protected $frontendUserGroupRepository = NULL;
37 37
 
38 38
     const ROLE_ANONYMOUS = "ROLE_ANONYMOUS";
39 39
     const ROLE_RESEARCHER = "ROLE_RESEARCHER";
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 $accessToIds = array_merge($accessToIds, explode(',', $userGroup->getAccessToGroups()));
76 76
             }
77 77
             if (empty($accessToIds[0])) {
78
-                return null;
78
+                return NULL;
79 79
             } else {
80 80
                 return $accessToIds;
81 81
             }
Please login to merge, or discard this patch.
Classes/Domain/Model/FrontendUserGroup.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
 * Frontend user group
19 19
 */
20
-class FrontendUserGroup extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup
21
-{
20
+class FrontendUserGroup extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup {
22 21
     /**
23 22
      * Gets the kitodo role
24 23
      *
@@ -32,8 +31,7 @@  discard block
 block discarded – undo
32 31
      */
33 32
     protected $accessToGroups = '';
34 33
 
35
-    public function getKitodoRole()
36
-    {
34
+    public function getKitodoRole() {
37 35
         return $this->kitodoRole;
38 36
     }
39 37
 
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
      *
43 41
      * @param $kitodoRole
44 42
      */
45
-    public function setKitodoRole($kitodoRole)
46
-    {
43
+    public function setKitodoRole($kitodoRole) {
47 44
         $this->kitodoRole = $kitodoRole;
48 45
     }
49 46
 
Please login to merge, or discard this patch.