original_string: public function add($key, $value = null)
      {
          if (is_array($key)) {
              foreach ($key as $innerKey => $innerValue) {
                  Arr::set($this->variables, $innerKey, $innerValue);
              }
          } elseif ($key instanceof Closure) {
              $this->variables[] = $key;
          } else {
              Arr::set($this->variables, $key, $value);
          }
  
          return $this;
      }
code: public function add($key, $value = null)
      {
          if (is_array($key)) {
              foreach ($key as $innerKey => $innerValue) {
                  Arr::set($this->variables, $innerKey, $innerValue);
              }
          } elseif ($key instanceof Closure) {
              $this->variables[] = $key;
          } else {
              Arr::set($this->variables, $key, $value);
          }
  
          return $this;
      }
code_tokens: public function add ( $ key , $ value = null ) { if ( is_array ( $ key ) ) { foreach ( $ key as $ innerKey => $ innerValue ) { Arr :: set ( $ this -> variables , $ innerKey , $ innerValue ) ; } } elseif ( $ key instanceof Closure ) { $ this -> variables [ ] = $ key ; } else { Arr :: set ( $ this -> variables , $ key , $ value ) ; } return $ this ; }
docstring: Add a variable.
  
  @param array|string|\Closure $key
  @param mixed                 $value
  
  @return $this
docstring_tokens: Add a variable .