original_string: protected function validateDataMapStore()
      {
          $field = 'data.map';
          $value = $this->getSubmitted($field);
  
          if (empty($value)) {
              return null;
          }
  
          $label = $this->translation->text('Map');
  
          if (!is_array($value) || count($value) != 2) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          if (count($value) != count(array_filter($value, 'is_numeric'))) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          return true;
      }
code: protected function validateDataMapStore()
      {
          $field = 'data.map';
          $value = $this->getSubmitted($field);
  
          if (empty($value)) {
              return null;
          }
  
          $label = $this->translation->text('Map');
  
          if (!is_array($value) || count($value) != 2) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          if (count($value) != count(array_filter($value, 'is_numeric'))) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateDataMapStore ( ) { $ field = 'data.map' ; $ value = $ this -> getSubmitted ( $ field ) ; if ( empty ( $ value ) ) { return null ; } $ label = $ this -> translation -> text ( 'Map' ) ; if ( ! is_array ( $ value ) || count ( $ value ) != 2 ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } if ( count ( $ value ) != count ( array_filter ( $ value , 'is_numeric' ) ) ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } return true ; }
docstring: Validates map coordinates
  @return boolean|null
docstring_tokens: Validates map coordinates