Skip to content

Return $this instead of throwing "already assigned" exception in Manager::assign()#253

Merged
arogachev merged 1 commit intomasterfrom
252-no-exception
Feb 14, 2024
Merged

Return $this instead of throwing "already assigned" exception in Manager::assign()#253
arogachev merged 1 commit intomasterfrom
252-no-exception

Conversation

@arogachev
Copy link
Contributor

@arogachev arogachev commented Feb 13, 2024

Q A
Is bugfix?
New feature?
Breaks BC? ✔️

@arogachev arogachev self-assigned this Feb 13, 2024
@arogachev arogachev added the type:enhancement Enhancement label Feb 13, 2024
@arogachev arogachev added this to the 2.0 milestone Feb 13, 2024
@arogachev arogachev requested a review from a team February 13, 2024 13:53
@what-the-diff
Copy link

what-the-diff bot commented Feb 13, 2024

PR Summary

  • Enhancement to Manager::assign() Method
    An improvement has been added in the Manager::assign() method in our system. Now, rather than stopping the execution and throwing an "already assigned" exception, it simply gives back the control this allows for smoother operation.

  • Unit Testing Updates
    As the assign() method behavior has been upgraded, we also needed to change the way we test it. Our tests have been modified to ensure this new behavior gives correct results under different conditions. Characteristics related to assigning already assigned items, instances when direct permission assignment is both enabled and disabled, and data persistency, have been updated in the test code.

  • Code Readability Improvement
    As an added bonus, this PR also enhances readability of our test code. It introduces the use of named arguments when calling the assign() method, making it easier to understand what each argument represents.

@codecov
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a9a6712) 100.00% compared to head (ee874f9) 100.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #253   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       217       217           
===========================================
  Files             13        13           
  Lines            546       544    -2     
===========================================
- Hits             546       544    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arogachev arogachev merged commit 98cf8d7 into master Feb 14, 2024
@arogachev arogachev deleted the 252-no-exception branch February 14, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return $this instead of throwing "already assigned" exception in Manager::assign()

2 participants