original_string: public function get_min_max_of($attribute) {
          $getmethod = 'get_min_max_of_' . $attribute;
          if (method_exists($this, $getmethod)) {
              return $this->$getmethod();
          } else {
              $min = $max = null;
              $set = false;
  
              // We cannot simply use min or max functions because, in theory, some attributes might be non-scalar.
              foreach (array_column($this->subqstats, $attribute) as $value) {
                  if (is_scalar($value) || is_null($value)) {
                      if (!$set) {    // It is not good enough to check if (!isset($min)),
                                      // because $min might have been set to null in an earlier iteration.
                          $min = $value;
                          $max = $value;
                          $set = true;
                      }
  
                      $min  = $this->min($min, $value);
                      $max  = $this->max($max, $value);
                  }
              }
  
              return [$min, $max];
          }
      }
code: public function get_min_max_of($attribute) {
          $getmethod = 'get_min_max_of_' . $attribute;
          if (method_exists($this, $getmethod)) {
              return $this->$getmethod();
          } else {
              $min = $max = null;
              $set = false;
  
              // We cannot simply use min or max functions because, in theory, some attributes might be non-scalar.
              foreach (array_column($this->subqstats, $attribute) as $value) {
                  if (is_scalar($value) || is_null($value)) {
                      if (!$set) {    // It is not good enough to check if (!isset($min)),
                                      // because $min might have been set to null in an earlier iteration.
                          $min = $value;
                          $max = $value;
                          $set = true;
                      }
  
                      $min  = $this->min($min, $value);
                      $max  = $this->max($max, $value);
                  }
              }
  
              return [$min, $max];
          }
      }
code_tokens: public function get_min_max_of ( $ attribute ) { $ getmethod = 'get_min_max_of_' . $ attribute ; if ( method_exists ( $ this , $ getmethod ) ) { return $ this -> $ getmethod ( ) ; } else { $ min = $ max = null ; $ set = false ; // We cannot simply use min or max functions because, in theory, some attributes might be non-scalar. foreach ( array_column ( $ this -> subqstats , $ attribute ) as $ value ) { if ( is_scalar ( $ value ) || is_null ( $ value ) ) { if ( ! $ set ) { // It is not good enough to check if (!isset($min)), // because $min might have been set to null in an earlier iteration. $ min = $ value ; $ max = $ value ; $ set = true ; } $ min = $ this -> min ( $ min , $ value ) ; $ max = $ this -> max ( $ max , $ value ) ; } } return [ $ min , $ max ] ; } }
docstring: Returns the minimum and maximum values of the given attribute in the summarised calculated stats.
  
  @param string $attribute The attribute that we are looking for its extremums.
  @return array An array of [min,max]
docstring_tokens: Returns the minimum and maximum values of the given attribute in the summarised calculated stats .