Skip to content

Commit

Permalink
style #9922 Apply coding standard fixes from SyliusLabs/CodingStandar…
Browse files Browse the repository at this point in the history
…d ^3.0@dev (pamil)

This PR was merged into the 1.2 branch.

Discussion
----------

This mostly removes redundant docblocks (when a typehint is enough).

Commits
-------

c01bf6a Apply coding standard fixes from SyliusLabs/CodingStandard ^3.0@dev
  • Loading branch information
pamil authored Nov 13, 2018
2 parents cdd88f8 + c01bf6a commit 82389a2
Show file tree
Hide file tree
Showing 1,284 changed files with 29 additions and 11,230 deletions.
3 changes: 0 additions & 3 deletions src/Sylius/Behat/Behaviour/DocumentAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@

trait DocumentAccessor
{
/**
* @return DocumentElement
*/
abstract protected function getDocument(): DocumentElement;
}
1 change: 0 additions & 1 deletion src/Sylius/Behat/Behaviour/Toggles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public function disable()
}

/**
* @param NodeElement $toggleableElement
* @param bool $expectedState
*
* @throws \RuntimeException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ final class ManagingProductVariantsContext implements Context
*/
private $session;

/**
* @param Client $client
* @param SessionInterface $session
*/
public function __construct(Client $client, SessionInterface $session)
{
$this->client = $client;
Expand Down Expand Up @@ -90,9 +86,6 @@ public function iShouldSeeTheProductVariantLabeledAs($label)
Assert::oneOf($label, $itemsLabels, 'Expected "%s" to be on the list, found: %s.');
}

/**
* @return mixed
*/
private function getJSONResponse()
{
return json_decode($this->client->getResponse()->getContent(), true);
Expand Down
4 changes: 0 additions & 4 deletions src/Sylius/Behat/Context/Api/Admin/ManagingTaxonsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ final class ManagingTaxonsContext implements Context
*/
private $session;

/**
* @param Client $client
* @param SessionInterface $session
*/
public function __construct(Client $client, SessionInterface $session)
{
$this->client = $client;
Expand Down
9 changes: 0 additions & 9 deletions src/Sylius/Behat/Context/Cli/InstallerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ final class InstallerContext implements Context
'confirmation' => 'pswd',
];

/**
* @param KernelInterface $kernel
*/
public function __construct(KernelInterface $kernel)
{
$this->kernel = $kernel;
Expand Down Expand Up @@ -138,9 +135,6 @@ public function iProvideFullAdministratorData(): void
$this->inputChoices['confirmation'] = $this->inputChoices['password'];
}

/**
* @param string $name
*/
private function iExecuteCommandWithInputChoices(string $name): void
{
try {
Expand All @@ -150,9 +144,6 @@ private function iExecuteCommandWithInputChoices(string $name): void
}
}

/**
* @param string $name
*/
private function iExecuteCommandAndConfirm(string $name): void
{
try {
Expand Down
4 changes: 0 additions & 4 deletions src/Sylius/Behat/Context/Domain/CartContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ final class CartContext implements Context
*/
private $expiredCartsRemover;

/**
* @param ObjectManager $orderManager
* @param ExpiredCartsRemoverInterface $expiredCartsRemover
*/
public function __construct(
ObjectManager $orderManager,
ExpiredCartsRemoverInterface $expiredCartsRemover
Expand Down
10 changes: 0 additions & 10 deletions src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,6 @@ final class ManagingOrdersContext implements Context
*/
private $unpaidOrdersStateUpdater;

/**
* @param SharedStorageInterface $sharedStorage
* @param OrderRepositoryInterface $orderRepository
* @param RepositoryInterface $orderItemRepository
* @param RepositoryInterface $addressRepository
* @param RepositoryInterface $adjustmentRepository
* @param ObjectManager $orderManager
* @param ProductVariantResolverInterface $variantResolver
* @param UnpaidOrdersStateUpdaterInterface $unpaidOrdersStateUpdater
*/
public function __construct(
SharedStorageInterface $sharedStorage,
OrderRepositoryInterface $orderRepository,
Expand Down
3 changes: 0 additions & 3 deletions src/Sylius/Behat/Context/Domain/ManagingPaymentsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ final class ManagingPaymentsContext implements Context
*/
private $paymentRepository;

/**
* @param PaymentRepositoryInterface $paymentRepository
*/
public function __construct(PaymentRepositoryInterface $paymentRepository)
{
$this->paymentRepository = $paymentRepository;
Expand Down
6 changes: 0 additions & 6 deletions src/Sylius/Behat/Context/Domain/ManagingProductsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ final class ManagingProductsContext implements Context
*/
private $productReviewRepository;

/**
* @param SharedStorageInterface $sharedStorage
* @param RepositoryInterface $productRepository
* @param RepositoryInterface $productVariantRepository
* @param RepositoryInterface $productReviewRepository
*/
public function __construct(
SharedStorageInterface $sharedStorage,
RepositoryInterface $productRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ final class ManagingPromotionCouponsContext implements Context
*/
private $couponRepository;

/**
* @param SharedStorageInterface $sharedStorage
* @param PromotionCouponRepositoryInterface $couponRepository
*/
public function __construct(SharedStorageInterface $sharedStorage, PromotionCouponRepositoryInterface $couponRepository)
{
$this->sharedStorage = $sharedStorage;
Expand Down
4 changes: 0 additions & 4 deletions src/Sylius/Behat/Context/Domain/ManagingPromotionsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ final class ManagingPromotionsContext implements Context
*/
private $promotionRepository;

/**
* @param SharedStorageInterface $sharedStorage
* @param PromotionRepositoryInterface $promotionRepository
*/
public function __construct(
SharedStorageInterface $sharedStorage,
PromotionRepositoryInterface $promotionRepository
Expand Down
3 changes: 0 additions & 3 deletions src/Sylius/Behat/Context/Domain/ManagingShipmentsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ final class ManagingShipmentsContext implements Context
*/
private $shipmentRepository;

/**
* @param ShipmentRepositoryInterface $shipmentRepository
*/
public function __construct(ShipmentRepositoryInterface $shipmentRepository)
{
$this->shipmentRepository = $shipmentRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ final class ManagingShippingMethodsContext implements Context
*/
private $shippingMethodManager;

/**
* @param RepositoryInterface $shippingMethodRepository
* @param ObjectManager $shippingMethodManager
*/
public function __construct(RepositoryInterface $shippingMethodRepository, ObjectManager $shippingMethodManager)
{
$this->shippingMethodRepository = $shippingMethodRepository;
Expand Down
3 changes: 0 additions & 3 deletions src/Sylius/Behat/Context/Hook/DoctrineORMContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ final class DoctrineORMContext implements Context
*/
private $entityManager;

/**
* @param EntityManagerInterface $entityManager
*/
public function __construct(EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;
Expand Down
4 changes: 0 additions & 4 deletions src/Sylius/Behat/Context/Hook/EmailSpoolContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ final class EmailSpoolContext implements Context
*/
private $filesystem;

/**
* @param EmailCheckerInterface $emailChecker
* @param Filesystem $filesystem
*/
public function __construct(EmailCheckerInterface $emailChecker, Filesystem $filesystem)
{
$this->spoolDirectory = $emailChecker->getSpoolDirectory();
Expand Down
3 changes: 0 additions & 3 deletions src/Sylius/Behat/Context/Hook/TestThemeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ final class TestThemeContext implements Context
*/
private $testThemeConfigurationManager;

/**
* @param TestThemeConfigurationManagerInterface $testThemeConfigurationManager
*/
public function __construct(TestThemeConfigurationManagerInterface $testThemeConfigurationManager)
{
$this->testThemeConfigurationManager = $testThemeConfigurationManager;
Expand Down
12 changes: 0 additions & 12 deletions src/Sylius/Behat/Context/Setup/AddressContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ final class AddressContext implements Context
*/
private $customerManager;

/**
* @param AddressRepositoryInterface $addressRepository
* @param ObjectManager $customerManager
*/
public function __construct(AddressRepositoryInterface $addressRepository, ObjectManager $customerManager)
{
$this->addressRepository = $addressRepository;
Expand Down Expand Up @@ -89,21 +85,13 @@ public function thisCustomerHasAnAddressInAddressBook(CustomerInterface $custome
$this->addAddressToCustomer($customer, $address);
}

/**
* @param CustomerInterface $customer
* @param AddressInterface $address
*/
private function addAddressToCustomer(CustomerInterface $customer, AddressInterface $address)
{
$customer->addAddress($address);

$this->customerManager->flush();
}

/**
* @param CustomerInterface $customer
* @param AddressInterface $address
*/
private function setDefaultAddressOfCustomer(CustomerInterface $customer, AddressInterface $address)
{
$customer->setDefaultAddress($address);
Expand Down
6 changes: 0 additions & 6 deletions src/Sylius/Behat/Context/Setup/AdminSecurityContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ final class AdminSecurityContext implements Context
*/
private $userRepository;

/**
* @param SharedStorageInterface $sharedStorage
* @param SecurityServiceInterface $securityService
* @param ExampleFactoryInterface $userFactory
* @param UserRepositoryInterface $userRepository
*/
public function __construct(
SharedStorageInterface $sharedStorage,
SecurityServiceInterface $securityService,
Expand Down
5 changes: 0 additions & 5 deletions src/Sylius/Behat/Context/Setup/AdminUserContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ final class AdminUserContext implements Context
*/
private $userRepository;

/**
* @param SharedStorageInterface $sharedStorage
* @param ExampleFactoryInterface $userFactory
* @param UserRepositoryInterface $userRepository
*/
public function __construct(
SharedStorageInterface $sharedStorage,
ExampleFactoryInterface $userFactory,
Expand Down
8 changes: 0 additions & 8 deletions src/Sylius/Behat/Context/Setup/ChannelContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ final class ChannelContext implements Context
*/
private $channelManager;

/**
* @param SharedStorageInterface $sharedStorage
* @param DefaultChannelFactoryInterface $unitedStatesChannelFactory
* @param DefaultChannelFactoryInterface $defaultChannelFactory
* @param ChannelRepositoryInterface $channelRepository
* @param ObjectManager $channelManager
*/
public function __construct(
SharedStorageInterface $sharedStorage,
DefaultChannelFactoryInterface $unitedStatesChannelFactory,
Expand Down Expand Up @@ -204,7 +197,6 @@ public function onThisChannelAccountVerificationIsNotRequired(ChannelInterface $
}

/**
* @param ChannelInterface $channel
* @param bool $state
*/
private function changeChannelState(ChannelInterface $channel, $state)
Expand Down
9 changes: 0 additions & 9 deletions src/Sylius/Behat/Context/Setup/CurrencyContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ final class CurrencyContext implements Context
*/
private $channelManager;

/**
* @param SharedStorageInterface $sharedStorage
* @param RepositoryInterface $currencyRepository
* @param FactoryInterface $currencyFactory
* @param ObjectManager $channelManager
*/
public function __construct(
SharedStorageInterface $sharedStorage,
RepositoryInterface $currencyRepository,
Expand Down Expand Up @@ -110,9 +104,6 @@ public function thatChannelAllowsToShopUsingAndCurrencies(ChannelInterface $chan
$this->channelManager->flush();
}

/**
* @param CurrencyInterface $currency
*/
private function saveCurrency(CurrencyInterface $currency)
{
$this->sharedStorage->set('currency', $currency);
Expand Down
9 changes: 0 additions & 9 deletions src/Sylius/Behat/Context/Setup/CustomerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ final class CustomerContext implements Context
*/
private $addressFactory;

/**
* @param SharedStorageInterface $sharedStorage
* @param CustomerRepositoryInterface $customerRepository
* @param ObjectManager $customerManager
* @param FactoryInterface $customerFactory
* @param FactoryInterface $userFactory
* @param FactoryInterface $addressFactory
*/
public function __construct(
SharedStorageInterface $sharedStorage,
CustomerRepositoryInterface $customerRepository,
Expand Down Expand Up @@ -210,7 +202,6 @@ public function thereIsUserIdentifiedByWithAsShippingCountry($email, CountryInte
* @param string $email
* @param string|null $firstName
* @param string|null $lastName
* @param \DateTimeInterface|null $createdAt
* @param string|null $phoneNumber
*
* @return CustomerInterface
Expand Down
5 changes: 0 additions & 5 deletions src/Sylius/Behat/Context/Setup/CustomerGroupContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ final class CustomerGroupContext implements Context
*/
private $customerGroupFactory;

/**
* @param SharedStorageInterface $sharedStorage
* @param RepositoryInterface $customerGroupRepository
* @param FactoryInterface $customerGroupFactory
*/
public function __construct(
SharedStorageInterface $sharedStorage,
RepositoryInterface $customerGroupRepository,
Expand Down
10 changes: 0 additions & 10 deletions src/Sylius/Behat/Context/Setup/ExchangeRateContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ final class ExchangeRateContext implements Context
*/
private $exchangeRateRepository;

/**
* @param SharedStorageInterface $sharedStorage
* @param FactoryInterface $exchangeRateFactory
* @param ExchangeRateRepositoryInterface $exchangeRateRepository
*/
public function __construct(
SharedStorageInterface $sharedStorage,
FactoryInterface $exchangeRateFactory,
Expand All @@ -66,8 +61,6 @@ public function thereIsAnExchangeRateWithSourceCurrencyAndTargetCurrency(
}

/**
* @param CurrencyInterface $sourceCurrency
* @param CurrencyInterface $targetCurrency
* @param float $ratio
*
* @return ExchangeRateInterface
Expand All @@ -83,9 +76,6 @@ private function createExchangeRate(CurrencyInterface $sourceCurrency, CurrencyI
return $exchangeRate;
}

/**
* @param ExchangeRateInterface $exchangeRate
*/
private function saveExchangeRate(ExchangeRateInterface $exchangeRate)
{
$this->exchangeRateRepository->add($exchangeRate);
Expand Down
8 changes: 0 additions & 8 deletions src/Sylius/Behat/Context/Setup/GeographicalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ final class GeographicalContext implements Context
*/
private $countryManager;

/**
* @param SharedStorageInterface $sharedStorage
* @param FactoryInterface $countryFactory
* @param FactoryInterface $provinceFactory
* @param RepositoryInterface $countryRepository
* @param CountryNameConverterInterface $countryNameConverter
* @param ObjectManager $countryManager
*/
public function __construct(
SharedStorageInterface $sharedStorage,
FactoryInterface $countryFactory,
Expand Down
Loading

0 comments on commit 82389a2

Please sign in to comment.