classCommandLine
final class CommandLine
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
What the command was asked to do.
Properties§
public list<string> $paths = []public string|null $output = nullpublic string $reporter = 'text'public list<string> $extensions = ['pdo', 'mysqli']public CatalogFilter $filter = new \SqlCatalog\Core\Filter\CatalogFilter()public list<string> $excluded = []public string $root = '.'public Severity|null $failOn = nullpublic bool $help = falsepublic bool $listExtensions = falsepublic bool $listReporters = falsepublic string|null $config = nullpublic Configuration $configuration = new \SqlCatalog\Facade\Configuration()public string|null $dialect = nullMethods§
public function __construct(
public list<string> $paths = [],
public string|null $output = null,
public string $reporter = 'text',
public list<string> $extensions = ['pdo', 'mysqli'],
public CatalogFilter $filter = new \SqlCatalog\Core\Filter\CatalogFilter(),
public list<string> $excluded = [],
public string $root = '.',
public Severity|null $failOn = null,
public bool $help = false,
public bool $listExtensions = false,
public bool $listReporters = false,
public string|null $config = null,
public Configuration $configuration = new \SqlCatalog\Facade\Configuration(),
public string|null $dialect = null,
)Parameters
$paths | list<string> | The files and directories to analyze |
$output | string|null | The directory to write the report into, or null for standard output |
$reporter | string | The reporter to render with |
$extensions | list<string> | The extensions whose database calls are recognised |
$filter | CatalogFilter | Which of the statements found to keep |
$excluded | list<string> | Patterns of source files to skip |
$root | string | The directory reported paths are relative to |
$failOn | Severity|null | The severity that makes the run report a failure |
$help | bool | Whether the command was asked for its help |
$listExtensions | bool | Whether the command was asked to list its extensions |
$listReporters | bool | Whether the command was asked to list its reporters |
$config | string|null | The catalog YAML file selected for this run |
$configuration | Configuration | |
$dialect | string|null | The SQL grammar used by framework builders |
Calls 2
- new CatalogFilter line 38
- new Configuration line 46
public function isQuery(): boolWhether the command was asked for information rather than for an analysis.
Returns
boolTest cases 1
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 6
CatalogCommandTest::testAnswerQueryListsTheExtensionsAndTheReporterscallsCatalogCommandTest::testExecuteAppliesTheFiltercallsCatalogCommandTest::testExecuteRefusesToRunWithoutAPathcallsCatalogCommandTest::testReportWritesIntoTheDirectoryItIsGivencallsCatalogCommandTest::testStatusReportsFindingsOnlyWhenAskedTocallsCommandLineParserTestcalls
Relations§
Instantiated in 1
Type declarations 6
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:74
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:112
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:131
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:148
- type SqlCatalog\Cli\CommandLineParser packages/sql-catalog/src/Cli/CommandLineParser.php:56
- type SqlCatalog\Cli\CommandLineParser packages/sql-catalog/src/Cli/CommandLineParser.php:139