Skip to content

Commit 0ffdc64

Browse files
authored
Merge pull request #149 from Gman98ish/pss-entity-fix
Made attachment and product extend entity
2 parents 9bb5a70 + 42414f6 commit 0ffdc64

File tree

2 files changed

+13
-38
lines changed

2 files changed

+13
-38
lines changed

src/PSS/Entities/Attachment.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
namespace UKFast\SDK\PSS\Entities;
44

5-
class Attachment
6-
{
7-
/**
8-
* @var string
9-
*/
10-
public $name;
5+
use UKFast\SDK\Entity;
116

12-
/**
13-
* Attachment constructor.
14-
* @param $item
15-
*/
16-
public function __construct($item)
17-
{
18-
$this->name = $item->name;
19-
}
7+
/**
8+
* @property string $name
9+
*/
10+
class Attachment extends Entity
11+
{
2012
}

src/PSS/Entities/Product.php

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,12 @@
22

33
namespace UKFast\SDK\PSS\Entities;
44

5-
class Product
6-
{
7-
/**
8-
* @var int
9-
*/
10-
public $id;
11-
12-
/**
13-
* @var string
14-
*/
15-
public $type;
5+
use UKFast\SDK\Entity;
166

17-
/**
18-
* Product constructor.
19-
* @param $item
20-
*/
21-
public function __construct($item = null)
22-
{
23-
if (is_null($item)) {
24-
return;
25-
}
26-
27-
$this->id = $item->id;
28-
$this->type = $item->type;
29-
}
7+
/**
8+
* @property int $id
9+
* @property string $type
10+
*/
11+
class Product extends Entity
12+
{
3013
}

0 commit comments

Comments
 (0)