original_string: public function setSettings(array $settings = []) : self
      {
          $this->settings = array_merge($this->settings, $settings);
          // loop through checking each setting
          foreach ($this->allowedSettings as $name => $allowed) {
              $this->validateSettings->__invoke($name, $this->settings[$name], $allowed);
          }
  
          return $this;
      }
code: public function setSettings(array $settings = []) : self
      {
          $this->settings = array_merge($this->settings, $settings);
          // loop through checking each setting
          foreach ($this->allowedSettings as $name => $allowed) {
              $this->validateSettings->__invoke($name, $this->settings[$name], $allowed);
          }
  
          return $this;
      }
code_tokens: public function setSettings ( array $ settings = [ ] ) : self { $ this -> settings = array_merge ( $ this -> settings , $ settings ) ; // loop through checking each setting foreach ( $ this -> allowedSettings as $ name => $ allowed ) { $ this -> validateSettings -> __invoke ( $ name , $ this -> settings [ $ name ] , $ allowed ) ; } return $ this ; }
docstring: Set the settings.
  
  @param array $settings The new settings to be merged in.
  
  @return self
docstring_tokens: Set the settings .