Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrutinizer Auto-Fixes #298

Merged
merged 1 commit into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Aimeos/Shop/Base/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public function get( $locale = true, $type = 'frontend' )
$this->addMessageQueueManager( $context );
$this->addLogger( $context );
$this->addCache( $context );
$this->addMailer( $context);
$this->addMailer( $context );
$this->addProcess( $context );
$this->addSession( $context );
$this->addUser( $context);
$this->addGroups( $context);
$this->addUser( $context );
$this->addGroups( $context );

$this->context = $context;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Aimeos/Shop/Base/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Shop
* @param \Aimeos\Shop\Base\Context $context Context object
* @param \Aimeos\Shop\Base\View $view View object
*/
public function __construct( \Aimeos\Shop\Base\Aimeos $aimeos,
public function __construct( \Aimeos\Shop\Base\Aimeos $aimeos,
\Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\View $view )
{
$this->context = $context->get();
Expand Down
2 changes: 1 addition & 1 deletion src/Aimeos/Shop/Base/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ protected function addUrl( \Aimeos\MW\View\Iface $view )
}
}

$helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app('url'), $fixed );
$helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app( 'url' ), $fixed );
$view->addHelper( 'url', $helper );

return $view;
Expand Down
2 changes: 1 addition & 1 deletion src/Aimeos/Shop/Controller/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function indexAction()
$params['aibody'][$name] = Shop::get( $name )->getBody();
}

return Response::view('shop::account.index', $params);
return Response::view( 'shop::account.index', $params );
}


Expand Down
2 changes: 1 addition & 1 deletion src/Aimeos/Shop/Controller/BasketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ public function indexAction()
$params['aibody'][$name] = Shop::get( $name )->getBody();
}

return Response::view('shop::basket.index', $params)->header('Cache-Control', 'no-store');
return Response::view( 'shop::basket.index', $params )->header( 'Cache-Control', 'no-store' );
}
}
6 changes: 3 additions & 3 deletions src/Aimeos/Shop/Controller/CatalogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public function suggestAction()
$params['aibody'][$name] = Shop::get( $name )->getBody();
}

return Response::view('shop::catalog.suggest', $params)
->header('Cache-Control', 'private, max-age=300' )
->header('Content-Type', 'application/json');
return Response::view( 'shop::catalog.suggest', $params )
->header( 'Cache-Control', 'private, max-age=300' )
->header( 'Content-Type', 'application/json' );
}


Expand Down
6 changes: 3 additions & 3 deletions src/Aimeos/Shop/Controller/CheckoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function confirmAction()
$params['aibody'][$name] = Shop::get( $name )->getBody();
}

return Response::view('shop::checkout.confirm', $params)->header('Cache-Control', 'no-store');
return Response::view( 'shop::checkout.confirm', $params )->header( 'Cache-Control', 'no-store' );
}


Expand All @@ -53,7 +53,7 @@ public function indexAction()
$params['aibody'][$name] = Shop::get( $name )->getBody();
}

return Response::view('shop::checkout.index', $params)->header('Cache-Control', 'no-store');
return Response::view( 'shop::checkout.index', $params )->header( 'Cache-Control', 'no-store' );
}


Expand All @@ -70,6 +70,6 @@ public function updateAction()
$params['aibody'][$name] = Shop::get( $name )->getBody();
}

return Response::view('shop::checkout.update', $params)->header('Cache-Control', 'no-store');
return Response::view( 'shop::checkout.update', $params )->header( 'Cache-Control', 'no-store' );
}
}
4 changes: 2 additions & 2 deletions src/Aimeos/Shop/Controller/JqadmController.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ protected function createAdmin()
$paths = $aimeos->getCustomPaths( 'admin/jqadm/templates' );

$context = app( 'aimeos.context' )->get( false, 'backend' );
$context->setI18n( app('aimeos.i18n')->get( array( $lang, 'en' ) ) );
$context->setLocale( app('aimeos.locale')->getBackend( $context, $site ) );
$context->setI18n( app( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) );
$context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site ) );

$view = app( 'aimeos.view' )->create( $context, $paths, $lang );

Expand Down
4 changes: 2 additions & 2 deletions src/Aimeos/Shop/Controller/JsonadmController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ protected function createAdmin()
$templatePaths = $aimeos->getCustomPaths( 'admin/jsonadm/templates' );

$context = app( 'aimeos.context' )->get( false, 'backend' );
$context->setI18n( app('aimeos.i18n')->get( array( $lang, 'en' ) ) );
$context->setLocale( app('aimeos.locale')->getBackend( $context, $site ) );
$context->setI18n( app( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) );
$context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site ) );
$context->setView( app( 'aimeos.view' )->create( $context, $templatePaths, $lang ) );

return \Aimeos\Admin\JsonAdm::create( $context, $aimeos, $resource );
Expand Down
4 changes: 2 additions & 2 deletions src/Aimeos/Shop/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PageController extends Controller
*/
public function privacyAction()
{
return View::make('shop::page.privacy');
return View::make( 'shop::page.privacy' );
}


Expand All @@ -40,6 +40,6 @@ public function privacyAction()
*/
public function termsAction()
{
return View::make('shop::page.terms');
return View::make( 'shop::page.terms' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Attribute extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new attribute frontend controller object
*
* @return \Aimeos\Controller\Frontend\Attribute\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'attribute' );
}
/**
* Returns a new attribute frontend controller object
*
* @return \Aimeos\Controller\Frontend\Attribute\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'attribute' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Basket.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Basket extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new basket frontend controller object
*
* @return \Aimeos\Controller\Frontend\Basket\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'basket' );
}
/**
* Returns a new basket frontend controller object
*
* @return \Aimeos\Controller\Frontend\Basket\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'basket' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Catalog extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new catalog frontend controller object
*
* @return \Aimeos\Controller\Frontend\Catalog\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'catalog' );
}
/**
* Returns a new catalog frontend controller object
*
* @return \Aimeos\Controller\Frontend\Catalog\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'catalog' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Customer extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new customer frontend controller object
*
* @return \Aimeos\Controller\Frontend\Customer\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'customer' );
}
/**
* Returns a new customer frontend controller object
*
* @return \Aimeos\Controller\Frontend\Customer\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'customer' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Locale extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new locale frontend controller object
*
* @return \Aimeos\Controller\Frontend\Locale\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'locale' );
}
/**
* Returns a new locale frontend controller object
*
* @return \Aimeos\Controller\Frontend\Locale\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'locale' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Order extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new order frontend controller object
*
* @return \Aimeos\Controller\Frontend\Order\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'order' );
}
/**
* Returns a new order frontend controller object
*
* @return \Aimeos\Controller\Frontend\Order\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'order' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Product extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new product frontend controller object
*
* @return \Aimeos\Controller\Frontend\Product\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'product' );
}
/**
* Returns a new product frontend controller object
*
* @return \Aimeos\Controller\Frontend\Product\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'product' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
*/
class Shop extends \Illuminate\Support\Facades\Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'aimeos.shop';
}
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'aimeos.shop';
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Stock extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new stock frontend controller object
*
* @return \Aimeos\Controller\Frontend\Stock\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'stock' );
}
/**
* Returns a new stock frontend controller object
*
* @return \Aimeos\Controller\Frontend\Stock\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'stock' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Subscription extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new subscription frontend controller object
*
* @return \Aimeos\Controller\Frontend\Subscription\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'subscription' );
}
/**
* Returns a new subscription frontend controller object
*
* @return \Aimeos\Controller\Frontend\Subscription\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'subscription' );
}
}
18 changes: 9 additions & 9 deletions src/Aimeos/Shop/Facades/Supplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class Supplier extends \Illuminate\Support\Facades\Facade
{
/**
* Returns a new supplier frontend controller object
*
* @return \Aimeos\Controller\Frontend\Supplier\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'supplier' );
}
/**
* Returns a new supplier frontend controller object
*
* @return \Aimeos\Controller\Frontend\Supplier\Iface
*/
protected static function getFacadeAccessor()
{
return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'supplier' );
}
}