Skip to content

Commit

Permalink
Renamed getObject() method to object()
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Nov 15, 2021
1 parent a27845e commit 1b16549
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion controller/frontend/src/Controller/Frontend/Base.php
Expand Up @@ -97,7 +97,7 @@ protected function getContext() : \Aimeos\MShop\Context\Item\Iface
*
* @return \Aimeos\Controller\Frontend\Iface Outmost decorator object
*/
protected function getObject() : Iface
protected function object() : Iface
{
if( $this->object !== null ) {
return $this->object;
Expand Down
10 changes: 5 additions & 5 deletions controller/frontend/src/Controller/Frontend/Basket/Base.php
Expand Up @@ -152,7 +152,7 @@ protected function checkLocale( \Aimeos\MShop\Locale\Item\Iface $locale, string
$this->copyProducts( $basket, $errors, $localeKey );
$this->copyCoupons( $basket, $errors, $localeKey );

$this->getObject()->get()->setCustomerId( $basket->getCustomerId() )
$this->object()->get()->setCustomerId( $basket->getCustomerId() )
->setCustomerReference( $basket->getCustomerReference() )
->setComment( $basket->getComment() );

Expand All @@ -179,7 +179,7 @@ protected function copyAddresses( \Aimeos\MShop\Order\Item\Base\Iface $basket, a
{
try
{
$this->getObject()->get()->addAddress( $item, $type, $pos );
$this->object()->get()->addAddress( $item, $type, $pos );
}
catch( \Exception $e )
{
Expand Down Expand Up @@ -212,7 +212,7 @@ protected function copyCoupons( \Aimeos\MShop\Order\Item\Base\Iface $basket, arr
{
try
{
$this->getObject()->addCoupon( $code );
$this->object()->addCoupon( $code );
$basket->deleteCoupon( $code, true );
}
catch( \Exception $e )
Expand Down Expand Up @@ -267,7 +267,7 @@ protected function copyProducts( \Aimeos\MShop\Order\Item\Base\Iface $basket, ar
$item = $manager->get( $product->getProductId(), $domains );
$item = $ruleManager->apply( $item, 'catalog' );

$this->getObject()->addProduct(
$this->object()->addProduct(
$item, $product->getQuantity(), $variantIds, $configIds, $customIds,
$product->getStockType(), $product->getSupplierId(), $product->getSiteId()
);
Expand Down Expand Up @@ -313,7 +313,7 @@ protected function copyServices( \Aimeos\MShop\Order\Item\Base\Iface $basket, ar
}

$service = $manager->get( $item->getServiceId(), ['media', 'price', 'text'] );
$this->getObject()->addService( $service, $attributes );
$this->object()->addService( $service, $attributes );
$basket->deleteService( $type );
}
catch( \Exception $e ) { ; } // Don't notify the user as appropriate services can be added automatically
Expand Down

0 comments on commit 1b16549

Please sign in to comment.