Passed
Push — master ( f31336...47fe76 )
by Jan
05:11
created
src/Security/Annotations/ColumnSecurity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function getReadOperationName() : string
76 76
     {
77
-        if($this->prefix !== '') {
78
-            return $this->prefix . '.' . $this->read;
77
+        if ($this->prefix !== '') {
78
+            return $this->prefix.'.'.$this->read;
79 79
         }
80 80
         return $this->read;
81 81
     }
82 82
 
83 83
     public function getEditOperationName() : string
84 84
     {
85
-        if($this->prefix !== '') {
86
-            return $this->prefix . '.' . $this->edit;
85
+        if ($this->prefix !== '') {
86
+            return $this->prefix.'.'.$this->edit;
87 87
         }
88 88
 
89 89
         return $this->edit;
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function getPlaceholder()
93 93
     {
94
-        if($this->placeholder === null)
94
+        if ($this->placeholder === null)
95 95
         {
96
-            switch($this->type)
96
+            switch ($this->type)
97 97
             {
98 98
                 case 'integer':
99 99
                     return 0;
Please login to merge, or discard this patch.
src/Security/EntityListeners/ElementPermissionListener.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $properties = $reflectionClass->getProperties();
76 76
         $reader = new AnnotationReader();
77 77
 
78
-        foreach($properties as $property)
78
+        foreach ($properties as $property)
79 79
         {
80 80
             /**
81 81
              * @var ColumnSecurity $annotation
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
             $annotation = $reader->getPropertyAnnotation($property,
84 84
                 ColumnSecurity::class);
85 85
 
86
-            if($annotation !== null)
86
+            if ($annotation !== null)
87 87
             {
88 88
                 //Check if user is allowed to read info, otherwise apply placeholder
89
-                if(!$this->security->isGranted($annotation->getReadOperationName(), $element))
89
+                if (!$this->security->isGranted($annotation->getReadOperationName(), $element))
90 90
                 {
91 91
                     $property->setAccessible(true);
92 92
                     $property->setValue($element, $annotation->getPlaceholder());
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $properties = $reflectionClass->getProperties();
107 107
         $reader = new AnnotationReader();
108 108
 
109
-        foreach($properties as $property)
109
+        foreach ($properties as $property)
110 110
         {
111 111
             /**
112 112
              * @var ColumnSecurity $annotation
@@ -114,13 +114,13 @@  discard block
 block discarded – undo
114 114
             $annotation = $reader->getPropertyAnnotation($property,
115 115
                 ColumnSecurity::class);
116 116
 
117
-            if($annotation !== null)
117
+            if ($annotation !== null)
118 118
             {
119 119
                 $field_name = $property->getName();
120 120
 
121 121
                 //Check if user is allowed to edit info, otherwise overwrite the new value
122 122
                 // so that nothing is changed in the DB.
123
-                if($event->hasChangedField($field_name) &&
123
+                if ($event->hasChangedField($field_name) &&
124 124
                     !$this->security->isGranted($annotation->getEditOperationName(), $element))
125 125
                 {
126 126
                     $event->setNewValue($field_name, $event->getOldValue($field_name));
Please login to merge, or discard this patch.