Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SourceRegionDataProcessor.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
14 {
19  public function execute(array $data): array
20  {
21  if (!isset($data['region_id']) || '' === $data['region_id']) {
22  $data['region_id'] = null;
23  }
24 
25  if (null !== $data['region_id'] || !isset($data['region']) || '' === trim($data['region'])) {
26  $data['region'] = null;
27  }
28 
29  return $data;
30  }
31 }