original_string: protected function validateSize($width, $height)
      {
          if ($this->maximumHeight && $height > $this->maximumHeight) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_height_max'],
                  $height,
                  $this->maximumHeight
              ));
              return false;
          }
  
          if ($this->maximumWidth && $width > $this->maximumWidth) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_width_max'],
                  $width,
                  $this->maximumWidth
              ));
              return false;
          }
  
          if ($this->minimumHeight && $height < $this->minimumHeight) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_height_min'],
                  $height,
                  $this->minimumHeight
              ));
              return false;
          }
  
          if ($this->minimumWidth && $width < $this->minimumWidth) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_width_min'],
                  $width,
                  $this->minimumWidth
              ));
              return false;
          }
  
          return true;
      }
code: protected function validateSize($width, $height)
      {
          if ($this->maximumHeight && $height > $this->maximumHeight) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_height_max'],
                  $height,
                  $this->maximumHeight
              ));
              return false;
          }
  
          if ($this->maximumWidth && $width > $this->maximumWidth) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_width_max'],
                  $width,
                  $this->maximumWidth
              ));
              return false;
          }
  
          if ($this->minimumHeight && $height < $this->minimumHeight) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_height_min'],
                  $height,
                  $this->minimumHeight
              ));
              return false;
          }
  
          if ($this->minimumWidth && $width < $this->minimumWidth) {
              $this->setErrorMessage(sprintf(
                  $this->messages['size_width_min'],
                  $width,
                  $this->minimumWidth
              ));
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateSize ( $ width , $ height ) { if ( $ this -> maximumHeight && $ height > $ this -> maximumHeight ) { $ this -> setErrorMessage ( sprintf ( $ this -> messages [ 'size_height_max' ] , $ height , $ this -> maximumHeight ) ) ; return false ; } if ( $ this -> maximumWidth && $ width > $ this -> maximumWidth ) { $ this -> setErrorMessage ( sprintf ( $ this -> messages [ 'size_width_max' ] , $ width , $ this -> maximumWidth ) ) ; return false ; } if ( $ this -> minimumHeight && $ height < $ this -> minimumHeight ) { $ this -> setErrorMessage ( sprintf ( $ this -> messages [ 'size_height_min' ] , $ height , $ this -> minimumHeight ) ) ; return false ; } if ( $ this -> minimumWidth && $ width < $ this -> minimumWidth ) { $ this -> setErrorMessage ( sprintf ( $ this -> messages [ 'size_width_min' ] , $ width , $ this -> minimumWidth ) ) ; return false ; } return true ; }
docstring: Validate the size. If the size is invalid, we will also push an error message with setErrorMessage.
  @param int $width
  @param int $height
  @return bool
docstring_tokens: Validate the size . If the size is invalid we will also push an error message with setErrorMessage .