Bug 17755: (QA followup) Return $self when appropriate
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 19 Jan 2017 18:09:15 +0000 (15:09 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 Mar 2017 18:32:46 +0000 (18:32 +0000)
commit3f2ade46ace082e69cb9f40f7cf241853e1897f8
tree31d9a0097332870d6e7fcceba24ebc2c920dc985
parenta39fbd78e61d62b680f7e592effc903e344a928f
Bug 17755: (QA followup) Return $self when appropriate

As failure situations raise exceptions that should be handled outside
the object class, methods should return $self so successive calls can be
chained nicely.

This patch makes methods return $self and adjusts the tests to reflect
this change.

Make sure tests pass:
- Run:
  $ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests return green
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Object/Limit/Library.pm
t/db_dependent/Koha/Patron/Attribute/Types.t