analyzePropertyTypes() 공개 정적인 메소드

Check to see if the given Clazz is a duplicate
public static analyzePropertyTypes ( CodeBase $code_base, Clazz $clazz ) : null
$code_base Phan\CodeBase
$clazz Phan\Language\Element\Clazz
리턴 null
예제 #1
0
파일: Analysis.php 프로젝트: ablyler/phan
 /**
  * Take a pass over all classes verifying various
  * states.
  *
  * @return null
  */
 public static function analyzeClasses(CodeBase $code_base)
 {
     $class_count = count($code_base->getClassMap());
     // Take a pass to import all details from ancestors
     $i = 0;
     foreach ($code_base->getClassMap() as $fqsen => $class) {
         CLI::progress('classes', ++$i / $class_count);
         if ($class->isInternal()) {
             continue;
         }
         // Make sure the parent classes exist
         ParentClassExistsAnalyzer::analyzeParentClassExists($code_base, $class);
         DuplicateClassAnalyzer::analyzeDuplicateClass($code_base, $class);
         ParentConstructorCalledAnalyzer::analyzeParentConstructorCalled($code_base, $class);
         PropertyTypesAnalyzer::analyzePropertyTypes($code_base, $class);
     }
 }
예제 #2
0
 /**
  * Take a pass over all classes verifying various
  * states.
  *
  * @return null
  */
 public static function analyzeClasses(CodeBase $code_base)
 {
     $class_count = 2 * count($code_base->getClassMap());
     // Take a pass to import all details from ancestors
     $i = 0;
     foreach ($code_base->getClassMap() as $fqsen_string => $clazz) {
         CLI::progress('classes', ++$i / $class_count);
         // Make sure the parent classes exist
         ParentClassExistsAnalyzer::analyzeParentClassExists($code_base, $clazz);
         // Then import them
         $clazz->importAncestorClasses($code_base);
         // Then figure out which methods are overrides of
         // ancestor methods
         $clazz->analyzeMethodOverrides($code_base);
     }
     // Run a few checks on all of the classes
     foreach ($code_base->getClassMap() as $fqsen_string => $clazz) {
         CLI::progress('classes', ++$i / $class_count);
         if ($clazz->isInternal()) {
             continue;
         }
         DuplicateClassAnalyzer::analyzeDuplicateClass($code_base, $clazz);
         ParentConstructorCalledAnalyzer::analyzeParentConstructorCalled($code_base, $clazz);
         PropertyTypesAnalyzer::analyzePropertyTypes($code_base, $clazz);
     }
 }
예제 #3
0
파일: Clazz.php 프로젝트: etsy/phan
 /**
  * This method should be called after hydration
  *
  * @return void
  */
 public final function analyze(CodeBase $code_base)
 {
     if ($this->isInternal()) {
         return;
     }
     // Make sure the parent classes exist
     ParentClassExistsAnalyzer::analyzeParentClassExists($code_base, $this);
     DuplicateClassAnalyzer::analyzeDuplicateClass($code_base, $this);
     ParentConstructorCalledAnalyzer::analyzeParentConstructorCalled($code_base, $this);
     PropertyTypesAnalyzer::analyzePropertyTypes($code_base, $this);
     // Analyze this class to make sure that we don't have conflicting
     // types between similar inherited methods.
     CompositionAnalyzer::analyzeComposition($code_base, $this);
     // Let any configured plugins analyze the class
     ConfigPluginSet::instance()->analyzeClass($code_base, $this);
 }
예제 #4
0
파일: Clazz.php 프로젝트: tpunt/phan
 /**
  * This method should be called after hydration
  *
  * @return void
  */
 protected function analyzeOnce(CodeBase $code_base)
 {
     if ($this->isInternal()) {
         return;
     }
     // Analyze this class to make sure that
     CompositionAnalyzer::analyzeComposition($code_base, $this);
     // Make sure the parent classes exist
     ParentClassExistsAnalyzer::analyzeParentClassExists($code_base, $this);
     DuplicateClassAnalyzer::analyzeDuplicateClass($code_base, $this);
     ParentConstructorCalledAnalyzer::analyzeParentConstructorCalled($code_base, $this);
     PropertyTypesAnalyzer::analyzePropertyTypes($code_base, $this);
     // Let any configured plugins analyze the class
     ConfigPluginSet::instance()->analyzeClass($code_base, $this);
 }