original_string: public function setDefinitions($definitions)
      {
          if (\is_string($definitions)) {
              $definitions = [$definitions];
          }
  
          if ($definitions instanceof \Traversable) {
              $definitions = \iterator_to_array($definitions);
          }
  
          if (!\is_array($definitions)) {
              throw new \InvalidArgumentException(
                  \sprintf('Definitions must be a string or traversable. %s given', \gettype($definitions))
              );
          }
  
          \array_walk(
              $definitions,
              function ($definition) {
                  if (!\is_array($definition) && !\is_string($definition)) {
                      throw new \InvalidArgumentException(
                          \sprintf(
                              'A definition must be an array or a file or directory path. %s given',
                              \gettype($definition)
                          )
                      );
                  }
              }
          );
  
          $this->definitions = $definitions;
  
          return $this;
      }
code: public function setDefinitions($definitions)
      {
          if (\is_string($definitions)) {
              $definitions = [$definitions];
          }
  
          if ($definitions instanceof \Traversable) {
              $definitions = \iterator_to_array($definitions);
          }
  
          if (!\is_array($definitions)) {
              throw new \InvalidArgumentException(
                  \sprintf('Definitions must be a string or traversable. %s given', \gettype($definitions))
              );
          }
  
          \array_walk(
              $definitions,
              function ($definition) {
                  if (!\is_array($definition) && !\is_string($definition)) {
                      throw new \InvalidArgumentException(
                          \sprintf(
                              'A definition must be an array or a file or directory path. %s given',
                              \gettype($definition)
                          )
                      );
                  }
              }
          );
  
          $this->definitions = $definitions;
  
          return $this;
      }
code_tokens: public function setDefinitions ( $ definitions ) { if ( \ is_string ( $ definitions ) ) { $ definitions = [ $ definitions ] ; } if ( $ definitions instanceof \ Traversable ) { $ definitions = \ iterator_to_array ( $ definitions ) ; } if ( ! \ is_array ( $ definitions ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Definitions must be a string or traversable. %s given' , \ gettype ( $ definitions ) ) ) ; } \ array_walk ( $ definitions , function ( $ definition ) { if ( ! \ is_array ( $ definition ) && ! \ is_string ( $ definition ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'A definition must be an array or a file or directory path. %s given' , \ gettype ( $ definition ) ) ) ; } } ) ; $ this -> definitions = $ definitions ; return $ this ; }
docstring: Set definitions.
  
  @param string|array|\Traversable $definitions
  
  @throws \InvalidArgumentException
  
  @return static
docstring_tokens: Set definitions .