original_string: protected function registerClassesFromMagicProperties()
      {
          $reflection      = new \ReflectionClass(self::class);
  
          $docComment      = $reflection->getDocComment();
          $magicProperties = $docComment ? explode(PHP_EOL, $docComment) : [];
  
          foreach ($magicProperties as $magicProperty) {
              if (strpos($magicProperty, '@property') === false) {
                  continue;
              }
  
              $partsString = trim(str_replace('* @property', '', $magicProperty));
              $parts       = explode('$', $partsString);
  
              list($className, $property) = $parts;
  
              $this->registerClass(trim($property), trim($className));
          }
          return $this;
      }
code: protected function registerClassesFromMagicProperties()
      {
          $reflection      = new \ReflectionClass(self::class);
  
          $docComment      = $reflection->getDocComment();
          $magicProperties = $docComment ? explode(PHP_EOL, $docComment) : [];
  
          foreach ($magicProperties as $magicProperty) {
              if (strpos($magicProperty, '@property') === false) {
                  continue;
              }
  
              $partsString = trim(str_replace('* @property', '', $magicProperty));
              $parts       = explode('$', $partsString);
  
              list($className, $property) = $parts;
  
              $this->registerClass(trim($property), trim($className));
          }
          return $this;
      }
code_tokens: protected function registerClassesFromMagicProperties ( ) { $ reflection = new \ ReflectionClass ( self :: class ) ; $ docComment = $ reflection -> getDocComment ( ) ; $ magicProperties = $ docComment ? explode ( PHP_EOL , $ docComment ) : [ ] ; foreach ( $ magicProperties as $ magicProperty ) { if ( strpos ( $ magicProperty , '@property' ) === false ) { continue ; } $ partsString = trim ( str_replace ( '* @property' , '' , $ magicProperty ) ) ; $ parts = explode ( '$' , $ partsString ) ; list ( $ className , $ property ) = $ parts ; $ this -> registerClass ( trim ( $ property ) , trim ( $ className ) ) ; } return $ this ; }
docstring: For all the magic properties defined at the start of this class, loop through them
  and add them to our list of magic properties.
  
  @return $this
docstring_tokens: For all the magic properties defined at the start of this class loop through them and add them to our list of magic properties .