Skip to content

Commit

Permalink
CS & Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
overclokk committed May 29, 2024
1 parent 20e9608 commit 660b696
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 21 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
"rector/rector": "^0.19.0",
"symplify/easy-coding-standard": "^12.0",

"italystrap/debug": "dev-master",
"wp-cli/wp-cli": "^2.7"
"italystrap/debug": "dev-master"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<directory name="functions" />
<directory name="src" />
<ignoreFiles>
<directory name="src/Application/Commands/WPCLI" />
<directory name="vendor" />
<file name="src/**/*Experimental*" />
</ignoreFiles>
Expand Down
10 changes: 3 additions & 7 deletions src/Application/Commands/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

namespace ItalyStrap\ThemeJsonGenerator\Application\Commands;

use ItalyStrap\Config\ConfigInterface;
use ItalyStrap\ThemeJsonGenerator\Application\Commands\Utils\RootFolderTrait;
use \ItalyStrap\ThemeJsonGenerator\Application\DumpMessage;
use ItalyStrap\ThemeJsonGenerator\Application\DumpMessage;
use ItalyStrap\ThemeJsonGenerator\Domain\Output\Dump;
use ItalyStrap\ThemeJsonGenerator\Domain\Output\Events\GeneratedFile;
use ItalyStrap\ThemeJsonGenerator\Domain\Output\Events\GeneratingFile;
Expand Down Expand Up @@ -51,18 +50,14 @@ final class DumpCommand extends Command

private Dump $dump;

private ConfigInterface $config;

private \Symfony\Component\EventDispatcher\EventDispatcher $subscriber;

public function __construct(
\Symfony\Component\EventDispatcher\EventDispatcher $subscriber,
Dump $dump,
ConfigInterface $config
Dump $dump
) {
$this->subscriber = $subscriber;
$this->dump = $dump;
$this->config = $config;
parent::__construct();
}

Expand Down Expand Up @@ -148,6 +143,7 @@ static function (GeneratedFile $event) use ($output): void {

$this->subscriber->addListener(
NoFileFound::class,
/** @psalm-suppress UnusedClosureParam */
static function (NoFileFound $event) use ($output): void {
$output->writeln(NoFileFound::M_NO_FILE_FOUND);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Commands/InfoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace ItalyStrap\ThemeJsonGenerator\Application\Commands;

use ItalyStrap\ThemeJsonGenerator\Application\Commands\Utils\RootFolderTrait;
use \ItalyStrap\ThemeJsonGenerator\Application\InfoMessage;
use ItalyStrap\ThemeJsonGenerator\Application\InfoMessage;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
namespace ItalyStrap\ThemeJsonGenerator\Application\Commands\Middleware;

use ItalyStrap\Bus\HandlerInterface;
use ItalyStrap\ThemeJsonGenerator\Application\Commands\ValidateMessage;
use ItalyStrap\ThemeJsonGenerator\Domain\Output\Validate;
use ItalyStrap\ThemeJsonGenerator\Application\ValidateMessage;

class DeleteSchemaJsonMiddleware implements \ItalyStrap\Bus\MiddlewareInterface
{
Expand Down
3 changes: 1 addition & 2 deletions src/Application/Commands/Middleware/SchemaJsonMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

namespace ItalyStrap\ThemeJsonGenerator\Application\Commands\Middleware;

use ItalyStrap\ThemeJsonGenerator\Application\Commands\ValidateMessage;
use ItalyStrap\ThemeJsonGenerator\Domain\Output\Validate;
use ItalyStrap\ThemeJsonGenerator\Application\ValidateMessage;

class SchemaJsonMiddleware implements \ItalyStrap\Bus\MiddlewareInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Domain/Output/Dump.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public function handle(DumpMessage $message): void
}

private function generateJsonFile(
DumpMessage $message,
string $fileName,
DumpMessage $message,
string $fileName,
\SplFileInfo $file,
Blueprint $blueprint
Blueprint $blueprint
): void {
$this->dispatcher->dispatch(new GeneratingFile($fileName . self::JSON_FILE_SUFFIX));

Expand Down
1 change: 0 additions & 1 deletion tests/_data/fixtures/theme.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
declare(strict_types=1);

return function (): void {

};
2 changes: 0 additions & 2 deletions wp-cli.local.yml

This file was deleted.

0 comments on commit 660b696

Please sign in to comment.