Skip to content

Commit 33121c4

Browse files
author
Teakowa
committed
fix: Containers/Package.php method error
Remove `formatPriceObject` method in Containers/Package.php price, it should be the same as the Containers/App.php
1 parent aa443d4 commit 33121c4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Syntax/SteamApi/Containers/Package.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,16 @@ public function __construct($package, $id)
2424
$this->header = $this->checkIssetField($package, 'header_image', 'none');
2525
$this->small_logo = $this->checkIssetField($package, 'small_logo', 'none');
2626
$this->page_image = $this->checkIssetField($package, 'page_image', 'none');
27-
$this->price = $this->formatPriceObject($package, 'price');
27+
$this->price = $this->checkIssetField($package, 'price', $this->getFakePriceObject());
2828
$this->platforms = $package->platforms;
2929
$this->controller = $package->controller;
3030
$this->release = $package->release_date;
3131
}
32+
33+
protected function getFakePriceObject()
34+
{
35+
$object = new \stdClass();
36+
$object->final = 'No price found';
37+
return $object;
38+
}
3239
}

tests/BaseTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class BaseTester extends TestCase {
1515

1616
protected $appId = 620;
1717

18-
protected $packageId = 76710;
18+
protected $packageId = 32848;
1919

2020
protected $groupId = 103582791429521412;
2121

0 commit comments

Comments
 (0)