original_string: private function extractFromConstructor(string $class, string $property): ?array
      {
          try {
              $reflectionClass = new \ReflectionClass($class);
          } catch (\ReflectionException $e) {
              return null;
          }
  
          $constructor = $reflectionClass->getConstructor();
  
          if (!$constructor) {
              return null;
          }
  
          foreach ($constructor->getParameters() as $parameter) {
              if ($property !== $parameter->name) {
                  continue;
              }
              $reflectionType = $parameter->getType();
  
              return $reflectionType ? [$this->extractFromReflectionType($reflectionType, $constructor)] : null;
          }
  
          if ($parentClass = $reflectionClass->getParentClass()) {
              return $this->extractFromConstructor($parentClass->getName(), $property);
          }
  
          return null;
      }
code: private function extractFromConstructor(string $class, string $property): ?array
      {
          try {
              $reflectionClass = new \ReflectionClass($class);
          } catch (\ReflectionException $e) {
              return null;
          }
  
          $constructor = $reflectionClass->getConstructor();
  
          if (!$constructor) {
              return null;
          }
  
          foreach ($constructor->getParameters() as $parameter) {
              if ($property !== $parameter->name) {
                  continue;
              }
              $reflectionType = $parameter->getType();
  
              return $reflectionType ? [$this->extractFromReflectionType($reflectionType, $constructor)] : null;
          }
  
          if ($parentClass = $reflectionClass->getParentClass()) {
              return $this->extractFromConstructor($parentClass->getName(), $property);
          }
  
          return null;
      }
code_tokens: private function extractFromConstructor ( string $ class , string $ property ) : ? array { try { $ reflectionClass = new \ ReflectionClass ( $ class ) ; } catch ( \ ReflectionException $ e ) { return null ; } $ constructor = $ reflectionClass -> getConstructor ( ) ; if ( ! $ constructor ) { return null ; } foreach ( $ constructor -> getParameters ( ) as $ parameter ) { if ( $ property !== $ parameter -> name ) { continue ; } $ reflectionType = $ parameter -> getType ( ) ; return $ reflectionType ? [ $ this -> extractFromReflectionType ( $ reflectionType , $ constructor ) ] : null ; } if ( $ parentClass = $ reflectionClass -> getParentClass ( ) ) { return $ this -> extractFromConstructor ( $ parentClass -> getName ( ) , $ property ) ; } return null ; }
docstring: Tries to extract type information from constructor.
  
  @return Type[]|null
docstring_tokens: Tries to extract type information from constructor .