| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function __construct($package, $id) |
||
| 19 | { |
||
| 20 | $this->id = (int) $id; |
||
| 21 | $this->name = $package->name; |
||
| 22 | $this->apps = $package->apps; |
||
| 23 | $this->page_content = $this->checkIssetField($package, 'page_content', 'none'); |
||
| 24 | $this->header = $this->checkIssetField($package, 'header_image', 'none'); |
||
| 25 | $this->small_logo = $this->checkIssetField($package, 'small_logo', 'none'); |
||
| 26 | $this->page_image = $this->checkIssetField($package, 'page_image', 'none'); |
||
| 27 | $this->price = $this->checkIssetField($package, 'price', $this->getFakePriceObject()); |
||
| 28 | $this->platforms = $package->platforms; |
||
| 29 | $this->controller = $package->controller; |
||
|
|
|||
| 30 | $this->release = $package->release_date; |
||
| 31 | } |
||
| 32 | |||
| 40 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: