From 5c6741d6be7a04acb828f9fca6a8d135a2bcb008 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 5 Apr 2024 12:40:47 +0200 Subject: [PATCH] Fix code style (#27) --- Build/BuilderContext.php | 2 +- Build/BuilderInterface.php | 2 +- Builder/VirtualBuilder.php | 2 +- ContainerAwareInterface.php | 24 +++++++++---- .../DependencyInjection/ConfigurationTest.php | 36 +++++++++---------- Tests/ProphecyTrait.php | 9 +++++ 6 files changed, 47 insertions(+), 28 deletions(-) diff --git a/Build/BuilderContext.php b/Build/BuilderContext.php index 1a2a52c..68e0dba 100644 --- a/Build/BuilderContext.php +++ b/Build/BuilderContext.php @@ -24,7 +24,7 @@ class BuilderContext protected $output; protected $application; - public function __construct(InputInterface $input, OutputInterface $output, Application $application = null) + public function __construct(InputInterface $input, OutputInterface $output, ?Application $application = null) { $this->input = $input; $this->output = $output; diff --git a/Build/BuilderInterface.php b/Build/BuilderInterface.php index 8d34169..b9d601d 100644 --- a/Build/BuilderInterface.php +++ b/Build/BuilderInterface.php @@ -42,7 +42,7 @@ public function build(); /** * Set the builder context. * - * @param \Massive\Bundle\BuildBundle\Build\BuilderContext + * @param BuilderContext */ public function setContext(BuilderContext $context); } diff --git a/Builder/VirtualBuilder.php b/Builder/VirtualBuilder.php index 149e5f2..956be00 100644 --- a/Builder/VirtualBuilder.php +++ b/Builder/VirtualBuilder.php @@ -63,7 +63,7 @@ public function build() /** * Set the builder context. * - * @param \Massive\Bundle\BuildBundle\Build\BuilderContext + * @param BuilderContext */ public function setContext(BuilderContext $context) { diff --git a/ContainerAwareInterface.php b/ContainerAwareInterface.php index 45a680b..396ce79 100644 --- a/ContainerAwareInterface.php +++ b/ContainerAwareInterface.php @@ -1,17 +1,27 @@ 'Foo\Bar', - 'targets' => [ - 'all' => [ - 'dependencies' => [ - 'foo' => [], - 'bar' => [], - 'baz' => [], - ], + 'command_class' => 'Foo\Bar', + 'targets' => [ + 'all' => [ + 'dependencies' => [ + 'foo' => [], + 'bar' => [], + 'baz' => [], ], ], - ] + ], + ] ); } @@ -69,17 +69,17 @@ public function testTargetsAsNull() ], ], ], [ - 'command_class' => 'Massive\Bundle\BuildBundle\Command\BuildCommand', - 'targets' => [ - 'all' => [ - 'dependencies' => [ - 'foo' => [], - 'bar' => [], - 'baz' => [], - ], + 'command_class' => 'Massive\Bundle\BuildBundle\Command\BuildCommand', + 'targets' => [ + 'all' => [ + 'dependencies' => [ + 'foo' => [], + 'bar' => [], + 'baz' => [], ], ], - ] + ], + ] ); } } diff --git a/Tests/ProphecyTrait.php b/Tests/ProphecyTrait.php index b8887af..24b1255 100644 --- a/Tests/ProphecyTrait.php +++ b/Tests/ProphecyTrait.php @@ -1,5 +1,14 @@