original_string: public function setRequirements()
      {
          if (!isset($this->options['requirements']) || $this->options['requirements'] === null) {
              return $this;
          }
  
          $requirements = $this->options['requirements'];
  
          if (!is_array($requirements)) {
              $requirements = [$requirements];
          }
  
          foreach ($requirements as $constraint) {
              $this->requirements[] = $constraint;
          }
  
          unset($this->options['requirements']);
  
          return $this;
      }
code: public function setRequirements()
      {
          if (!isset($this->options['requirements']) || $this->options['requirements'] === null) {
              return $this;
          }
  
          $requirements = $this->options['requirements'];
  
          if (!is_array($requirements)) {
              $requirements = [$requirements];
          }
  
          foreach ($requirements as $constraint) {
              $this->requirements[] = $constraint;
          }
  
          unset($this->options['requirements']);
  
          return $this;
      }
code_tokens: public function setRequirements ( ) { if ( ! isset ( $ this -> options [ 'requirements' ] ) || $ this -> options [ 'requirements' ] === null ) { return $ this ; } $ requirements = $ this -> options [ 'requirements' ] ; if ( ! is_array ( $ requirements ) ) { $ requirements = [ $ requirements ] ; } foreach ( $ requirements as $ constraint ) { $ this -> requirements [ ] = $ constraint ; } unset ( $ this -> options [ 'requirements' ] ) ; return $ this ; }
docstring: Set requirements.
docstring_tokens: Set requirements .