Completed
Push — develop ( 911e58...200791 )
by Carsten
13s
created
module/Core/src/Entity/AddressInterface.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,6 @@
 block discarded – undo
55 55
      * Two-letter codes from the ISO 3166 standard as implemented by The Internet Assigned
56 56
      * Numbers Authority.
57 57
      *
58
-     * @param string $postalCode {'AC'|'AD'|'AE'|'AF'|'AG'|'AI'|'AL'|'AM'|'AN'|'AO'|'AQ'|'AR'|'AS'|'AT'|'AU'|'AW'|'AX'|'AZ'|'BA'|'BB'|'BD'|'BE'|'BF'|'BG'|'BH'|'BI'|'BJ'|'BL'|'BM'|'BN'|'BO'|'BR'|'BS'|'BT'|'BV'|'BW'|'BY'|'BZ'|'CA'|'CC'|'CD'|'CF'|'CG'|'CH'|'CI'|'CK'|'CL'|'CM'|'CN'|'CO'|'CR'|'CU'|'CV'|'CX'|'CY'|'CZ'|'DE'|'DJ'|'DK'|'DM'|'DO'|'DZ'|'EC'|'EE'|'EG'|'EH'|'ER'|'ES'|'ET'|'EU'|'FI'|'FJ'|'FK'|'FM'|'FO'|'FR'|'GA'|'GB'|'GD'|'GE'|'GF'|'GG'|'GH'|'GI'|'GL'|'GM'|'GN'|'GP'|'GQ'|'GR'|'GS'|'GT'|'GU'|'GW'|'GY'|'HK'|'HM'|'HN'|'HR'|'HT'|'HU'|'ID'|'IE'|'IL'|'IM'|'IN'|'IO'|'IQ'|'IR'|'IS'|'IT'|'JE'|'JM'|'JO'|'JP'|'KE'|'KG'|'KH'|'KI'|'KM'|'KN'|'KP'|'KR'|'KW'|'KY'|'KZ'|'LA'|'LB'|'LC'|'LI'|'LK'|'LR'|'LS'|'LT'|'LU'|'LV'|'LY'|'MA'|'MC'|'MD'|'ME'|'MF'|'MG'|'MH'|'MK'|'ML'|'MM'|'MN'|'MO'|'MP'|'MQ'|'MR'|'MS'|'MT'|'MU'|'MV'|'MW'|'MX'|'MY'|'MZ'|'NA'|'NC'|'NE'|'NF'|'NG'|'NI'|'NL'|'NO'|'NP'|'NR'|'NU'|'NZ'|'OM'|'PA'|'PE'|'PF'|'PG'|'PH'|'PK'|'PL'|'PM'|'PN'|'PR'|'PS'|'PT'|'PW'|'PY'|'QA'|'RE'|'RO'|'RS'|'RU'|'RW'|'SA'|'SB'|'SC'|'SD'|'SE'|'SG'|'SH'|'SI'|'SJ'|'SK'|'SL'|'SM'|'SN'|'SO'|'SR'|'ST'|'SU'|'SV'|'SY'|'SZ'|'TC'|'TD'|'TF'|'TG'|'TH'|'TJ'|'TK'|'TL'|'TM'|'TN'|'TO'|'TP'|'TR'|'TT'|'TV'|'TW'|'TZ'|'UA'|'UG'|'UK'|'UM'|'US'|'UY'|'UZ'|'VA'|'VC'|'VE'|'VG'|'VI'|'VN'|'VU'|'WF'|'WS'|'YE'|'YT'|'YU'|'ZA'|'ZM'|'ZW'}
59 58
      * @return AddressInterface
60 59
      */
61 60
     public function setCountryCode($countryCode);
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
 interface AddressInterface extends EntityInterface
15 15
 {
16 16
        
17
-   /**
18
-    * Postal Code of the Address.
19
-    *
20
-    * @param string $postalCode
21
-    * @return AddressInterface
22
-    */
17
+    /**
18
+     * Postal Code of the Address.
19
+     *
20
+     * @param string $postalCode
21
+     * @return AddressInterface
22
+     */
23 23
     public function setPostalCode($postalCode);
24 24
     public function getPostalCode();
25 25
    
Please login to merge, or discard this patch.
module/Core/src/Entity/AttachableEntityInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@
 block discarded – undo
22 22
     /**
23 23
      * @param AttachableEntityManager $attachableEntityManager
24 24
      * @throws \LogicException If attachable entity manager is already set
25
+     * @return AttachableEntityTrait
25 26
      */
26 27
     public function setAttachableEntityManager(AttachableEntityManager $attachableEntityManager);
27 28
 
Please login to merge, or discard this patch.
module/Core/src/Entity/EntityTrait.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
  */
23 23
 trait EntityTrait
24 24
 {
25
+    /**
26
+     * @param string $property
27
+     */
25 28
     public function notEmpty($property, array $args=[])
26 29
     {
27 30
         $method = "get$property";
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@
 block discarded – undo
20 20
  */
21 21
 trait EntityTrait
22 22
 {
23
-    public function notEmpty($property, array $args=[])
23
+    public function notEmpty($property, array $args = [])
24 24
     {
25 25
         $method = "get$property";
26 26
 
27 27
         if (!method_exists($this, $method)) {
28
-            throw new OutOfBoundsException("'$property' is not a valid property of '" . get_class($this) . "'");
28
+            throw new OutOfBoundsException("'$property' is not a valid property of '".get_class($this)."'");
29 29
         }
30 30
 
31 31
         $value = count($args)
32
-            ? call_user_func_array([ $this, $method ], $args)
32
+            ? call_user_func_array([$this, $method], $args)
33 33
             : $this->$method();
34 34
 
35 35
         if (null === $value) { // is_scalar does not consider 'null' to be scalar value.
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/EntityHydrator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     /**
90 90
      * exclude methods from the automatism
91 91
      *
92
-     * @param $methods
92
+     * @param string[] $methods
93 93
      */
94 94
     public function setExcludeMethods($methods)
95 95
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
         
33 33
         $getters = array_filter(
34 34
             get_class_methods($object),
35
-            function ($methodName) use ($object) {
35
+            function($methodName) use ($object) {
36 36
                 return "get" === substr($methodName, 0, 3)
37
-                && method_exists($object, 's' . substr($methodName, 1));
37
+                && method_exists($object, 's'.substr($methodName, 1));
38 38
             }
39 39
         );
40 40
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
         $setters = array_filter(
63 63
             get_class_methods($object),
64
-            function ($methodName) {
64
+            function($methodName) {
65 65
                 return "set" === substr($methodName, 0, 3);
66 66
             }
67 67
         );
Please login to merge, or discard this patch.
module/Core/src/Entity/ImageSetInterface.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      * @param array                $images
60 60
      * @param PermissionsInterface $permissions
61 61
      *
62
-     * @return mixed
62
+     * @return ImageSet
63 63
      */
64 64
     public function setImages(array $images, PermissionsInterface $permissions = null);
65 65
 
Please login to merge, or discard this patch.
module/Core/src/Entity/LocationInterface.php 1 patch
Doc Comments   +11 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
      * Sets the Postal Code of a location
21 21
      *
22 22
      * @param   string $postalCode
23
-     * @return mixed
23
+     * @return AbstractLocation
24 24
      */
25 25
     public function setPostalCode($postalCode);
26 26
 
27 27
     /**
28 28
      * Gets the Postal Code of a location
29 29
      *
30
-     * @return mixed
30
+     * @return string
31 31
      */
32 32
     public function getPostalCode();
33 33
 
@@ -44,6 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @param GeoJson $coordinates
46 46
      * @internal param $point
47
+     * @return AbstractLocation
47 48
      */
48 49
     public function setCoordinates(GeoJson $coordinates);
49 50
 
@@ -51,7 +52,7 @@  discard block
 block discarded – undo
51 52
      * Sets the city name of a Location
52 53
      *
53 54
      * @param $city
54
-     * @return mixed
55
+     * @return AbstractLocation
55 56
      */
56 57
     public function setCity($city);
57 58
 
@@ -66,14 +67,14 @@  discard block
 block discarded – undo
66 67
      * Sets the country of a location
67 68
      *
68 69
      * @param $country
69
-     * @return mixed
70
+     * @return AbstractLocation
70 71
      */
71 72
     public function setCountry($country);
72 73
 
73 74
     /**
74 75
      * Gets the country of a location
75 76
      *
76
-     * @return mixed
77
+     * @return string
77 78
      */
78 79
     public function getCountry();
79 80
 
@@ -81,7 +82,7 @@  discard block
 block discarded – undo
81 82
      * Sets the region of a location. Eg. "Hessen" is a region in "Germany"
82 83
      *
83 84
      * @param $region
84
-     * @return mixed
85
+     * @return AbstractLocation
85 86
      */
86 87
     public function setRegion($region);
87 88
 
@@ -96,14 +97,14 @@  discard block
 block discarded – undo
96 97
      * Sets the Streetname of a location
97 98
      *
98 99
      * @param $street
99
-     * @return mixed
100
+     * @return AbstractLocation
100 101
      */
101 102
     public function setStreetname($street);
102 103
 
103 104
     /**
104 105
      * Gets the streetname of a location
105 106
      *
106
-     * @return mixed
107
+     * @return string
107 108
      */
108 109
     public function getStreetname();
109 110
 
@@ -111,14 +112,14 @@  discard block
 block discarded – undo
111 112
      * Sets the Streetnumber of a location
112 113
      *
113 114
      * @param $number
114
-     * @return mixed
115
+     * @return AbstractLocation
115 116
      */
116 117
     public function setStreetnumber($number);
117 118
 
118 119
     /**
119 120
      * Gets the streetnumber of a location
120 121
      *
121
-     * @return mixeed
122
+     * @return string
122 123
      */
123 124
     public function getStreetnumber();
124 125
 }
Please login to merge, or discard this patch.
module/Core/src/Entity/Permissions.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -353,6 +353,9 @@
 block discarded – undo
353 353
         return $this;
354 354
     }
355 355
     
356
+    /**
357
+     * @param string $permission
358
+     */
356 359
     private function checkIsGranted($userId, $permission)
357 360
     {
358 361
         if (!$userId) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         if (preg_match('~^is(View|Change|None|All)Granted$~', $method, $match)) {
152
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
152
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
153 153
             return $this->isGranted($params[0], $permission);
154 154
         }
155 155
         
156 156
         if (preg_match('~^grant(View|Change|None|All)$~', $method, $match)) {
157
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
157
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
158 158
             return $this->grant($params[0], $permission);
159 159
         }
160 160
         
161 161
         if (preg_match('~^revoke(View|Change|None|All)$~', $method, $match)) {
162
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
162
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
163 163
             return $this->revoke($params[0], $permission);
164 164
         }
165 165
         
166
-        throw new \BadMethodCallException('Unknown method "' . $method . '"');
166
+        throw new \BadMethodCallException('Unknown method "'.$method.'"');
167 167
     }
168 168
 
169 169
     /**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         if ($build) {
312 312
             $this->build();
313 313
         }
314
-        $this->hasChanged= true;
314
+        $this->hasChanged = true;
315 315
 
316 316
         // restore orginial permissions type
317 317
         $this->type = $oldType;
@@ -444,10 +444,10 @@  discard block
 block discarded – undo
444 444
         }
445 445
         
446 446
         if ($resource instanceof UserInterface) {
447
-            return 'user:' . $resource->getId();
447
+            return 'user:'.$resource->getId();
448 448
         }
449 449
         
450
-        return 'user:' . $resource;
450
+        return 'user:'.$resource;
451 451
     }
452 452
 
453 453
     /**
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
         );
468 468
         if (!in_array($permission, $perms)) {
469 469
             throw new \InvalidArgumentException(
470
-                'Invalid permission. Must be one of ' . implode(', ', $perms)
470
+                'Invalid permission. Must be one of '.implode(', ', $perms)
471 471
             );
472 472
         }
473 473
     }
Please login to merge, or discard this patch.
module/Core/src/Entity/Snapshot.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 {
24 24
     /**
25 25
      * @param $data
26
-     * @return mixed
26
+     * @return Snapshot
27 27
      * @ODM\PreUpdate
28 28
      */
29 29
     public function __invoke($data)
Please login to merge, or discard this patch.
module/Core/src/Entity/SnapshotTrait.php 3 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -77,6 +77,9 @@  discard block
 block discarded – undo
77 77
         return $return === $entity ? $this : $return;
78 78
     }
79 79
 
80
+    /**
81
+     * @param string $method
82
+     */
80 83
     protected function proxyClone($method, ...$args)
81 84
     {
82 85
         $value = $this->proxy($method, ...$args);
@@ -85,6 +88,9 @@  discard block
 block discarded – undo
85 88
         return $return;
86 89
     }
87 90
 
91
+    /**
92
+     * @param string $property
93
+     */
88 94
     protected function inaccessible($property)
89 95
     {
90 96
         throw new \DomainException(sprintf(
@@ -93,6 +99,9 @@  discard block
 block discarded – undo
93 99
         ));
94 100
     }
95 101
 
102
+    /**
103
+     * @param string $property
104
+     */
96 105
     protected function immutable($property)
97 106
     {
98 107
         throw new ImmutablePropertyException($property, $this);
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         if (!is_callable($callback)) {
73 73
             throw new \BadMethodCallException(sprintf(
74 74
                 'Proxy error: Method "%s" does not exist in proxied "%s"',
75
-                 $method,
75
+                    $method,
76 76
                 get_class($entity)
77 77
             ));
78 78
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             : SnapshotMeta::class;
38 38
 
39 39
         $this->snapshotMeta = new $snapshotMetaClass();
40
-        $this->snapshotEntity       = $source;
40
+        $this->snapshotEntity = $source;
41 41
     }
42 42
 
43 43
     public function getOriginalEntity()
Please login to merge, or discard this patch.