Completed
Push — master ( 8d14cd...aab142 )
by Aimeos
01:56
created

src/Aimeos/Shop/Controller/BasketController.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * @license MIT, http://opensource.org/licenses/MIT
5
 * @copyright Aimeos (aimeos.org), 2015-2016
6
 * @package laravel
7
 * @subpackage Controller
8
 */
9
10
11
namespace Aimeos\Shop\Controller;
12
13
use Aimeos\Shop\Facades\Shop;
14
use Illuminate\Routing\Controller;
15
use Illuminate\Support\Facades\Response;
16
17
18
/**
19
 * Aimeos controller for basket related functionality.
20
 *
21
 * @package laravel
22
 * @subpackage Controller
23
 */
24
class BasketController extends Controller
25
{
26
	/**
27
	 * Returns the html for the standard basket page.
28
	 *
29
	 * @return \Illuminate\Http\Response Response object with output and headers
30
	 */
31 View Code Duplication
	public function indexAction()
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
32
	{
33
		$default = ['basket/standard','basket/related'];
34
35
		foreach( app( 'config' )->get( 'shop.page.basket-index', $default ) as $name )
36
		{
37
			$params['aiheader'][$name] = Shop::get( $name )->getHeader();
38
			$params['aibody'][$name] = Shop::get( $name )->getBody();
39
		}
40
41
		return Response::view('shop::basket.index', $params)->header('Cache-Control', 'no-store');
42
	}
43
}