original_string: public function setCallbacks(array $callbacks)
      {
          @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "callbacks" key of the context instead.', __METHOD__), E_USER_DEPRECATED);
  
          foreach ($callbacks as $attribute => $callback) {
              if (!\is_callable($callback)) {
                  throw new InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute));
              }
          }
          $this->defaultContext[self::CALLBACKS] = $this->callbacks = $callbacks;
  
          return $this;
      }
code: public function setCallbacks(array $callbacks)
      {
          @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "callbacks" key of the context instead.', __METHOD__), E_USER_DEPRECATED);
  
          foreach ($callbacks as $attribute => $callback) {
              if (!\is_callable($callback)) {
                  throw new InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute));
              }
          }
          $this->defaultContext[self::CALLBACKS] = $this->callbacks = $callbacks;
  
          return $this;
      }
code_tokens: public function setCallbacks ( array $ callbacks ) { @ trigger_error ( sprintf ( 'The "%s()" method is deprecated since Symfony 4.2, use the "callbacks" key of the context instead.' , __METHOD__ ) , E_USER_DEPRECATED ) ; foreach ( $ callbacks as $ attribute => $ callback ) { if ( ! \ is_callable ( $ callback ) ) { throw new InvalidArgumentException ( sprintf ( 'The given callback for attribute "%s" is not callable.' , $ attribute ) ) ; } } $ this -> defaultContext [ self :: CALLBACKS ] = $ this -> callbacks = $ callbacks ; return $ this ; }
docstring: Sets normalization callbacks.
  
  @deprecated since Symfony 4.2
  
  @param callable[] $callbacks Help normalize the result
  
  @return self
  
  @throws InvalidArgumentException if a non-callable callback is set
docstring_tokens: Sets normalization callbacks .