Commit e4d6636f authored by steveoliver's avatar steveoliver Committed by bojanz

Issue #2833140: Remove $priority from resolvers since the implementation is incomplete

parent 3646c5fa
......@@ -72,8 +72,8 @@ class OrderRefresh implements OrderRefreshInterface {
/**
* {@inheritdoc}
*/
public function addProcessor(OrderProcessorInterface $processor, $priority) {
$this->processors[$priority] = $processor;
public function addProcessor(OrderProcessorInterface $processor) {
$this->processors[] = $processor;
}
/**
......
......@@ -14,10 +14,8 @@ interface OrderRefreshInterface {
*
* @param \Drupal\commerce_order\OrderProcessorInterface $processor
* The order processor.
* @param int $priority
* The processor's priority.
*/
public function addProcessor(OrderProcessorInterface $processor, $priority);
public function addProcessor(OrderProcessorInterface $processor);
/**
* Checks whether the order should be refreshed.
......
......@@ -29,8 +29,8 @@ class ChainOrderTypeResolver implements ChainOrderTypeResolverInterface {
/**
* {@inheritdoc}
*/
public function addResolver(OrderTypeResolverInterface $resolver, $priority) {
$this->resolvers[$priority] = $resolver;
public function addResolver(OrderTypeResolverInterface $resolver) {
$this->resolvers[] = $resolver;
}
/**
......
......@@ -15,10 +15,8 @@ interface ChainOrderTypeResolverInterface extends OrderTypeResolverInterface {
*
* @param \Drupal\commerce_order\Resolver\OrderTypeResolverInterface $resolver
* The resolver.
* @param int $priority
* The priority.
*/
public function addResolver(OrderTypeResolverInterface $resolver, $priority);
public function addResolver(OrderTypeResolverInterface $resolver);
/**
* Gets all added resolvers.
......
......@@ -289,7 +289,7 @@ class OrderRefreshTest extends CommerceKernelTestBase {
$time->getCurrentTime()->willReturn($current_time);
$time = $time->reveal();
$order_refresh = new OrderRefresh($entity_type_manager, $chain_price_resolver, $user, $time);
$order_refresh->addProcessor($this->container->get('commerce_order.availability_order_processor'), 0);
$order_refresh->addProcessor($this->container->get('commerce_order.availability_order_processor'));
return $order_refresh;
}
......
......@@ -27,8 +27,8 @@ class ChainStoreResolver implements ChainStoreResolverInterface {
/**
* {@inheritdoc}
*/
public function addResolver(StoreResolverInterface $resolver, $priority) {
$this->resolvers[$priority] = $resolver;
public function addResolver(StoreResolverInterface $resolver) {
$this->resolvers[] = $resolver;
}
/**
......
......@@ -15,10 +15,8 @@ interface ChainStoreResolverInterface extends StoreResolverInterface {
*
* @param \Drupal\commerce_store\Resolver\StoreResolverInterface $resolver
* The resolver.
* @param int $priority
* The priority.
*/
public function addResolver(StoreResolverInterface $resolver, $priority);
public function addResolver(StoreResolverInterface $resolver);
/**
* Gets all added resolvers.
......
......@@ -65,7 +65,7 @@ class ChainStoreResolverTest extends UnitTestCase {
];
arsort($resolvers, SORT_NUMERIC);
foreach ($resolvers as $id => $priority) {
$this->resolver->addResolver($container->get($id), $priority);
$this->resolver->addResolver($container->get($id));
}
$result = $this->resolver->resolve();
......
......@@ -27,8 +27,8 @@ class ChainCountryResolver implements ChainCountryResolverInterface {
/**
* {@inheritdoc}
*/
public function addResolver(CountryResolverInterface $resolver, $priority) {
$this->resolvers[$priority] = $resolver;
public function addResolver(CountryResolverInterface $resolver) {
$this->resolvers[] = $resolver;
}
/**
......
......@@ -15,10 +15,8 @@ interface ChainCountryResolverInterface extends CountryResolverInterface {
*
* @param \Drupal\commerce\Resolver\CountryResolverInterface $resolver
* The resolver.
* @param int $priority
* The priority.
*/
public function addResolver(CountryResolverInterface $resolver, $priority);
public function addResolver(CountryResolverInterface $resolver);
/**
* Gets all added resolvers.
......
......@@ -27,8 +27,8 @@ class ChainLocaleResolver implements ChainLocaleResolverInterface {
/**
* {@inheritdoc}
*/
public function addResolver(LocaleResolverInterface $resolver, $priority) {
$this->resolvers[$priority] = $resolver;
public function addResolver(LocaleResolverInterface $resolver) {
$this->resolvers[] = $resolver;
}
/**
......
......@@ -15,10 +15,8 @@ interface ChainLocaleResolverInterface extends LocaleResolverInterface {
*
* @param \Drupal\commerce\Resolver\LocaleResolverInterface $resolver
* The resolver.
* @param int $priority
* The priority.
*/
public function addResolver(LocaleResolverInterface $resolver, $priority);
public function addResolver(LocaleResolverInterface $resolver);
/**
* Gets all added resolvers.
......
......@@ -65,7 +65,7 @@ class ChainCountryResolverTest extends UnitTestCase {
];
arsort($resolvers, SORT_NUMERIC);
foreach ($resolvers as $id => $priority) {
$this->chainCountryResolver->addResolver($container->get($id), $priority);
$this->chainCountryResolver->addResolver($container->get($id));
}
$result = $this->chainCountryResolver->resolve();
......
......@@ -65,7 +65,7 @@ class ChainLocaleResolverTest extends UnitTestCase {
];
arsort($resolvers, SORT_NUMERIC);
foreach ($resolvers as $id => $priority) {
$this->chainLocaleResolver->addResolver($container->get($id), $priority);
$this->chainLocaleResolver->addResolver($container->get($id));
}
$result = $this->chainLocaleResolver->resolve();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment