Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jshah4517 committed May 29, 2024
1 parent dd4807f commit edfd5dc
Show file tree
Hide file tree
Showing 147 changed files with 61 additions and 790 deletions.
2 changes: 1 addition & 1 deletion src/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Psr\Http\Message\ResponseInterface;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Model;

use function json_decode;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Core/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\CoreClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Core\Brand;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/SelfService/Articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\SelfServiceClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\SelfService\Article;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/SelfService/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\SelfServiceClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\SelfService\Category;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/SelfService/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\SelfServiceClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\SelfService\Comment;
use SupportPal\ApiClient\Model\SelfService\Request\CreateComment;

Expand Down
2 changes: 1 addition & 1 deletion src/Api/SelfService/Tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\SelfServiceClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\SelfService\Tag;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/SelfService/Types.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\SelfServiceClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\SelfService\Type;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Ticket/Attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Exception\MissingIdentifierException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Ticket\Attachment;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Ticket/CustomFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Shared\CustomField;
use SupportPal\ApiClient\Model\Ticket\TicketCustomField;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Ticket/Departments.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Department\Department;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Ticket\Department;

use function array_map;

Expand Down
2 changes: 1 addition & 1 deletion src/Api/Ticket/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Ticket\Message;
use SupportPal\ApiClient\Model\Ticket\Request\CreateMessage;

Expand Down
2 changes: 1 addition & 1 deletion src/Api/Ticket/Priorities.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Ticket\Priority;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Ticket/Statuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Ticket\Status;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Ticket/Tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Exception\MissingIdentifierException;
use SupportPal\ApiClient\Http\TicketClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\Ticket\Request\CreateTicket;
use SupportPal\ApiClient\Model\Ticket\Ticket;

Expand Down
2 changes: 1 addition & 1 deletion src/Api/User/CustomFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\UserClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\User\UserCustomField;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/User/UserGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Http\UserClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\User\Group;

use function array_map;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/User/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use SupportPal\ApiClient\Exception\InvalidArgumentException;
use SupportPal\ApiClient\Exception\MissingIdentifierException;
use SupportPal\ApiClient\Http\UserClient;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Collection;
use SupportPal\ApiClient\Model\User\Request\CreateUser;
use SupportPal\ApiClient\Model\User\User;

Expand Down
5 changes: 0 additions & 5 deletions src/Cache/ApiCacheMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@

use function ltrim;

/**
* This class includes the list of cachable apis related to their behaviour
* Class ApiCacheMap
* @package SupportPal\ApiClient\Cache
*/
class ApiCacheMap
{
protected const DEFAULT_CACHE_TTL = 600;
Expand Down
2 changes: 0 additions & 2 deletions src/Dictionary/ApiDictionary.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
/**
* This class includes the names of all the supported endpoints.
* The defined APIs should only include the resource path without the API `/` prefix and postfix.
* Class APIDictionary
* @package SupportPal\ApiClient\Dictionary
*/
final class ApiDictionary
{
Expand Down
4 changes: 0 additions & 4 deletions src/Exception/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

use Exception as PhpException;

/**
* Class BaseException
* @package SupportPal\ApiClient\Exception
*/
class Exception extends PhpException
{
}
4 changes: 0 additions & 4 deletions src/Exception/HttpResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
use Psr\Http\Message\ResponseInterface;
use Throwable;

/**
* Class HttpResponseException
* @package SupportPal\ApiClient\Exception
*/
class HttpResponseException extends Exception
{
/** @var RequestInterface */
Expand Down
4 changes: 0 additions & 4 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace SupportPal\ApiClient\Exception;

/**
* Class InvalidArgumentException
* @package SupportPal\ApiClient\Exception
*/
class InvalidArgumentException extends Exception
{
}
4 changes: 0 additions & 4 deletions src/Exception/MissingRequiredFieldsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace SupportPal\ApiClient\Exception;

/**
* Class MissingRequiredFieldsException
* @package SupportPal\ApiClient\Exception
*/
class MissingRequiredFieldsException extends RuntimeException
{
}
4 changes: 0 additions & 4 deletions src/Exception/NotSupportedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace SupportPal\ApiClient\Exception;

/**
* Class NotSupportedException
* @package SupportPal\ApiClient\Exception
*/
class NotSupportedException extends RuntimeException
{
}
4 changes: 0 additions & 4 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

use RuntimeException as PhpRuntimeException;

/**
* Class BaseRuntimeException
* @package SupportPal\ApiClient\Exception
*/
class RuntimeException extends PhpRuntimeException
{
}
33 changes: 0 additions & 33 deletions src/Helper/StringHelper.php

This file was deleted.

4 changes: 0 additions & 4 deletions src/Http/Core/SettingsApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait SettingsApis, includes all api calls related to core settings
* @package SupportPal\ApiClient\Http\ApiClient\Core
*/
trait SettingsApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/SelfService/ArticleApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait ArticleApis, includes all api calls related to article apis
* @package SupportPal\ApiClient\Http\ApiClient\SelfService
*/
trait ArticleApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/SelfService/CategoryApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait CategoryApis, includes all api calls related to category
* @package SupportPal\ApiClient\Http\ApiClient\SelfService
*/
trait CategoryApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/SelfService/CommentApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait CommentApis, includes all api calls related to comments
* @package SupportPal\ApiClient\Http\ApiClient\SelfService
*/
trait CommentApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/SelfService/SettingsApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait SettingsApis, includes all api calls related to self service settings
* @package SupportPal\ApiClient\Http\ApiClient\SelfService
*/
trait SettingsApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/SelfService/TagApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait TagApis, includes all api calls related to tag apis
* @package SupportPal\ApiClient\Http\ApiClient\SelfService
*/
trait TagApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/SelfService/TypeApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait TypeApis, includes all api calls related to self service types
* @package SupportPal\ApiClient\Http\ApiClient\SelfService
*/
trait TypeApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/Ticket/DepartmentApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait DepartmentApis
* @package SupportPal\ApiClient\Http\ApiClient\Ticket
*/
trait DepartmentApis
{
use ApiClientAware;
Expand Down
4 changes: 0 additions & 4 deletions src/Http/Ticket/SettingsApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
use SupportPal\ApiClient\Exception\HttpResponseException;
use SupportPal\ApiClient\Http\ApiClientAware;

/**
* Trait SettingsApis, includes all api calls related to ticket settings
* @package SupportPal\ApiClient\Http\ApiClient\Ticket
*/
trait SettingsApis
{
use ApiClientAware;
Expand Down
Loading

0 comments on commit edfd5dc

Please sign in to comment.