Skip to content

Commit 17f867f

Browse files
committed
chore: style changes
1 parent c246736 commit 17f867f

15 files changed

+26
-44
lines changed

src/Loader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class Loader
2929
/**
3030
* returns an array of pest plugins to execute.
3131
*
32-
* @param string $interface the interface for the hook to execute
32+
* @param string $interface the interface for the hook to execute
3333
* @return array<int, object> list of plugins
3434
*/
3535
public static function getPlugins(string $interface): array

src/Manager.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,11 @@ public function getCapabilities()
7171

7272
public function registerPlugins(): void
7373
{
74-
$cmd = new DumpCommand();
74+
$cmd = new DumpCommand;
7575
$cmd->setComposer($this->composer);
7676
$cmd->run(new ArrayInput([]), new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, true));
7777
}
7878

7979
/** {@inheritdoc} */
80-
public function deactivate(Composer $composer, IOInterface $io): void
81-
{
82-
}
80+
public function deactivate(Composer $composer, IOInterface $io): void {}
8381
}

src/PestCommandProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class PestCommandProvider implements CommandProviderCapability
1818
public function getCommands(): array
1919
{
2020
return [
21-
new DumpCommand(),
21+
new DumpCommand,
2222
];
2323
}
2424
}

tests/CommandProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
it('exists')->assertTrue(class_exists(PestCommandProvider::class));
77

88
it('returns the dump command', function () {
9-
$commandProvider = new PestCommandProvider();
9+
$commandProvider = new PestCommandProvider;
1010
$commands = $commandProvider->getCommands();
1111

1212
$this->assertCount(1, $commands);

tests/Commands/Dump.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use Tests\Stubs\Plugin3;
1111

1212
beforeEach(function () {
13-
$this->io = new NullIO();
14-
$this->composer = (new Factory())->createComposer($this->io);
15-
$this->dump = new DumpCommand();
13+
$this->io = new NullIO;
14+
$this->composer = (new Factory)->createComposer($this->io);
15+
$this->dump = new DumpCommand;
1616
$this->dump->setComposer($this->composer);
1717
});
1818

@@ -21,7 +21,7 @@
2121
it('should find a single plugin with one plugin class', function () {
2222
fakePlugin('pestphp/plugin1', [Plugin1::class]);
2323

24-
$this->dump->run(new ArrayInput([]), new NullOutput());
24+
$this->dump->run(new ArrayInput([]), new NullOutput);
2525

2626
$plugins = json_decode(file_get_contents('vendor/pest-plugins.json'), true);
2727

@@ -31,7 +31,7 @@
3131
it('should find a single plugin with multiple plugin classes', function () {
3232
fakePlugin('pestphp/plugin1', [Plugin1::class, Plugin2::class]);
3333

34-
$this->dump->run(new ArrayInput([]), new NullOutput());
34+
$this->dump->run(new ArrayInput([]), new NullOutput);
3535

3636
$plugins = json_decode(file_get_contents('vendor/pest-plugins.json'), true);
3737

@@ -43,7 +43,7 @@
4343
fakePlugin('pestphp/plugin1', [Plugin1::class]);
4444
fakePlugin('pestphp/plugin2', [Plugin2::class]);
4545

46-
$this->dump->run(new ArrayInput([]), new NullOutput());
46+
$this->dump->run(new ArrayInput([]), new NullOutput);
4747

4848
$plugins = json_decode(file_get_contents('vendor/pest-plugins.json'), true);
4949

@@ -54,7 +54,7 @@
5454
it('should find a dev plugin', function () {
5555
fakePlugin('pestphp/plugin1', [Plugin1::class], true);
5656

57-
$this->dump->run(new ArrayInput([]), new NullOutput());
57+
$this->dump->run(new ArrayInput([]), new NullOutput);
5858

5959
$plugins = json_decode(file_get_contents('vendor/pest-plugins.json'), true);
6060

@@ -73,7 +73,7 @@
7373

7474
$composer->getPackage()->setExtra($extra);
7575

76-
$this->dump->run(new ArrayInput([]), new NullOutput());
76+
$this->dump->run(new ArrayInput([]), new NullOutput);
7777
$plugins = json_decode(file_get_contents('vendor/pest-plugins.json'), true);
7878

7979
$this->assertContains(Plugin3::class, $plugins);

tests/Helpers.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
/**
88
* Creates the plugin requirement in the composer instance.
99
*
10-
* @param string $pluginName the name of the plugin to fake
10+
* @param string $pluginName the name of the plugin to fake
1111
* @param array<int, string> plugin classes to load
12-
* @param bool $dev determines if it should be added as a dev dependency
12+
* @param bool $dev determines if it should be added as a dev dependency
1313
*/
1414
function fakePlugin(string $pluginName, array $classes, bool $dev = false): void
1515
{

tests/Manager.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use Pest\Plugin\PestCommandProvider;
77

88
beforeEach(function () {
9-
$this->manager = new Manager();
10-
$this->io = new NullIO();
11-
$this->composer = (new Factory())->createComposer($this->io);
9+
$this->manager = new Manager;
10+
$this->io = new NullIO;
11+
$this->composer = (new Factory)->createComposer($this->io);
1212
});
1313

1414
it('exists')->assertTrue(class_exists(Manager::class));

tests/Stubs/AnotherDummyInterface.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
namespace Tests\Stubs;
44

5-
interface AnotherDummyInterface
6-
{
7-
}
5+
interface AnotherDummyInterface {}

tests/Stubs/DummyInterface.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
namespace Tests\Stubs;
44

5-
interface DummyInterface
6-
{
7-
}
5+
interface DummyInterface {}

tests/Stubs/PestPlugins/PluginOne.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66

77
use Tests\Stubs\YetAnotherDummyInterface;
88

9-
class PluginOne implements YetAnotherDummyInterface
10-
{
11-
}
9+
class PluginOne implements YetAnotherDummyInterface {}

tests/Stubs/PestPlugins/PluginTwo.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66

77
use Tests\Stubs\YetAnotherDummyInterface;
88

9-
class PluginTwo implements YetAnotherDummyInterface
10-
{
11-
}
9+
class PluginTwo implements YetAnotherDummyInterface {}

tests/Stubs/Plugin1.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
namespace Tests\Stubs;
44

5-
class Plugin1 implements DummyInterface, YetAnotherDummyInterface
6-
{
7-
}
5+
class Plugin1 implements DummyInterface, YetAnotherDummyInterface {}

tests/Stubs/Plugin2.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
namespace Tests\Stubs;
44

5-
class Plugin2 implements AnotherDummyInterface, YetAnotherDummyInterface
6-
{
7-
}
5+
class Plugin2 implements AnotherDummyInterface, YetAnotherDummyInterface {}

tests/Stubs/Plugin3.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
namespace Tests\Stubs;
44

5-
class Plugin3 implements AnotherDummyInterface, YetAnotherDummyInterface
6-
{
7-
}
5+
class Plugin3 implements AnotherDummyInterface, YetAnotherDummyInterface {}

tests/Stubs/YetAnotherDummyInterface.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
namespace Tests\Stubs;
66

7-
interface YetAnotherDummyInterface
8-
{
9-
}
7+
interface YetAnotherDummyInterface {}

0 commit comments

Comments
 (0)