original_string: public function setArguments($arguments = array())
      {
          // add additional arguments
          if (!$arguments) {
              $arguments = array();
          }
          if (!is_array($arguments)) {
              throw new BaseException('Arguments must be always an array');
          }
          $this->arguments = $args = array_merge($this->arguments, $arguments);
          foreach ($args as $arg => $val) {
              if (is_null($val)) {
                  unset($this->arguments[$arg]);
              }
          }
  
          return $this;
      }
code: public function setArguments($arguments = array())
      {
          // add additional arguments
          if (!$arguments) {
              $arguments = array();
          }
          if (!is_array($arguments)) {
              throw new BaseException('Arguments must be always an array');
          }
          $this->arguments = $args = array_merge($this->arguments, $arguments);
          foreach ($args as $arg => $val) {
              if (is_null($val)) {
                  unset($this->arguments[$arg]);
              }
          }
  
          return $this;
      }
code_tokens: public function setArguments ( $ arguments = array ( ) ) { // add additional arguments if ( ! $ arguments ) { $ arguments = array ( ) ; } if ( ! is_array ( $ arguments ) ) { throw new BaseException ( 'Arguments must be always an array' ) ; } $ this -> arguments = $ args = array_merge ( $ this -> arguments , $ arguments ) ; foreach ( $ args as $ arg => $ val ) { if ( is_null ( $ val ) ) { unset ( $ this -> arguments [ $ arg ] ) ; } } return $ this ; }
docstring: Set arguments to specified array.
  
  @param array $arguments
  
  @return $this
docstring_tokens: Set arguments to specified array .