@@ -19,11 +19,23 @@ |
||
| 19 | 19 | |
| 20 | 20 | interface TaxonTranslationInterface extends SlugAwareInterface, ResourceInterface, TranslationInterface |
| 21 | 21 | { |
| 22 | + /** |
|
| 23 | + * @return string|null |
|
| 24 | + */ |
|
| 22 | 25 | public function getName(): ?string; |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 24 | 30 | public function setName(?string $name): void; |
| 25 | 31 | |
| 32 | + /** |
|
| 33 | + * @return string|null |
|
| 34 | + */ |
|
| 26 | 35 | public function getDescription(): ?string; |
| 27 | 36 | |
| 37 | + /** |
|
| 38 | + * @return void |
|
| 39 | + */ |
|
| 28 | 40 | public function setDescription(?string $description): void; |
| 29 | 41 | } |
@@ -15,8 +15,14 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | interface CredentialsHolderInterface |
| 17 | 17 | { |
| 18 | + /** |
|
| 19 | + * @return string|null |
|
| 20 | + */ |
|
| 18 | 21 | public function getPlainPassword(): ?string; |
| 19 | 22 | |
| 23 | + /** |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 20 | 26 | public function setPlainPassword(?string $plainPassword): void; |
| 21 | 27 | |
| 22 | 28 | /** |
@@ -29,6 +35,9 @@ discard block |
||
| 29 | 35 | */ |
| 30 | 36 | public function getPassword(); |
| 31 | 37 | |
| 38 | + /** |
|
| 39 | + * @return void |
|
| 40 | + */ |
|
| 32 | 41 | public function setPassword(?string $encodedPassword): void; |
| 33 | 42 | |
| 34 | 43 | /** |
@@ -45,6 +54,7 @@ discard block |
||
| 45 | 54 | * |
| 46 | 55 | * This is important if, at any given point, sensitive information like |
| 47 | 56 | * the plain-text password is stored on this object. |
| 57 | + * @return void |
|
| 48 | 58 | */ |
| 49 | 59 | public function eraseCredentials(); |
| 50 | 60 | } |
@@ -520,6 +520,9 @@ |
||
| 520 | 520 | ] = $data; |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | + /** |
|
| 524 | + * @param \DateTimeInterface|null $date |
|
| 525 | + */ |
|
| 523 | 526 | protected function hasExpired(?\DateTimeInterface $date): bool |
| 524 | 527 | { |
| 525 | 528 | return null !== $date && new \DateTime() >= $date; |
@@ -52,6 +52,9 @@ |
||
| 52 | 52 | return 'sylius_locale'; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string|null $localeCode |
|
| 57 | + */ |
|
| 55 | 58 | private function getLocaleCode(?string $localeCode): ?string |
| 56 | 59 | { |
| 57 | 60 | if (null !== $localeCode) { |
@@ -20,6 +20,7 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * @param string $code The code to be converted to a name |
| 22 | 22 | * @param string|null $localeCode The locale that the returned name should be in |
| 23 | + * @return string |
|
| 23 | 24 | */ |
| 24 | 25 | public function convertCodeToName(string $code, ?string $localeCode = null): ?string; |
| 25 | 26 | } |
@@ -17,5 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface FakeChannelCodeProviderInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return string |
|
| 22 | + */ |
|
| 20 | 23 | public function getCode(Request $request): ?string; |
| 21 | 24 | } |
@@ -16,6 +16,7 @@ discard block |
||
| 16 | 16 | use Doctrine\ORM\EntityManager; |
| 17 | 17 | use Doctrine\ORM\Mapping; |
| 18 | 18 | use Doctrine\ORM\QueryBuilder; |
| 19 | +use SyliusLabs\AssociationHydrator\AssociationHydrator; |
|
| 19 | 20 | use Sylius\Bundle\OrderBundle\Doctrine\ORM\OrderRepository as BaseOrderRepository; |
| 20 | 21 | use Sylius\Component\Core\Model\ChannelInterface; |
| 21 | 22 | use Sylius\Component\Core\Model\CustomerInterface; |
@@ -24,7 +25,6 @@ discard block |
||
| 24 | 25 | use Sylius\Component\Core\OrderCheckoutStates; |
| 25 | 26 | use Sylius\Component\Core\OrderPaymentStates; |
| 26 | 27 | use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
| 27 | -use SyliusLabs\AssociationHydrator\AssociationHydrator; |
|
| 28 | 28 | |
| 29 | 29 | class OrderRepository extends BaseOrderRepository implements OrderRepositoryInterface |
| 30 | 30 | { |
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | use Doctrine\ORM\EntityManager; |
| 17 | 17 | use Doctrine\ORM\Mapping; |
| 18 | 18 | use Doctrine\ORM\QueryBuilder; |
| 19 | +use SyliusLabs\AssociationHydrator\AssociationHydrator; |
|
| 19 | 20 | use Sylius\Bundle\ProductBundle\Doctrine\ORM\ProductRepository as BaseProductRepository; |
| 20 | 21 | use Sylius\Component\Core\Model\ChannelInterface; |
| 21 | 22 | use Sylius\Component\Core\Model\ProductInterface; |
| 22 | 23 | use Sylius\Component\Core\Model\TaxonInterface; |
| 23 | 24 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
| 24 | -use SyliusLabs\AssociationHydrator\AssociationHydrator; |
|
| 25 | 25 | |
| 26 | 26 | class ProductRepository extends BaseProductRepository implements ProductRepositoryInterface |
| 27 | 27 | { |
@@ -105,11 +105,11 @@ |
||
| 105 | 105 | if (isset($sorting['price'])) { |
| 106 | 106 | // Another hack, the subquery to get the first position variant |
| 107 | 107 | $subQuery = $this->createQueryBuilder('m') |
| 108 | - ->select('min(v.position)') |
|
| 109 | - ->innerJoin('m.variants', 'v') |
|
| 110 | - ->andWhere('m.id = :product_id') |
|
| 111 | - ->andWhere('v.enabled = :enabled') |
|
| 112 | - ; |
|
| 108 | + ->select('min(v.position)') |
|
| 109 | + ->innerJoin('m.variants', 'v') |
|
| 110 | + ->andWhere('m.id = :product_id') |
|
| 111 | + ->andWhere('v.enabled = :enabled') |
|
| 112 | + ; |
|
| 113 | 113 | |
| 114 | 114 | $queryBuilder |
| 115 | 115 | ->addSelect('variant') |
@@ -95,6 +95,7 @@ |
||
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * @param object $entity |
| 98 | + * @param string|null $manager |
|
| 98 | 99 | */ |
| 99 | 100 | private function getProperObjectManager(?string $manager, $entity): ?ObjectManager |
| 100 | 101 | { |