Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jun 4, 2024
1 parent 36b8688 commit 0676d66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Geocoder/Geocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,23 @@ class Geocoder {
protected $adapter;

/**
* @param array $config
* @param array<string, mixed> $config
*/
public function __construct(array $config = []) {
$defaults = (array)Configure::read('Geocoder');
$this->setConfig($config + $defaults);

if ($this->getConfig('locale') === true) {
$this->setConfig('locale', strtolower(Locale::getPrimaryLanguage(I18n::getLocale())));
$this->setConfig('locale', strtolower((string)Locale::getPrimaryLanguage(I18n::getLocale())));
}

if ($this->getConfig('region') === true) {
$this->setConfig('region', strtolower(Locale::getRegion(I18n::getLocale())));
$this->setConfig('region', strtolower((string)Locale::getRegion(I18n::getLocale())));
}
}

/**
* @return array
* @return array<string, string>
*/
public function accuracyTypes() {
$array = [
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/Admin/GeoControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class GeoControllerTest extends TestCase {
use IntegrationTestTrait;

/**
* @var array
* @var array<string>
*/
protected array $fixtures = [
'plugin.Geo.GeocodedAddresses',
Expand Down

0 comments on commit 0676d66

Please sign in to comment.