Skip to content

Commit

Permalink
Fix test errors and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Aug 27, 2020
1 parent c843f7a commit 7bc9717
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/AnnotatedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,4 @@ public function injectIntoCommandfileInstance(InputInterface $input, OutputInter
{
InjectionHelper::injectIntoCallbackObject($this->commandCallback, $input, $output);
}

}
5 changes: 3 additions & 2 deletions src/Hooks/Dispatchers/CommandEventHookDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace Consolidation\AnnotatedCommand\Hooks\Dispatchers;

use Consolidation\AnnotatedCommand\AnnotatedCommand;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\InjectionHelper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Consolidation\AnnotatedCommand\AnnotatedCommand;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
* Call hooks
Expand Down
3 changes: 2 additions & 1 deletion src/Hooks/Dispatchers/InitializeHookDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace Consolidation\AnnotatedCommand\Hooks\Dispatchers;

use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Hooks\InitializeHookInterface;
use Consolidation\AnnotatedCommand\InjectionHelper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;

Expand Down
1 change: 1 addition & 0 deletions src/Hooks/Dispatchers/InteractHookDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Hooks\InteractorInterface;
use Consolidation\AnnotatedCommand\InjectionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

Expand Down
1 change: 1 addition & 0 deletions src/Hooks/Dispatchers/ProcessResultHookDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Hooks\ProcessResultInterface;
use Consolidation\AnnotatedCommand\InjectionHelper;

/**
* Call hooks
Expand Down
1 change: 1 addition & 0 deletions src/Hooks/Dispatchers/ValidateHookDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Consolidation\AnnotatedCommand\CommandError;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Hooks\ValidatorInterface;
use Consolidation\AnnotatedCommand\InjectionHelper;

/**
* Call hooks
Expand Down
4 changes: 2 additions & 2 deletions src/InjectionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

public class InjectionHelper
class InjectionHelper
{
/**
* Inject $input and $output into the command instance if it is set up to receive them.
Expand All @@ -16,7 +16,7 @@
*/
public static function injectIntoCallbackObject($callback, InputInterface $input, OutputInterface $output = null)
{
$callbackObject = $this->recoverCallbackObject($callback);
$callbackObject = static::recoverCallbackObject($callback);
if (!$callbackObject) {
return;
}
Expand Down

0 comments on commit 7bc9717

Please sign in to comment.