original_string: protected function findCommandsIn($path, $recursive = false)
      {
          $classes = [];
          foreach ($this->findCommandsFiles($path) as $filePath) {
  
              //$class = $classFinder->findClass($filePath);
  
              $class = Util::getClassNameFromFile($filePath);
              if ($class !== null) {
                  $namespace = Util::getNamespaceFromFile($filePath);
                  if ($namespace !== null) {
                      $class = "$namespace\\$class";
                  }
                  $class = Str::removeLeft($class, '\\');
                  $parents = class_parents($class);
  
                  if ($this->findCommandsExtending !== null && in_array($this->findCommandsExtending, $parents, true) === false) {
                      continue;
                  }
                  $ref = new \ReflectionClass($class);
                  if ($ref->isAbstract()) {
                      continue;
                  }
                  $classes[] = Str::removeLeft($class, '\\');
              }
          }
  
          return $classes;
      }
code: protected function findCommandsIn($path, $recursive = false)
      {
          $classes = [];
          foreach ($this->findCommandsFiles($path) as $filePath) {
  
              //$class = $classFinder->findClass($filePath);
  
              $class = Util::getClassNameFromFile($filePath);
              if ($class !== null) {
                  $namespace = Util::getNamespaceFromFile($filePath);
                  if ($namespace !== null) {
                      $class = "$namespace\\$class";
                  }
                  $class = Str::removeLeft($class, '\\');
                  $parents = class_parents($class);
  
                  if ($this->findCommandsExtending !== null && in_array($this->findCommandsExtending, $parents, true) === false) {
                      continue;
                  }
                  $ref = new \ReflectionClass($class);
                  if ($ref->isAbstract()) {
                      continue;
                  }
                  $classes[] = Str::removeLeft($class, '\\');
              }
          }
  
          return $classes;
      }
code_tokens: protected function findCommandsIn ( $ path , $ recursive = false ) { $ classes = [ ] ; foreach ( $ this -> findCommandsFiles ( $ path ) as $ filePath ) { //$class = $classFinder->findClass($filePath); $ class = Util :: getClassNameFromFile ( $ filePath ) ; if ( $ class !== null ) { $ namespace = Util :: getNamespaceFromFile ( $ filePath ) ; if ( $ namespace !== null ) { $ class = "$namespace\\$class" ; } $ class = Str :: removeLeft ( $ class , '\\' ) ; $ parents = class_parents ( $ class ) ; if ( $ this -> findCommandsExtending !== null && in_array ( $ this -> findCommandsExtending , $ parents , true ) === false ) { continue ; } $ ref = new \ ReflectionClass ( $ class ) ; if ( $ ref -> isAbstract ( ) ) { continue ; } $ classes [ ] = Str :: removeLeft ( $ class , '\\' ) ; } } return $ classes ; }
docstring: findCommandsIn method.
  
  @param      $path
  @param bool $recursive
  
  @return array
docstring_tokens: findCommandsIn method .