original_string: protected function setSelectionParams($selectionMode, $selectionWidth, $selectionHeight)
      {
          if (!in_array($selectionMode, [
              self::SELECTION_MODE_NORMAL,
              self::SELECTION_MODE_FIXED_RATIO,
              self::SELECTION_MODE_FIXED_SIZE
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          if (strlen($selectionWidth) && !ctype_digit($selectionWidth)) {
              throw new ApplicationException('Invalid input data');
          }
  
          if (strlen($selectionHeight) && !ctype_digit($selectionHeight)) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('media_crop_selection_params', [
              'mode'   => $selectionMode,
              'width'  => $selectionWidth,
              'height' => $selectionHeight
          ]);
      }
code: protected function setSelectionParams($selectionMode, $selectionWidth, $selectionHeight)
      {
          if (!in_array($selectionMode, [
              self::SELECTION_MODE_NORMAL,
              self::SELECTION_MODE_FIXED_RATIO,
              self::SELECTION_MODE_FIXED_SIZE
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          if (strlen($selectionWidth) && !ctype_digit($selectionWidth)) {
              throw new ApplicationException('Invalid input data');
          }
  
          if (strlen($selectionHeight) && !ctype_digit($selectionHeight)) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('media_crop_selection_params', [
              'mode'   => $selectionMode,
              'width'  => $selectionWidth,
              'height' => $selectionHeight
          ]);
      }
code_tokens: protected function setSelectionParams ( $ selectionMode , $ selectionWidth , $ selectionHeight ) { if ( ! in_array ( $ selectionMode , [ self :: SELECTION_MODE_NORMAL , self :: SELECTION_MODE_FIXED_RATIO , self :: SELECTION_MODE_FIXED_SIZE ] ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } if ( strlen ( $ selectionWidth ) && ! ctype_digit ( $ selectionWidth ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } if ( strlen ( $ selectionHeight ) && ! ctype_digit ( $ selectionHeight ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ this -> putSession ( 'media_crop_selection_params' , [ 'mode' => $ selectionMode , 'width' => $ selectionWidth , 'height' => $ selectionHeight ] ) ; }
docstring: Stores the user selection parameters in the session state
  @param string $selectionMode
  @param int $selectionWidth
  @param int $selectionHeight
  @return void
docstring_tokens: Stores the user selection parameters in the session state