Analyzer::Php::Cli
Inherits CliEndpointSupport < Analyzer < FileHelper < Reference < Object
Surfaces the command-line attack surface of PHP programs as cli://
endpoints: one endpoint per (sub)command with named options
(param_type "flag"), positional arguments ("argument") and consumed
environment variables ("env"). Covers Symfony Console, Laravel Artisan
($signature), Robo (@command docblocks) and WP-CLI, plus builtin
getopt / $argv / $_ENV / getenv.
Line-scan analyzer (Go/Ruby/Rust CLI house style) merging endpoints by URL. Subclasses Analyzer directly (PhpEngine is abstract) and reuses PhpEngine.test_path? to skip tests.
Constants
Laravel Artisan: protected $signature = '...'. The value is the
Symfony-Console-flavored mini-grammar Artisan parses itself:
name {arg} {arg? : desc} {arg=default} {--flag} {--flag=default : desc}.
Cheap file-level reject before the precise multi-regex evidence check. Every accepted CLI shape contains at least one of these literals.
$_ENV['X'] = v (plain assignment) is a write, not input; ==,
??= and .= still read or keep it.
Robo (consolidation/Robo task runner): a @command <name> docblock
tag binds to the very next method signature only — never sticky.
WP-CLI: WP_CLI::add_command('foo bar', 'Foo_Bar_Command') registers
a class as a command. Only the method whose OWN signature is the
conventional ($args, $assoc_args) callback is scanned for params —
never the whole class body.
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.