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

Improve consistency in handling of namespaces #750

Conversation

dvdoug
Copy link
Contributor

@dvdoug dvdoug commented May 18, 2020

Hello @sebastianbergmann

In #455, the internal classname used as an array key by the report was adjusted from using the simple classname to the FQCN. However although traits use the same basic data structure, the same adjustment was not done for them. This PR fixes that so the correct data can be stored and looked up.

Namespaced functions seem to be OK as the namespace is already included in the result of ->getName().

The fix from #455 also seems to have a side-effect on the text report, since this had seperate code to include the namespace in the output. With the classname now being the FQCN, the text report has been doubling up output for the last couple of years. This PR therefore also adjusts the text report to eliminate that.

Before
image

After
image

@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #750 into master will increase coverage by 0.16%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #750      +/-   ##
============================================
+ Coverage     83.87%   84.03%   +0.16%     
  Complexity      846      846              
============================================
  Files            37       37              
  Lines          2480     2480              
============================================
+ Hits           2080     2084       +4     
+ Misses          400      396       -4     
Impacted Files Coverage Δ Complexity Δ
src/Node/File.php 75.00% <0.00%> (-0.62%) 89.00 <0.00> (+1.00) ⬇️
src/Report/Text.php 79.83% <100.00%> (+4.62%) 22.00 <0.00> (-1.00) ⬆️

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 76e16f3...edab361. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit 227fa31 into sebastianbergmann:master May 19, 2020
@dvdoug dvdoug deleted the consistency_in_namespace_handling branch May 19, 2020 06:21
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