original_string: protected function createItem(/*# string */ $key)/*# : CacheItemInterface */
      {
          // validate key first
          $this->validateKey($key);
  
          // use item factory
          if (is_callable($this->item_factory)) {
              $func = $this->item_factory;
              $item = $func($key, $this, $this->item_config);
  
          // default CacheItem class
          } else {
              $item = new CacheItem($key, $this, $this->item_config);
          }
  
          return $item;
      }
code: protected function createItem(/*# string */ $key)/*# : CacheItemInterface */
      {
          // validate key first
          $this->validateKey($key);
  
          // use item factory
          if (is_callable($this->item_factory)) {
              $func = $this->item_factory;
              $item = $func($key, $this, $this->item_config);
  
          // default CacheItem class
          } else {
              $item = new CacheItem($key, $this, $this->item_config);
          }
  
          return $item;
      }
code_tokens: protected function createItem ( /*# string */ $ key ) /*# : CacheItemInterface */ { // validate key first $ this -> validateKey ( $ key ) ; // use item factory if ( is_callable ( $ this -> item_factory ) ) { $ func = $ this -> item_factory ; $ item = $ func ( $ key , $ this , $ this -> item_config ) ; // default CacheItem class } else { $ item = new CacheItem ( $ key , $ this , $ this -> item_config ) ; } return $ item ; }
docstring: Create item object
  
  @param  string $key item key
  @return CacheItemInterface
  @throws Exception\InvalidArgumentException
  @access protected
docstring_tokens: Create item object