Skip to content

Commit

Permalink
Fix code style (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored Apr 5, 2024
1 parent 267c495 commit 5c6741d
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Build/BuilderContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Build/BuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function build();
/**
* Set the builder context.
*
* @param \Massive\Bundle\BuildBundle\Build\BuilderContext
* @param BuilderContext
*/
public function setContext(BuilderContext $context);
}
2 changes: 1 addition & 1 deletion Builder/VirtualBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function build()
/**
* Set the builder context.
*
* @param \Massive\Bundle\BuildBundle\Build\BuilderContext
* @param BuilderContext
*/
public function setContext(BuilderContext $context)
{
Expand Down
24 changes: 17 additions & 7 deletions ContainerAwareInterface.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
<?php

/*
* This file is part of the MassiveBuildBundle
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Massive\Bundle\BuildBundle;

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface as SymfonyContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

if (\class_exists(SymfonyContainerAwareInterface::class)) {
\class_alias(ContainerAwareInterface::class, SymfonyContainerAwareInterface::class);
} else {
interface ContainerAwareInterface {
/**
* @return void
*/
public function setContainer(?ContainerInterface $container = null);
}
interface ContainerAwareInterface
{
/**
* @return void
*/
public function setContainer(?ContainerInterface $container = null);
}
}
36 changes: 18 additions & 18 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ public function testConfiguration()
],
],
], [
'command_class' => 'Foo\Bar',
'targets' => [
'all' => [
'dependencies' => [
'foo' => [],
'bar' => [],
'baz' => [],
],
'command_class' => 'Foo\Bar',
'targets' => [
'all' => [
'dependencies' => [
'foo' => [],
'bar' => [],
'baz' => [],
],
],
]
],
]
);
}

Expand All @@ -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' => [],
],
],
]
],
]
);
}
}
9 changes: 9 additions & 0 deletions Tests/ProphecyTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the MassiveBuildBundle
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Massive\Bundle\BuildBundle\Tests;

use Prophecy\PhpUnit\ProphecyTrait as ProphecyProphecyTrait;
Expand Down

0 comments on commit 5c6741d

Please sign in to comment.