Skip to content

Commit

Permalink
fixed issue with file comments and strict type generation
Browse files Browse the repository at this point in the history
  • Loading branch information
oliwierptak committed Mar 9, 2022
1 parent e517998 commit 01e4806
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion popo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ $:
config:
namespace: Popo
outputPath: src/
default:
comment: |
@SuppressWarnings(PHPMD)
@phpcs:ignoreFile
Expand Down
4 changes: 1 addition & 3 deletions src/Popo/Plugin/PhpFilePlugin/StrictTypesPhpFilePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class StrictTypesPhpFilePlugin implements PhpFilePluginInterface
{
public function run(PhpFile $file, Schema $schema): PhpFile
{
if ($schema->getConfig()->getComment() !== null) {
$file->addComment($schema->getConfig()->getComment());
}
$file->setStrictTypes(true);

return $file;
}
Expand Down
7 changes: 7 additions & 0 deletions src/Popo/PopoConfigurator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/**
* @SuppressWarnings(PHPMD)
* @phpcs:ignoreFile
*/

declare(strict_types=1);

namespace Popo;

use UnexpectedValueException;
Expand Down

0 comments on commit 01e4806

Please sign in to comment.