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

Nnl_NL #1801

Closed
Sitethief opened this issue Oct 3, 2019 · 3 comments
Closed

Nnl_NL #1801

Sitethief opened this issue Oct 3, 2019 · 3 comments

Comments

@Sitethief
Copy link

Summary

When calling $faker->titleMale with the locale set to 'nl_NL' an exception is thrown.

ErrorException : Non-static method Faker\Provider\nl_NL\Person::title() should not be called statically.

I'm not allowed to set title to be static though.

Versions

Version
PHP 7.2.16
fzaninotto/faker v1.8.0
Laravel v5.5

Self-enclosed code snippet for reproduction

echo $faker->titleMale;

Expected output

'Dhr'

Actual output

ErrorException : Non-static method Faker\Provider\nl_NL\Person::title() should not be called statically
 /var/www/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php:291
 /var/www/vendor/fzaninotto/faker/src/Faker/Generator.php:222
 /var/www/vendor/fzaninotto/faker/src/Faker/Generator.php:268
@pimjansen
Copy link
Contributor

This is a valid error since the method is not available. There is no available method to access only male titles for this locale. These are the ones that are available:

    protected static $title = array(
        'mr.', 'dr.', 'ir.', 'drs', 'bacc.', 'kand.', 'dr.h.c.', 'prof.', 'ds.', 'ing.', 'bc.'
    );

Feel free to PR this with the split between male and female.If not possible let me know so i can help

@erikgaal
Copy link

This has been fixed in #1696, but is not yet released.

@pimjansen
Copy link
Contributor

Thanks @erikgaal!

It will be release in 1.9.0 which will be there probably mid nov.

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

No branches or pull requests

3 participants