original_string: protected function createChildContext(array $parentContext, $attribute/*, string $format = null */)
      {
          if (\func_num_args() >= 3) {
              $format = \func_get_arg(2);
          } else {
              // will be deprecated in version 4
              $format = null;
          }
  
          $context = parent::createChildContext($parentContext, $attribute, $format);
          // format is already included in the cache_key of the parent.
          $context['cache_key'] = $this->getCacheKey($format, $context);
  
          return $context;
      }
code: protected function createChildContext(array $parentContext, $attribute/*, string $format = null */)
      {
          if (\func_num_args() >= 3) {
              $format = \func_get_arg(2);
          } else {
              // will be deprecated in version 4
              $format = null;
          }
  
          $context = parent::createChildContext($parentContext, $attribute, $format);
          // format is already included in the cache_key of the parent.
          $context['cache_key'] = $this->getCacheKey($format, $context);
  
          return $context;
      }
code_tokens: protected function createChildContext ( array $ parentContext , $ attribute /*, string $format = null */ ) { if ( \ func_num_args ( ) >= 3 ) { $ format = \ func_get_arg ( 2 ) ; } else { // will be deprecated in version 4 $ format = null ; } $ context = parent :: createChildContext ( $ parentContext , $ attribute , $ format ) ; // format is already included in the cache_key of the parent. $ context [ 'cache_key' ] = $ this -> getCacheKey ( $ format , $ context ) ; return $ context ; }
docstring: Overwritten to update the cache key for the child.
  
  We must not mix up the attribute cache between parent and children.
  
  {@inheritdoc}
docstring_tokens: Overwritten to update the cache key for the child .