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

Mexico #979

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Mexico #979

wants to merge 26 commits into from

Conversation

mikk150
Copy link
Contributor

@mikk150 mikk150 commented Jul 27, 2016

implemented basic Mexico

@@ -95,21 +95,28 @@ public static function curp($firstName = null, $lastNameFather = null, $lastName

public static function rfc($firstName = null, $lastNameFather = null, $lastNameMother = null, $birthDate = null, $gender = null)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This really shouldn't be there, but since there are many helpers in Person class that needs to be in Payment class also, I couldn't figure out how to do it better, Maybe Trait, but not all PHP versions support Traits

@Faryshta
Copy link

what is needed for this to be merged?

public static function clabe()
{
$bank = static::randomElement(static::$bankCodes);
$accountNumber = $bank.static::numerify('##############');
Copy link
Owner

Choose a reason for hiding this comment

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

please enclose dot with two spaces

@fzaninotto
Copy link
Owner

Needs rebase

@fzaninotto
Copy link
Owner

Can you squash your 19 commits into one?

@mikk150
Copy link
Contributor Author

mikk150 commented May 15, 2017

Yes I could, but you should never rewrite history in git

@Faryshta
Copy link

@fzaninotto i think its easier for you to squash them from git merge options.

do you see an 'squash and merge' option at the bottom of this pr?

@mikk150
Copy link
Contributor Author

mikk150 commented May 15, 2017

@fzaninotto
Copy link
Owner

Let me put this differently: I don't want to see a merge commit in your PR, because it brings some changes unrelated to your work in the changeset. So what I really want is for you to rebase on master, not merge master in.

@mikk150
Copy link
Contributor Author

mikk150 commented May 15, 2017

Because rewriting history is great???

I will do it, just know that it is not best thing to do

@fzaninotto
Copy link
Owner

dude, please don't teach me how to do web development

@mikk150
Copy link
Contributor Author

mikk150 commented May 15, 2017

I'm not telling you how to do web development
I am telling you how you should not do CVS
You should not rewrite history on already published branches

@fzaninotto
Copy link
Owner

tests fail


$lastNameFather = self::removeAccents(self::removePrefixes(mb_strtoupper($lastNameFather ? $lastNameFather : static::randomElement(static::$lastNames))));
$lastNameMother = self::removeAccents(self::removePrefixes(mb_strtoupper($lastNameMother ? $lastNameMother : static::randomElement(static::$lastNames))));
$birthDate = $birthDate ? $birthDate:\Faker\Provider\DateTime::dateTimeBetween();
Copy link
Owner

Choose a reason for hiding this comment

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

This ternary operator is missing its second part.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no it is not

if $birthDate exists then pass it to $birthDate, otherwise take random DateTime::dateTimeBetween()

Copy link
Owner

Choose a reason for hiding this comment

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

OK, then it's the code formatting that is wrong. Please add spaces around the colon.

@mikk150
Copy link
Contributor Author

mikk150 commented Sep 11, 2019

@mikk150

Are you still interestedin working on this? If so, we could help you get this through!

@localheinz
I would like to.

@codecov-io
Copy link

Codecov Report

Merging #979 into master will increase coverage by 0.54%.
The diff coverage is 91.76%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #979      +/-   ##
============================================
+ Coverage     56.31%   56.86%   +0.54%     
- Complexity     2068     2109      +41     
============================================
  Files           306      308       +2     
  Lines          4851     4936      +85     
============================================
+ Hits           2732     2807      +75     
- Misses         2119     2129      +10     
Impacted Files Coverage Δ Complexity Δ
src/Faker/Provider/es_MX/Person.php 91.13% <91.13%> (ø) 39.00 <39.00> (?)
src/Faker/Provider/es_MX/Payment.php 100.00% <100.00%> (ø) 2.00 <2.00> (?)
src/Faker/Provider/de_DE/Person.php 0.00% <0.00%> (-100.00%) 1.00% <0.00%> (ø%)
src/Faker/Provider/he_IL/Address.php 0.00% <0.00%> (-100.00%) 1.00% <0.00%> (ø%)
src/Faker/Provider/ne_NP/Person.php 0.00% <0.00%> (-50.00%) 2.00% <0.00%> (ø%)
src/Faker/Provider/id_ID/Company.php 50.00% <0.00%> (-50.00%) 2.00% <0.00%> (ø%)
src/Faker/Provider/en_AU/PhoneNumber.php 0.00% <0.00%> (-50.00%) 2.00% <0.00%> (ø%)
src/Faker/Provider/sr_Latn_RS/Address.php 66.66% <0.00%> (-33.34%) 3.00% <0.00%> (ø%)
src/Faker/Provider/es_ES/Person.php 75.00% <0.00%> (-25.00%) 3.00% <0.00%> (ø%)
src/Faker/Provider/es_AR/Address.php 50.00% <0.00%> (-25.00%) 4.00% <0.00%> (ø%)
... and 45 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 468dfa6...5a539f6. Read the comment docs.

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

Successfully merging this pull request may close these issues.

7 participants