reducktion / socrates

PHP package to Validate and Extract information from National Identification Numbers.
MIT License
47 stars 4 forks source link

[v1.3.0] Remove Laravel framework detection #83

Closed AlexOlival closed 3 years ago

AlexOlival commented 3 years ago

These lines of code are a hacky way of detecting if we are pulled in a Laravel project for the purpose of detecting the locale using the framework's App::getLocale() method:

https://github.com/reducktion/socrates/blob/6b7df4c606c5e336c249be5e977c73de2f31db6c/src/Socrates.php#L72-L90

The idea was to have a default behaviour in which we would assume that if no country code was passed, then the user was referencing whatever country corresponds to the application's locale (see #84) However, as mentioned above, not only this is hacky but sort of gimmicky. There's no use for this, so let's remove it.