Пример #1
0
 public function getClasses($applicationRoot)
 {
     $result = ['excluded' => [], 'included' => [], 'all' => []];
     $classes = $this->inheritanceFinder->findImplements('Synga\\PhpStormMeta\\PhpStormMetaExtensionInterface');
     if (is_array($classes)) {
         foreach ($classes as $class) {
             $result['all'][] = $class->getFullQualifiedNamespace();
         }
     }
     $cachePath = $applicationRoot . '/.phpstorm.meta.cache';
     if (file_exists($cachePath)) {
         $result['excluded'] = unserialize(file_get_contents($cachePath));
     }
     $result['included'] = array_diff($result['all'], $result['excluded']);
     return $result;
 }
Пример #2
0
 public function exclude($applicationRoot)
 {
     $namespaces = [];
     $excludeArray = [];
     $classes = $this->inheritanceFinder->findImplements('\\Synga\\PhpStormMeta\\PhpStormMetaExtensionInterface');
     if (is_array($classes)) {
         $namespaces = [];
         foreach ($classes as $class) {
             $namespaces[] = $class->getFullQualifiedNamespace();
         }
     }
     $cachePath = $applicationRoot . '/.phpstorm.meta.cache';
     if (file_exists($cachePath)) {
         $excludeArray = unserialize(file_get_contents($cachePath));
     }
     $activeClasses = array_diff($namespaces, $excludeArray);
     $this->output->choice('Which class do you want to exclude?', $activeClasses, null, null, true);
 }