Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntegerAnonymizer - add possibility to anonymize value by adding noise #85

Closed
SimonMellerin opened this issue Feb 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@SimonMellerin
Copy link
Member

Add options to IntegerAnonymizer to be able to anonymize int by adding noise: a delta or a percent.

    #[ORM\Column]
    // This will add to the value a random value between -10 and 10
    #[Anonymize(type: 'integer', options: ['delta' => '10'])]
    // This will add to the value a random value between -10 and 10 and will keep an absolute value
    #[Anonymize(type: 'integer', options: ['delta' => '10', 'unsigned' => true])]
    // This will multiply the value by a random value between 0.9 and 1.1
    #[Anonymize(type: 'integer', options: ['percent' => 10])]
    private ?int $age = null;
@SimonMellerin SimonMellerin added enhancement New feature or request good first issue Good for newcomers labels Feb 13, 2024
@SimonMellerin SimonMellerin self-assigned this Mar 8, 2024
@SimonMellerin
Copy link
Member Author

done with #110

@pounard pounard added this to the 1.0.0 milestone May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants