Skip to content

Commit

Permalink
Downgrade PHPStan to support PHP 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishgurung committed Aug 22, 2024
1 parent c3af675 commit b684836
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"require-dev": {
"phpunit/phpunit": "^5.7 || ^9.5",
"friendsofphp/php-cs-fixer": "^2.19.3 || ^3.9.5",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan": "1.4.*",
"vlucas/phpdotenv": "5.5.0"
},
"autoload": {
Expand Down
3 changes: 2 additions & 1 deletion examples/OmiseCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
'amount' => 100000,
'currency' => 'thb',
'return_uri' => 'http://www.example.com',
'card' => $token->toArray()['id']
'card' => $token->toArray()['id'],
'capture' => false
]);

$chargeFetched = OmiseCharge::retrieve($chargeCreated->toArray()['id']);
Expand Down
2 changes: 1 addition & 1 deletion lib/omise/res/OmiseApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class OmiseApiResource extends OmiseObject
*/
protected static function getInstance($publickey = null, $secretkey = null)
{
$resource = new static($publickey, $secretkey);
$resource = new static($publickey, $secretkey); // @phpstan-ignore-line
$className = get_class($resource);
if (!isset(self::$instances[$className])) {
static::$instances[$className] = $resource;
Expand Down

0 comments on commit b684836

Please sign in to comment.