original_string: private function isMaxDepthReached(array $attributesMetadata, string $class, string $attribute, array &$context): bool
      {
          $enableMaxDepth = $context[self::ENABLE_MAX_DEPTH] ?? $this->defaultContext[self::ENABLE_MAX_DEPTH] ?? false;
          if (
              !$enableMaxDepth ||
              !isset($attributesMetadata[$attribute]) ||
              null === $maxDepth = $attributesMetadata[$attribute]->getMaxDepth()
          ) {
              return false;
          }
  
          $key = sprintf(self::DEPTH_KEY_PATTERN, $class, $attribute);
          if (!isset($context[$key])) {
              $context[$key] = 1;
  
              return false;
          }
  
          if ($context[$key] === $maxDepth) {
              return true;
          }
  
          ++$context[$key];
  
          return false;
      }
code: private function isMaxDepthReached(array $attributesMetadata, string $class, string $attribute, array &$context): bool
      {
          $enableMaxDepth = $context[self::ENABLE_MAX_DEPTH] ?? $this->defaultContext[self::ENABLE_MAX_DEPTH] ?? false;
          if (
              !$enableMaxDepth ||
              !isset($attributesMetadata[$attribute]) ||
              null === $maxDepth = $attributesMetadata[$attribute]->getMaxDepth()
          ) {
              return false;
          }
  
          $key = sprintf(self::DEPTH_KEY_PATTERN, $class, $attribute);
          if (!isset($context[$key])) {
              $context[$key] = 1;
  
              return false;
          }
  
          if ($context[$key] === $maxDepth) {
              return true;
          }
  
          ++$context[$key];
  
          return false;
      }
code_tokens: private function isMaxDepthReached ( array $ attributesMetadata , string $ class , string $ attribute , array & $ context ) : bool { $ enableMaxDepth = $ context [ self :: ENABLE_MAX_DEPTH ] ?? $ this -> defaultContext [ self :: ENABLE_MAX_DEPTH ] ?? false ; if ( ! $ enableMaxDepth || ! isset ( $ attributesMetadata [ $ attribute ] ) || null === $ maxDepth = $ attributesMetadata [ $ attribute ] -> getMaxDepth ( ) ) { return false ; } $ key = sprintf ( self :: DEPTH_KEY_PATTERN , $ class , $ attribute ) ; if ( ! isset ( $ context [ $ key ] ) ) { $ context [ $ key ] = 1 ; return false ; } if ( $ context [ $ key ] === $ maxDepth ) { return true ; } ++ $ context [ $ key ] ; return false ; }
docstring: Is the max depth reached for the given attribute?
  
  @param AttributeMetadataInterface[] $attributesMetadata
docstring_tokens: Is the max depth reached for the given attribute?