mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 01:52:02 -04:00
Add Safe PHP functions
This commit is contained in:
parent
04a956886a
commit
58cc098058
260 changed files with 49458 additions and 45 deletions
38
vendor/thecodingmachine/safe/generator/src/ScanObjectsCommand.php
vendored
Normal file
38
vendor/thecodingmachine/safe/generator/src/ScanObjectsCommand.php
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class ScanObjectsCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('scan-objects')
|
||||
->setDescription('Displays all methods of all objects not handled yet by Safe.')
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$scanner = new Scanner(__DIR__ . '/../doc/doc-en/en/reference/');
|
||||
|
||||
$paths = $scanner->getMethodsPaths();
|
||||
|
||||
[
|
||||
'functions' => $functions,
|
||||
'overloadedFunctions' => $overloadedFunctions
|
||||
] = $scanner->getMethods($paths);
|
||||
|
||||
foreach ($functions as $function) {
|
||||
$name = $function->getFunctionName();
|
||||
$output->writeln('Found method '.$name);
|
||||
}
|
||||
|
||||
$output->writeln('These methods are overloaded: '.\implode(', ', $overloadedFunctions));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue