original_string: private function getFieldInfo($key, $value): array
      {
          $name = null;
          $options = [];
          if (is_numeric($key) && is_string($value)) {
              $name = $value;
          } else if (is_numeric($key) && is_array($value)) {
              $name = array_shift($value);
              $options = $value;
          } else if (is_string($key)) {
              $name = $key;
              $options = $value;
          }
          return ['name' => $name, 'options' => $options];
      }
code: private function getFieldInfo($key, $value): array
      {
          $name = null;
          $options = [];
          if (is_numeric($key) && is_string($value)) {
              $name = $value;
          } else if (is_numeric($key) && is_array($value)) {
              $name = array_shift($value);
              $options = $value;
          } else if (is_string($key)) {
              $name = $key;
              $options = $value;
          }
          return ['name' => $name, 'options' => $options];
      }
code_tokens: private function getFieldInfo ( $ key , $ value ) : array { $ name = null ; $ options = [ ] ; if ( is_numeric ( $ key ) && is_string ( $ value ) ) { $ name = $ value ; } else if ( is_numeric ( $ key ) && is_array ( $ value ) ) { $ name = array_shift ( $ value ) ; $ options = $ value ; } else if ( is_string ( $ key ) ) { $ name = $ key ; $ options = $ value ; } return [ 'name' => $ name , 'options' => $ options ] ; }
docstring: Build a uniform field info array for various types of validations.
  
  @param mixed $key
  @param mixed $value
  @return array
docstring_tokens: Build a uniform field info array for various types of validations .