classReporterRegistry
final class ReporterRegistry
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
The reporters available to a run.
Methods§
public function __construct(list<ReporterInterface> $reporters = [])Parameters
$reporters | list<ReporterInterface> | The reporters to register |
Calls 1
- method-call ReporterRegistry::register() line 25
public function register(ReporterInterface $reporter): voidAdds a reporter, replacing any registered under the same name.
Parameters
$reporter | ReporterInterface |
Test cases 1
Called from 1
Calls 1
- method-call ReporterInterface::name() line 34
public function names(): list<string>The registered names, in alphabetical order.
Returns
list<string>Test cases 2
Called from 2
public function has(string $name): boolWhether a reporter is registered under that name.
Parameters
$name | string |
Returns
boolTest cases 1
public function get(string $name): ReporterInterfaceThe reporter registered under that name.
Parameters
$name | string |
Returns
Throws
UnknownReporterException When nothing is registered under the nameTest cases 2
Called from 1
Calls 2
- new UnknownReporterException line 65
- method-call ReporterRegistry::names() line 65
public function all(): list<ReporterInterface>The registered reporters, in alphabetical order.
Returns
list<ReporterInterface>Called from 1
Calls 1
- method-call ReporterRegistry::names() line 76
Private surface 1§
Implementation details, listed for orientation only.
private array<string, ReporterInterface> $reporters = []Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
ReporterRegistryTest::testGetAnswersWithTheRegisteredReportercallsReporterRegistryTest::testGetRefusesAnUnknownNamecallsReporterRegistryTest::testHasReportsWhetherAReporterIsRegisteredcallsReporterRegistryTest::testNamesAreAlphabeticalcallsReporterRegistryTest::testRegisterReplacesAReporterOfTheSameNamecalls
Other tests reaching this symbol 3
CatalogCommandTestcallsUsageTextTestcallsBuiltinsTestcalls
Relations§
Instantiated in 1
Method calls 2
Type declarations 5
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:30
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:40
- type SqlCatalog\Cli\UsageText packages/sql-catalog/src/Cli/UsageText.php:19
- type SqlCatalog\Cli\UsageText packages/sql-catalog/src/Cli/UsageText.php:24
- type SqlCatalog\Facade\Builtins packages/sql-catalog/src/Facade/Builtins.php:40