Files
wp-agentic-writer/vendor/phpdocumentor/flyfinder/examples/04-sample-phpdoc-layout-using-glob.php
Dwindi Ramadhana 690991c526 refactor: Cleanup git state - commit all staged changes
Major refactoring cleanup:
- Add new controller architecture (class-controller-*.php)
- Add new settings-v2 UI (views/settings-v2/)
- Add new CSS architecture (agentic-sidebar.css, tokens)
- Add esbuild build pipeline (scripts/build.js, package.json)
- Add composer dependencies (vendor/)
- Add frontend src directory (assets/js/src/index.jsx)
- Add documentation files
- Remove old/obsolete files (class-settings.php, old CSS)

This commits all pending changes from previous refactoring efforts.
2026-06-17 05:27:58 +07:00

36 lines
1.2 KiB
PHP

<?php
require_once(__DIR__ . '/../vendor/autoload.php');
use Flyfinder\Specification\Glob;
use League\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;
use Flyfinder\Finder;
use Flyfinder\Path;
use Flyfinder\Specification\IsHidden;
use Flyfinder\Specification\HasExtension;
use Flyfinder\Specification\InPath;
use Flyfinder\Specification\AndSpecification;
// (03-sample-files based on some phpDocumentor2 src files)
$filesystem = new Filesystem(new Local(__DIR__ . '/03-sample-files'));
$filesystem->addPlugin(new Finder());
/*
* "phpdoc -d src -i src/phpDocumentor/DomainModel"
* should result in src/Cilex and src/phpDocumentor/. files being found,
* but src/phpDocumentor/DomainModel files being left out
*/
$dashDirectoryPath = new Glob('/src/**/*');
$dashIgnorePath = new InPath(new Path('src/phpDocumentor/DomainModel'));
$isHidden = new IsHidden();
$isPhpFile = new HasExtension(['php']);
$spec = new AndSpecification($dashDirectoryPath, $dashIgnorePath->notSpecification());
$spec->andSpecification($isHidden->notSpecification());
$spec->andSpecification($isPhpFile);
$generator = $filesystem->find($spec);
$result = [];
foreach($generator as $value) {
$result[] = $value;
}