33 * This file is part of the GDPR bundle.
44 *
55 * @category Bundle
6- * @package Gdpr
6+ *
77 * @author SuperBrave <info@superbrave.nl>
88 * @copyright 2018 SuperBrave <info@superbrave.nl>
99 * @license https://github.com/superbrave/gdpr-bundle/blob/master/LICENSE MIT
10- * @link https://www.superbrave.nl/
10+ *
11+ * @see https://www.superbrave.nl/
1112 */
1213
1314namespace Superbrave \GdprBundle \Anonymize ;
1415
15- use Superbrave \GdprBundle \Annotation \AnnotationReader ;
16- use Superbrave \GdprBundle \Annotation \Anonymize ;
1716use InvalidArgumentException ;
18- use ReflectionException ;
1917use ReflectionClass ;
18+ use ReflectionException ;
19+ use Superbrave \GdprBundle \Annotation \AnnotationReader ;
20+ use Superbrave \GdprBundle \Annotation \Anonymize ;
2021
2122/**
22- * Class Anonymizer
23- *
24- * @package Superbrave\GdprBundle\Anonymize
23+ * Class Anonymizer.
2524 */
2625class Anonymizer
2726{
@@ -38,26 +37,26 @@ class Anonymizer
3837 /**
3938 * Anonymizer constructor.
4039 *
41- * @param AnnotationReader $annotationReader The annotation reader that should be used.
42- * @param PropertyAnonymizer $propertyAnonymizer The property anonymizer.
40+ * @param AnnotationReader $annotationReader the annotation reader that should be used
41+ * @param PropertyAnonymizer $propertyAnonymizer the property anonymizer
4342 */
4443 public function __construct (
4544 AnnotationReader $ annotationReader ,
4645 PropertyAnonymizer $ propertyAnonymizer
4746 ) {
48- $ this ->annotationReader = $ annotationReader ;
49- $ this ->propertyAnonymizer = $ propertyAnonymizer ;
47+ $ this ->annotationReader = $ annotationReader ;
48+ $ this ->propertyAnonymizer = $ propertyAnonymizer ;
5049 }
5150
5251 /**
5352 * Anonymizes the given object which should contain the @see Anonymize annotations.
5453 *
55- * @param object $object The object to anonymize.
54+ * @param object $object the object to anonymize
5655 *
5756 * @return void
5857 *
59- * @throws InvalidArgumentException If argument supplied is not an object.
60- * @throws ReflectionException If class doesn't exist.
58+ * @throws InvalidArgumentException if argument supplied is not an object
59+ * @throws ReflectionException if class doesn't exist
6160 */
6261 public function anonymize (/*object */ $ object )
6362 {
@@ -69,7 +68,7 @@ public function anonymize(/*object */$object)
6968 }
7069
7170 $ reflectionClass = new ReflectionClass ($ object );
72- $ annotations = $ this ->annotationReader ->getPropertiesWithAnnotation ($ reflectionClass , Anonymize::class);
71+ $ annotations = $ this ->annotationReader ->getPropertiesWithAnnotation ($ reflectionClass , Anonymize::class);
7372
7473 foreach ($ annotations as $ property => $ annotation ) {
7574 $ this ->propertyAnonymizer ->anonymizeField ($ object , $ property , $ annotation );
0 commit comments