Skip to content

ColourUtil tests and small refactors #107

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

Merged
merged 3 commits into from
May 7, 2018
Merged

Conversation

AydinHassan
Copy link
Member

  • used is_numeric instead of is_int so we don't have to mix up types, we can just let php cast for us now, this allows us to keep parameter types and return types.

  • fixed an issue with generating the colour set code when the bg colour hasn't been set yet

  • Added tests for ColourUtil

  • Refactored validateColour to reduce nesting and return early

@codecov-io
Copy link

codecov-io commented May 7, 2018

Codecov Report

Merging #107 into master will increase coverage by 0.43%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #107      +/-   ##
============================================
+ Coverage     96.32%   96.76%   +0.43%     
+ Complexity      307      306       -1     
============================================
  Files            23       23              
  Lines           926      928       +2     
============================================
+ Hits            892      898       +6     
+ Misses           34       30       -4
Impacted Files Coverage Δ Complexity Δ
src/Util/ColourUtil.php 100% <100%> (+23.52%) 8 <6> (-1) ⬇️
src/CliMenuBuilder.php 98.69% <100%> (ø) 47 <2> (ø) ⬇️
src/MenuStyle.php 94.73% <100%> (+0.04%) 39 <2> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95d3a41...5a07d01. Read the comment docs.

@AydinHassan AydinHassan merged commit 761de53 into master May 7, 2018
@AydinHassan AydinHassan deleted the colour-util-tests branch May 7, 2018 15:09
@AydinHassan AydinHassan added this to the 3.0 milestone May 8, 2018
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.

2 participants