original_string: protected function addMagicMethods()
      {
          foreach ($this->magicMethods as $magic => $real) {
              list($className, $name) = explode('::', $real);
              if (!class_exists($className) && !interface_exists($className)) {
                  continue;
              }
              $method = new \ReflectionMethod($className, $name);
              $class = new \ReflectionClass($className);
  
              if (!in_array($magic, $this->usedMethods)) {
                  if ($class !== $this->root) {
                      $this->methods[] = new Method($method, $this->alias, $class, $magic, $this->interfaces);
                  }
                  $this->usedMethods[] = $magic;
              }
          }
      }
code: protected function addMagicMethods()
      {
          foreach ($this->magicMethods as $magic => $real) {
              list($className, $name) = explode('::', $real);
              if (!class_exists($className) && !interface_exists($className)) {
                  continue;
              }
              $method = new \ReflectionMethod($className, $name);
              $class = new \ReflectionClass($className);
  
              if (!in_array($magic, $this->usedMethods)) {
                  if ($class !== $this->root) {
                      $this->methods[] = new Method($method, $this->alias, $class, $magic, $this->interfaces);
                  }
                  $this->usedMethods[] = $magic;
              }
          }
      }
code_tokens: protected function addMagicMethods ( ) { foreach ( $ this -> magicMethods as $ magic => $ real ) { list ( $ className , $ name ) = explode ( '::' , $ real ) ; if ( ! class_exists ( $ className ) && ! interface_exists ( $ className ) ) { continue ; } $ method = new \ ReflectionMethod ( $ className , $ name ) ; $ class = new \ ReflectionClass ( $ className ) ; if ( ! in_array ( $ magic , $ this -> usedMethods ) ) { if ( $ class !== $ this -> root ) { $ this -> methods [ ] = new Method ( $ method , $ this -> alias , $ class , $ magic , $ this -> interfaces ) ; } $ this -> usedMethods [ ] = $ magic ; } } }
docstring: Add magic methods, as defined in the configuration files
docstring_tokens: Add magic methods as defined in the configuration files