1
0
mirror of synced 2024-11-21 21:06: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(
'Syntax error, unexpected "%s" (%s)',
$this->lexer->token['value'],
// @phpstan-ignore-next-line
$this->getConstant($this->lexer->token['type'])
));
}
@ -177,7 +178,7 @@ final class BaseJMSParser
throw new SyntaxError(sprintf(
'Syntax error, unexpected "%s" (%s), expected was %s',
$this->lexer->lookahead['value'],
$this->getConstant($this->lexer->lookahead['type']),
$this->getConstant($this->lexer->lookahead['type']), // @phpstan-ignore-line
$this->getConstant($token)
));
}

View File

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

View File

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