From a14476bd4da372cc4c64d6426ffc56f953d9fd2d Mon Sep 17 00:00:00 2001 From: Uryvskiy Dima Date: Thu, 8 Feb 2024 12:44:49 +0300 Subject: [PATCH] Fix code style --- .../{AbstractComment.php => BaseComment.php} | 8 +- src/Model/Entity/Tasks/TaskComment.php | 2 +- src/Model/Entity/Tasks/TaskHistory.php | 4 +- tests/src/ResourceGroup/TasksTest.php | 90 +++++++++---------- 4 files changed, 52 insertions(+), 52 deletions(-) rename src/Model/Entity/Tasks/{AbstractComment.php => BaseComment.php} (82%) diff --git a/src/Model/Entity/Tasks/AbstractComment.php b/src/Model/Entity/Tasks/BaseComment.php similarity index 82% rename from src/Model/Entity/Tasks/AbstractComment.php rename to src/Model/Entity/Tasks/BaseComment.php index 796b68b..3ff0189 100644 --- a/src/Model/Entity/Tasks/AbstractComment.php +++ b/src/Model/Entity/Tasks/BaseComment.php @@ -3,7 +3,7 @@ /** * PHP version 7.3 * - * @category AbstractComment + * @category BaseComment * @package RetailCrm\Api\Model\Entity\Tasks */ @@ -12,12 +12,12 @@ namespace RetailCrm\Api\Model\Entity\Tasks; use RetailCrm\Api\Component\Serializer\Annotation as JMS; /** - * Class AbstractComment + * Class BaseComment * - * @category AbstractComment + * @category BaseComment * @package RetailCrm\Api\Model\Entity\Tasks */ -class AbstractComment +class BaseComment { /** * @var int diff --git a/src/Model/Entity/Tasks/TaskComment.php b/src/Model/Entity/Tasks/TaskComment.php index 0264c43..d574d27 100644 --- a/src/Model/Entity/Tasks/TaskComment.php +++ b/src/Model/Entity/Tasks/TaskComment.php @@ -18,7 +18,7 @@ use RetailCrm\Api\Component\Serializer\Annotation as JMS; * @category TaskComment * @package RetailCrm\Api\Model\Entity\Tasks */ -class TaskComment extends AbstractComment +class TaskComment extends BaseComment { /** * @var int diff --git a/src/Model/Entity/Tasks/TaskHistory.php b/src/Model/Entity/Tasks/TaskHistory.php index 38e6d87..62b7b6e 100644 --- a/src/Model/Entity/Tasks/TaskHistory.php +++ b/src/Model/Entity/Tasks/TaskHistory.php @@ -101,9 +101,9 @@ class TaskHistory public $task; /** - * @var \RetailCrm\Api\Model\Entity\Tasks\AbstractComment + * @var \RetailCrm\Api\Model\Entity\Tasks\BaseComment * - * @JMS\Type("RetailCrm\Api\Model\Entity\Tasks\AbstractComment") + * @JMS\Type("RetailCrm\Api\Model\Entity\Tasks\BaseComment") * @JMS\SerializedName("comment") */ public $comment; diff --git a/tests/src/ResourceGroup/TasksTest.php b/tests/src/ResourceGroup/TasksTest.php index 2d209ff..bfcf707 100644 --- a/tests/src/ResourceGroup/TasksTest.php +++ b/tests/src/ResourceGroup/TasksTest.php @@ -183,31 +183,31 @@ EOF; { $json = <<<'EOF' { - "success":true, - "history":[ - { - "id": 1, - "createdAt": "2023-03-22 19:00:29", - "created": true, - "source": "rule", - "field": "id", - "oldValue": null, - "newValue": 1, - "task": { - "id": 1, - "text": "", - "commentary": "", - "createdAt": "2023-03-22 19:00:29", - "complete": false, - "performer": 2, - "performerType": "user", - "customer":{ - "type": "customer", - "id": 1 - } - } + "success": true, + "history": [ + { + "id": 1, + "createdAt": "2023-03-22 19:00:29", + "created": true, + "source": "rule", + "field": "id", + "oldValue": null, + "newValue": 1, + "task": { + "id": 1, + "text": "", + "commentary": "", + "createdAt": "2023-03-22 19:00:29", + "complete": false, + "performer": 2, + "performerType": "user", + "customer": { + "type": "customer", + "id": 1 } - ] + } + } + ] } EOF; @@ -233,29 +233,29 @@ EOF; { $json = <<<'EOF' { - "success": true, - "pagination": { + "success": true, + "pagination": { "limit": 20, - "totalCount": 4, - "currentPage": 1, - "totalPageCount": 1 + "totalCount": 4, + "currentPage": 1, + "totalPageCount": 1 + }, + "comments": [ + { + "id": 1150, + "creator": 1, + "text": "Тест 2", + "createdAt": "2024-02-05 16:58:23", + "updatedAt": "2024-02-05 16:58:23" }, - "comments": [ - { - "id": 1150, - "creator": 1, - "text": "Тест 2", - "createdAt": "2024-02-05 16:58:23", - "updatedAt": "2024-02-05 16:58:23" - }, - { - "id": 1149, - "creator": 1, - "text": "Тест 1", - "createdAt": "2024-02-05 16:58:19", - "updatedAt": "2024-02-05 16:58:19" - } - ] + { + "id": 1149, + "creator": 1, + "text": "Тест 1", + "createdAt": "2024-02-05 16:58:19", + "updatedAt": "2024-02-05 16:58:19" + } + ] } EOF;