original_string: protected function setFilter($filter)
      {
          if (!in_array($filter, [
              self::FILTER_EVERYTHING,
              MediaLibraryItem::FILE_TYPE_IMAGE,
              MediaLibraryItem::FILE_TYPE_AUDIO,
              MediaLibraryItem::FILE_TYPE_DOCUMENT,
              MediaLibraryItem::FILE_TYPE_VIDEO
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('media_filter', $filter);
      }
code: protected function setFilter($filter)
      {
          if (!in_array($filter, [
              self::FILTER_EVERYTHING,
              MediaLibraryItem::FILE_TYPE_IMAGE,
              MediaLibraryItem::FILE_TYPE_AUDIO,
              MediaLibraryItem::FILE_TYPE_DOCUMENT,
              MediaLibraryItem::FILE_TYPE_VIDEO
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('media_filter', $filter);
      }
code_tokens: protected function setFilter ( $ filter ) { if ( ! in_array ( $ filter , [ self :: FILTER_EVERYTHING , MediaLibraryItem :: FILE_TYPE_IMAGE , MediaLibraryItem :: FILE_TYPE_AUDIO , MediaLibraryItem :: FILE_TYPE_DOCUMENT , MediaLibraryItem :: FILE_TYPE_VIDEO ] ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ this -> putSession ( 'media_filter' , $ filter ) ; }
docstring: Sets the user filter from the session state
  @param string $filter
  @return void
docstring_tokens: Sets the user filter from the session state