WishlistParser   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
c 3
b 0
f 0
lcom 1
cbo 1
dl 0
loc 33
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A processWishListUrl() 0 7 1
A getWishlistId() 0 4 1
1
<?php
2
/**
3
 * User: ms
4
 * Date: 12.10.15
5
 * Time: 22:16
6
 */
7
8
namespace Amazon;
9
10
/**
11
 * Class WishlistParser
12
 * @deprecated
13
 * @package Amazon
14
 */
15
class WishlistParser extends Parser
16
{
17
	/**
18
	 * @var null
19
	 */
20
	private $wishlistId = null;
21
22
	public function __construct($url)
23
	{
24
		parent::__construct($url);
25
		$urlParameter = parse_url($this->getUrl());
26
27
		$this->processWishListUrl($urlParameter);
28
	}
29
30
	protected function processWishListUrl($urlParameter)
31
	{
32
		$paramArray = explode('/', $urlParameter['path']);
33
34
		$this->wishlistId = $paramArray[4];
35
36
	}
37
38
	/**
39
	 * @return null
40
	 */
41
	public function getWishlistId()
42
	{
43
		return $this->wishlistId;
44
	}
45
46
47
}