Skip to content

Commit

Permalink
Changes constructor type signatures (#3919) (#3934)
Browse files Browse the repository at this point in the history
Changes the type signatures for a few classes to use interfaces instead of classes.
  • Loading branch information
aronbeal authored and LOBsTerr committed Sep 26, 2018
1 parent d1adc9d commit 37730ce
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions src/Command/Debug/EntityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Core\Command\Command;
use Drupal\Core\Entity\EntityTypeRepository;
use Drupal\Core\Entity\EntityTypeRepositoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;

class EntityCommand extends Command
{
/**
* @var EntityTypeRepository
* @var EntityTypeRepositoryInterface
*/
protected $entityTypeRepository;

Expand All @@ -28,11 +28,11 @@ class EntityCommand extends Command
/**
* EntityCommand constructor.
*
* @param EntityTypeRepository $entityTypeRepository
* @param EntityTypeManagerInterface $entityTypeManager
* @param EntityTypeRepositoryInterface $entityTypeRepository
* @param EntityTypeManagerInterface $entityTypeManager
*/
public function __construct(
EntityTypeRepository $entityTypeRepository,
EntityTypeRepositoryInterface $entityTypeRepository,
EntityTypeManagerInterface $entityTypeManager
) {
$this->entityTypeRepository = $entityTypeRepository;
Expand Down
10 changes: 5 additions & 5 deletions src/Command/Entity/DeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Core\Command\Command;
use Drupal\Core\Entity\EntityTypeRepository;
use Drupal\Core\Entity\EntityTypeRepositoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;

class DeleteCommand extends Command
{
/**
* @var EntityTypeRepository
* @var EntityTypeRepositoryInterface
*/
protected $entityTypeRepository;

Expand All @@ -29,11 +29,11 @@ class DeleteCommand extends Command
/**
* DeleteCommand constructor.
*
* @param EntityTypeRepository $entityTypeRepository
* @param EntityTypeManagerInterface $entityTypeManager
* @param EntityTypeRepositoryInterface $entityTypeRepository
* @param EntityTypeManagerInterface $entityTypeManager
*/
public function __construct(
EntityTypeRepository $entityTypeRepository,
EntityTypeRepositoryInterface $entityTypeRepository,
EntityTypeManagerInterface $entityTypeManager
) {
$this->entityTypeRepository = $entityTypeRepository;
Expand Down
16 changes: 8 additions & 8 deletions src/Command/Generate/PluginConditionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Core\Command\Command;
use Drupal\Core\Entity\EntityTypeRepository;
use Drupal\Core\Entity\EntityTypeRepositoryInterface;
use Drupal\Console\Generator\PluginConditionGenerator;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ConfirmationTrait;
Expand Down Expand Up @@ -59,18 +59,18 @@ class PluginConditionCommand extends Command
/**
* PluginConditionCommand constructor.
*
* @param Manager $extensionManager
* @param PluginConditionGenerator $generator
* @param ChainQueue $chainQueue
* @param EntityTypeRepository $entitytyperepository
* @param StringConverter $stringConverter
* @param Validator $validator
* @param Manager $extensionManager
* @param PluginConditionGenerator $generator
* @param ChainQueue $chainQueue
* @param EntityTypeRepositoryInterface $entitytyperepository
* @param StringConverter $stringConverter
* @param Validator $validator
*/
public function __construct(
Manager $extensionManager,
PluginConditionGenerator $generator,
ChainQueue $chainQueue,
EntityTypeRepository $entitytyperepository,
EntityTypeRepositoryInterface $entitytyperepository,
StringConverter $stringConverter,
Validator $validator
) {
Expand Down

0 comments on commit 37730ce

Please sign in to comment.