Skip to content

Commit 7385938

Browse files
committed
Fix phpstan issues
1 parent b7d408b commit 7385938

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

.phpstan/baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: "#^Call to function is_string\\(\\) with stdClass will always evaluate to false\\.$#"
5-
count: 2
6-
path: ../src/Bigcommerce/Api/Client.php
7-
83
-
94
message: "#^Method Bigcommerce\\\\Api\\\\Client\\:\\:createCoupon\\(\\) has parameter \\$object with no type specified\\.$#"
105
count: 1
@@ -500,11 +495,6 @@ parameters:
500495
count: 1
501496
path: ../src/Bigcommerce/Api/Filter.php
502497

503-
-
504-
message: "#^Method Bigcommerce\\\\Api\\\\Filter\\:\\:__set\\(\\) has no return type specified\\.$#"
505-
count: 1
506-
path: ../src/Bigcommerce/Api/Filter.php
507-
508498
-
509499
message: "#^Method Bigcommerce\\\\Api\\\\Filter\\:\\:__set\\(\\) has parameter \\$parameter with no type specified\\.$#"
510500
count: 1

src/Bigcommerce/Api/Client.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ private static function mapCollectionObject($object)
398398
* Map a single object to a resource class.
399399
*
400400
* @param string $resource name of the resource class
401-
* @param \stdClass $object
402-
* @return Resource
401+
* @param \stdClass|boolean|string $object
402+
* @return bool|\stdClass|string
403403
*/
404404
private static function mapResource($resource, $object)
405405
{
@@ -415,8 +415,8 @@ private static function mapResource($resource, $object)
415415
/**
416416
* Map object representing a count to an integer value.
417417
*
418-
* @param \stdClass $object
419-
* @return int
418+
* @param \stdClass|boolean|string $object
419+
* @return int|boolean
420420
*/
421421
private static function mapCount($object)
422422
{

0 commit comments

Comments
 (0)