The current implementation of store+check_repeatable+check_unique_id
notably retrieves the related Koha::Patron::Attribute::Type object three
times.
This can be easily solved by retrieving it once and reusing. This patch
does that.
This changes the signature for the helper methods.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Verify the old _check_repeatable method is not used anywhere
$ git grep _check_repeatable
=> SUCCESS: It is not!
5. Verify check_unique_id is not used anywhere, so no risk changing the
signature
$ git grep check_unique_id
=> SUCCESS: It is safe to update it!
6. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>