original_string: protected function numbersFromAjax($ajaxNumbers)
      {
          $numbers = [];
          $numberRegex = '/\d/';
  
          if (!empty($ajaxNumbers)) {
              if (!is_array($ajaxNumbers) && preg_match($numberRegex, $ajaxNumbers)) {
                  $numbers = [$ajaxNumbers];
              } else {
                  foreach ($ajaxNumbers as $i => $number) {
                      if (preg_match($numberRegex, $number)) {
                          $numbers[] = $number;
                      } else {
                          $numbers = [];
                          break;
                      }
                  }
              }
          }
  
          return $numbers;
      }
code: protected function numbersFromAjax($ajaxNumbers)
      {
          $numbers = [];
          $numberRegex = '/\d/';
  
          if (!empty($ajaxNumbers)) {
              if (!is_array($ajaxNumbers) && preg_match($numberRegex, $ajaxNumbers)) {
                  $numbers = [$ajaxNumbers];
              } else {
                  foreach ($ajaxNumbers as $i => $number) {
                      if (preg_match($numberRegex, $number)) {
                          $numbers[] = $number;
                      } else {
                          $numbers = [];
                          break;
                      }
                  }
              }
          }
  
          return $numbers;
      }
code_tokens: protected function numbersFromAjax ( $ ajaxNumbers ) { $ numbers = [ ] ; $ numberRegex = '/\d/' ; if ( ! empty ( $ ajaxNumbers ) ) { if ( ! is_array ( $ ajaxNumbers ) && preg_match ( $ numberRegex , $ ajaxNumbers ) ) { $ numbers = [ $ ajaxNumbers ] ; } else { foreach ( $ ajaxNumbers as $ i => $ number ) { if ( preg_match ( $ numberRegex , $ number ) ) { $ numbers [ ] = $ number ; } else { $ numbers = [ ] ; break ; } } } } return $ numbers ; }
docstring: Convert an array from the posted numbers
  
  @param  array $dates
  
  @return array
docstring_tokens: Convert an array from the posted numbers