1
0
mirror of synced 2024-11-25 06:46:07 +03:00

Fix for loyaltyAccount property in the response

* fix for loyaltyAccount property in the response
* fix negligible phpstan warning
* fix for the phpstan error that should work
This commit is contained in:
Pavel 2022-02-08 16:09:44 +03:00 committed by GitHub
parent f16cd5f6e7
commit 7124c816b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -85,6 +85,7 @@ final class BaseJMSParser
throw new SyntaxError(sprintf( throw new SyntaxError(sprintf(
'Syntax error, unexpected "%s" (%s)', 'Syntax error, unexpected "%s" (%s)',
$this->lexer->token['value'], $this->lexer->token['value'],
// @phpstan-ignore-next-line
$this->getConstant($this->lexer->token['type']) $this->getConstant($this->lexer->token['type'])
)); ));
} }
@ -177,7 +178,7 @@ final class BaseJMSParser
throw new SyntaxError(sprintf( throw new SyntaxError(sprintf(
'Syntax error, unexpected "%s" (%s), expected was %s', 'Syntax error, unexpected "%s" (%s), expected was %s',
$this->lexer->lookahead['value'], $this->lexer->lookahead['value'],
$this->getConstant($this->lexer->lookahead['type']), $this->getConstant($this->lexer->lookahead['type']), // @phpstan-ignore-line
$this->getConstant($token) $this->getConstant($token)
)); ));
} }

View File

@ -32,7 +32,7 @@ class LoyaltyAccountCreateResponse extends SuccessResponse
* @var \RetailCrm\Api\Model\Entity\Loyalty\LoyaltyAccount * @var \RetailCrm\Api\Model\Entity\Loyalty\LoyaltyAccount
* *
* @JMS\Type("RetailCrm\Api\Model\Entity\Loyalty\LoyaltyAccount") * @JMS\Type("RetailCrm\Api\Model\Entity\Loyalty\LoyaltyAccount")
* @JMS\SerializedName("loyalty_account") * @JMS\SerializedName("loyaltyAccount")
*/ */
public $loyaltyAccount; public $loyaltyAccount;

View File

@ -59,13 +59,14 @@ class LoyaltyTest extends AbstractApiResourceGroupTestCase
{ {
"success": true, "success": true,
"site": "bitrix-test", "site": "bitrix-test",
"loyalty_account": { "loyaltyAccount": {
"phoneNumber": "88005553125", "phoneNumber": "88005553125",
"cardNumber": "2222 3333 4444 5555", "cardNumber": "2222 3333 4444 5555",
"customer": { "customer": {
"id": 4787 "id": 4787
} }
} },
"warnings": []
} }
EOF; EOF;