Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Fix: Mark $unique property as nullable #2048

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

Conversation

andyg0808
Copy link

$unique is null until unique() is called; marking it as nullable should make that clear.

This came up for me because Psalm complains about subclasses of Faker/Provider/Base not initializing $unique.

`$unique` is `null` until `unique()` is called; marking it as such should make that clear.
@codecov-commenter
Copy link

Codecov Report

Merging #2048 into master will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2048      +/-   ##
============================================
+ Coverage     56.56%   56.65%   +0.08%     
  Complexity     2068     2068              
============================================
  Files           306      306              
  Lines          4849     4849              
============================================
+ Hits           2743     2747       +4     
+ Misses         2106     2102       -4     
Impacted Files Coverage Δ Complexity Δ
src/Faker/Provider/Base.php 92.97% <ø> (ø) 82.00 <0.00> (ø)
src/Faker/Provider/ne_NP/Person.php 0.00% <0.00%> (-50.00%) 2.00% <0.00%> (ø%)
src/Faker/Provider/fi_FI/Address.php 33.33% <0.00%> (-33.34%) 3.00% <0.00%> (ø%)
src/Faker/Provider/fa_IR/Address.php 73.33% <0.00%> (-26.67%) 7.00% <0.00%> (ø%)
src/Faker/Provider/en_AU/Address.php 75.00% <0.00%> (-25.00%) 4.00% <0.00%> (ø%)
src/Faker/Provider/en_GB/Address.php 25.00% <0.00%> (-25.00%) 4.00% <0.00%> (ø%)
src/Faker/Provider/es_AR/Address.php 50.00% <0.00%> (-25.00%) 4.00% <0.00%> (ø%)
src/Faker/Provider/me_ME/Address.php 44.44% <0.00%> (-22.23%) 4.00% <0.00%> (ø%)
src/Faker/Provider/en_UG/Person.php 60.00% <0.00%> (-20.00%) 5.00% <0.00%> (ø%)
src/Faker/Provider/hu_HU/Person.php 60.00% <0.00%> (-20.00%) 5.00% <0.00%> (ø%)
... and 34 more

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 5337ce5...af425f8. Read the comment docs.

@andyg0808
Copy link
Author

It looks like CI failed due to some kind of transfer error on composer install. I don't seem to have permission to rerun CI; would someone else be able to do so?

@pimjansen
Copy link
Contributor

We have a psalm implementation discussion going so lets wait untill that is cleared up

@pimjansen pimjansen added the bug label Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants