original_string: protected function _genericReturn($key, $type)
      {
          $listName = $this->_getCorrectList($type);
  
          switch (true) {
              case !$key:
                  return $this->$listName;
  
              case array_key_exists($key, $this->$listName):
                  $list = &$this->$listName;
                  return $list[$key];
  
              default:
                  return null;
          }
      }
code: protected function _genericReturn($key, $type)
      {
          $listName = $this->_getCorrectList($type);
  
          switch (true) {
              case !$key:
                  return $this->$listName;
  
              case array_key_exists($key, $this->$listName):
                  $list = &$this->$listName;
                  return $list[$key];
  
              default:
                  return null;
          }
      }
code_tokens: protected function _genericReturn ( $ key , $ type ) { $ listName = $ this -> _getCorrectList ( $ type ) ; switch ( true ) { case ! $ key : return $ this -> $ listName ; case array_key_exists ( $ key , $ this -> $ listName ) : $ list = & $ this -> $ listName ; return $ list [ $ key ] ; default : return null ; } }
docstring: common return data method for class data lists
  
  @param string $key
  @param string $type
  @return mixed|null
docstring_tokens: common return data method for class data lists