Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Henvald committed Jun 22, 2022
1 parent c0c9ab1 commit 277adf9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions Command/GenerateDocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
namespace StfalconStudio\SwaggerBundle\Command;

use StfalconStudio\SwaggerBundle\Generator\Generator;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
* GenerateDocsCommand.
*/
#[AsCommand(name: 'swagger:generate-docs', description: 'Generates swagger docs')]
class GenerateDocsCommand extends Command
{
protected static $defaultName = 'swagger:generate-docs';

private Generator $generator;
private readonly Generator $generator;

/**
* @param Generator $generator
Expand All @@ -42,7 +42,6 @@ public function __construct(Generator $generator)
protected function configure(): void
{
$this
->setDescription('Generate swagger docs')
->setHelp('This command generate swagger docs.')
;
}
Expand Down
6 changes: 3 additions & 3 deletions Generator/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
*/
class Generator
{
private Environment $twig;
private readonly Environment $twig;

private ConfigParser $configParser;
private readonly ConfigParser $configParser;

private string$docsFolder;
private readonly string $docsFolder;

/**
* @param Environment $twig
Expand Down
4 changes: 2 additions & 2 deletions Tests/Generator/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ final class GeneratorTest extends TestCase
private string $docsFile = __DIR__.'/Fixtures/index.html';

/** @var Environment|MockObject */
private $twig;
private Environment|MockObject $twig;

/** @var ConfigParser|MockObject */
private $parser;
private ConfigParser|MockObject $parser;

private Filesystem $filesystem;

Expand Down

0 comments on commit 277adf9

Please sign in to comment.