Completed
Push — master ( ceb428...d148de )
by Aimeos
02:24
created

Base   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A clearCache() 0 8 2
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2017
6
 * @package Client
7
 * @subpackage JsonApi
8
 */
9
10
11
namespace Aimeos\Client\JsonApi\Basket;
12
13
14
/**
15
 * Base class for JSON API basket clients
16
 *
17
 * @package Client
18
 * @subpackage JsonApi
19
 */
20
class Base extends \Aimeos\Client\JsonApi\Base
21
{
22
	/**
23
	 * Clears the basket cache shared between HTML and JSON clients
24
	 */
25
	protected function clearCache()
26
	{
27
		$session = $this->getContext()->getSession();
28
29
		foreach( $session->get( 'aimeos/basket/cache', [] ) as $key => $value ) {
30
			$session->set( $key, null );
31
		}
32
	}
33
}
34