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

added exception and subBusinessDays method #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

royopa
Copy link
Contributor

@royopa royopa commented Jan 23, 2018

No description provided.

@coveralls
Copy link

coveralls commented Jan 23, 2018

Coverage Status

Coverage decreased (-21.0%) to 79.032% when pulling 487671b on royopa:patch-3 into 0a66655 on andrejsstepanovs:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-21.0%) to 79.032% when pulling 487671b on royopa:patch-3 into 0a66655 on andrejsstepanovs:master.

Copy link
Owner

@andrejsstepanovs andrejsstepanovs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Provide unit tests for new subBusinessDays() method.
  2. Refactoring is needed. Change addBusinessDays() and subBusinessDays() so they both rely on new private function calculateBusinessDays($howManyDays, $modifier) where $modifier is '-1 day' or '+1 day'. Then calculation for both methods will be done in same place and no code duplication will occure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants