| @@ -34,14 +34,14 @@ discard block | ||
| 34 | 34 | * @param integer $id Unique resource ID | 
| 35 | 35 | * @return string Generated output | 
| 36 | 36 | */ | 
| 37 | - public function copyAction( $site = 'default', $resource, $id ) | |
| 37 | + public function copyAction($site = 'default', $resource, $id) | |
| 38 | 38 |  	{ | 
| 39 | -		if( config( 'shop.authorize', true ) ) { | |
| 40 | - $this->authorize( 'admin' ); | |
| 39 | +		if (config('shop.authorize', true)) { | |
| 40 | +			$this->authorize('admin'); | |
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | - $cntl = $this->createClient( $site, $resource ); | |
| 44 | - return $this->getHtml( $site, $cntl->copy( $id ) ); | |
| 43 | + $cntl = $this->createClient($site, $resource); | |
| 44 | + return $this->getHtml($site, $cntl->copy($id)); | |
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | 47 | |
| @@ -52,14 +52,14 @@ discard block | ||
| 52 | 52 | * @param string $sitecode Unique site code | 
| 53 | 53 | * @return string Generated output | 
| 54 | 54 | */ | 
| 55 | - public function createAction( $site = 'default', $resource ) | |
| 55 | + public function createAction($site = 'default', $resource) | |
| 56 | 56 |  	{ | 
| 57 | -		if( config( 'shop.authorize', true ) ) { | |
| 58 | - $this->authorize( 'admin' ); | |
| 57 | +		if (config('shop.authorize', true)) { | |
| 58 | +			$this->authorize('admin'); | |
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | - $cntl = $this->createClient( $site, $resource ); | |
| 62 | - return $this->getHtml( $site, $cntl->create() ); | |
| 61 | + $cntl = $this->createClient($site, $resource); | |
| 62 | + return $this->getHtml($site, $cntl->create()); | |
| 63 | 63 | } | 
| 64 | 64 | |
| 65 | 65 | |
| @@ -71,14 +71,14 @@ discard block | ||
| 71 | 71 | * @param integer $id Unique resource ID | 
| 72 | 72 | * @return string Generated output | 
| 73 | 73 | */ | 
| 74 | - public function deleteAction( $site = 'default', $resource, $id ) | |
| 74 | + public function deleteAction($site = 'default', $resource, $id) | |
| 75 | 75 |  	{ | 
| 76 | -		if( config( 'shop.authorize', true ) ) { | |
| 77 | - $this->authorize( 'admin' ); | |
| 76 | +		if (config('shop.authorize', true)) { | |
| 77 | +			$this->authorize('admin'); | |
| 78 | 78 | } | 
| 79 | 79 | |
| 80 | - $cntl = $this->createClient( $site, $resource ); | |
| 81 | - return $this->getHtml( $site, $cntl->delete( $id ) . $cntl->search() ); | |
| 80 | + $cntl = $this->createClient($site, $resource); | |
| 81 | + return $this->getHtml($site, $cntl->delete($id) . $cntl->search()); | |
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 | |
| @@ -90,14 +90,14 @@ discard block | ||
| 90 | 90 | * @param integer $id Unique resource ID | 
| 91 | 91 | * @return string Generated output | 
| 92 | 92 | */ | 
| 93 | - public function getAction( $site = 'default', $resource, $id ) | |
| 93 | + public function getAction($site = 'default', $resource, $id) | |
| 94 | 94 |  	{ | 
| 95 | -		if( config( 'shop.authorize', true ) ) { | |
| 96 | - $this->authorize( 'admin' ); | |
| 95 | +		if (config('shop.authorize', true)) { | |
| 96 | +			$this->authorize('admin'); | |
| 97 | 97 | } | 
| 98 | 98 | |
| 99 | - $cntl = $this->createClient( $site, $resource ); | |
| 100 | - return $this->getHtml( $site, $cntl->get( $id ) ); | |
| 99 | + $cntl = $this->createClient($site, $resource); | |
| 100 | + return $this->getHtml($site, $cntl->get($id)); | |
| 101 | 101 | } | 
| 102 | 102 | |
| 103 | 103 | |
| @@ -108,14 +108,14 @@ discard block | ||
| 108 | 108 | * @param string $sitecode Unique site code | 
| 109 | 109 | * @return string Generated output | 
| 110 | 110 | */ | 
| 111 | - public function saveAction( $site = 'default', $resource ) | |
| 111 | + public function saveAction($site = 'default', $resource) | |
| 112 | 112 |  	{ | 
| 113 | -		if( config( 'shop.authorize', true ) ) { | |
| 114 | - $this->authorize( 'admin' ); | |
| 113 | +		if (config('shop.authorize', true)) { | |
| 114 | +			$this->authorize('admin'); | |
| 115 | 115 | } | 
| 116 | 116 | |
| 117 | - $cntl = $this->createClient( $site, $resource ); | |
| 118 | - return $this->getHtml( $site, ( $cntl->save() ? : $cntl->search() ) ); | |
| 117 | + $cntl = $this->createClient($site, $resource); | |
| 118 | + return $this->getHtml($site, ($cntl->save() ?: $cntl->search())); | |
| 119 | 119 | } | 
| 120 | 120 | |
| 121 | 121 | |
| @@ -126,14 +126,14 @@ discard block | ||
| 126 | 126 | * @param string $sitecode Unique site code | 
| 127 | 127 | * @return string Generated output | 
| 128 | 128 | */ | 
| 129 | - public function searchAction( $site = 'default', $resource ) | |
| 129 | + public function searchAction($site = 'default', $resource) | |
| 130 | 130 |  	{ | 
| 131 | -		if( config( 'shop.authorize', true ) ) { | |
| 132 | - $this->authorize( 'admin' ); | |
| 131 | +		if (config('shop.authorize', true)) { | |
| 132 | +			$this->authorize('admin'); | |
| 133 | 133 | } | 
| 134 | 134 | |
| 135 | - $cntl = $this->createClient( $site, $resource ); | |
| 136 | - return $this->getHtml( $site, $cntl->search() ); | |
| 135 | + $cntl = $this->createClient($site, $resource); | |
| 136 | + return $this->getHtml($site, $cntl->search()); | |
| 137 | 137 | } | 
| 138 | 138 | |
| 139 | 139 | |
| @@ -143,20 +143,20 @@ discard block | ||
| 143 | 143 | * @param string $sitecode Unique site code | 
| 144 | 144 | * @return \Aimeos\MShop\Context\Item\Iface Context item | 
| 145 | 145 | */ | 
| 146 | - protected function createClient( $sitecode, $resource ) | |
| 146 | + protected function createClient($sitecode, $resource) | |
| 147 | 147 |  	{ | 
| 148 | - $lang = Input::get( 'lang', config( 'app.locale', 'en' ) ); | |
| 148 | +		$lang = Input::get('lang', config('app.locale', 'en')); | |
| 149 | 149 | |
| 150 | - $aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get(); | |
| 151 | - $templatePaths = $aimeos->getCustomPaths( 'admin/jqadm/templates' ); | |
| 150 | +		$aimeos = app('\Aimeos\Shop\Base\Aimeos')->get(); | |
| 151 | +		$templatePaths = $aimeos->getCustomPaths('admin/jqadm/templates'); | |
| 152 | 152 | |
| 153 | - $context = app( '\Aimeos\Shop\Base\Context' )->get( false ); | |
| 154 | - $context = $this->setLocale( $context, $sitecode, $lang ); | |
| 153 | +		$context = app('\Aimeos\Shop\Base\Context')->get(false); | |
| 154 | + $context = $this->setLocale($context, $sitecode, $lang); | |
| 155 | 155 | |
| 156 | - $view = app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang ); | |
| 157 | - $context->setView( $view ); | |
| 156 | +		$view = app('\Aimeos\Shop\Base\View')->create($context->getConfig(), $templatePaths, $lang); | |
| 157 | + $context->setView($view); | |
| 158 | 158 | |
| 159 | - return \Aimeos\Admin\JQAdm\Factory::createClient( $context, $templatePaths, $resource ); | |
| 159 | + return \Aimeos\Admin\JQAdm\Factory::createClient($context, $templatePaths, $resource); | |
| 160 | 160 | } | 
| 161 | 161 | |
| 162 | 162 | |
| @@ -166,11 +166,11 @@ discard block | ||
| 166 | 166 | * @param string $site | 
| 167 | 167 | * @param string $content | 
| 168 | 168 | */ | 
| 169 | - protected function getHtml( $site, $content ) | |
| 169 | + protected function getHtml($site, $content) | |
| 170 | 170 |  	{ | 
| 171 | -		$content = str_replace( ['{type}', '{version}'], ['Laravel', $this->getVersion()], $content ); | |
| 172 | - $params = array( 'site' => $site, 'content' => $content ); | |
| 171 | +		$content = str_replace(['{type}', '{version}'], ['Laravel', $this->getVersion()], $content); | |
| 172 | +		$params = array('site' => $site, 'content' => $content); | |
| 173 | 173 | |
| 174 | -		return View::make('shop::admin.jqadm', $params ); | |
| 174 | +		return View::make('shop::admin.jqadm', $params); | |
| 175 | 175 | } | 
| 176 | 176 | } |