Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JiSoft committed Dec 12, 2023
1 parent 3b92427 commit 1024b37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
12 changes: 4 additions & 8 deletions src/Service/EntityManager/EntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/
class EntityManager implements EntityManagerInterface
{
private const CLIENT = 'SN_PHP_SDK';
private const CLIENT_NAME = 'SN_PHP_SDK';

/**
* @var RestEntityManager
*/
private $restEntityManager;

/**
* @var null|string
* @var string
*/
private $clientName;

Expand All @@ -37,7 +37,7 @@ class EntityManager implements EntityManagerInterface
public function __construct(RestEntityManager $baseEntityManager, ?string $clientName = null)
{
$this->restEntityManager = $baseEntityManager;
$this->clientName = $clientName ?? self::CLIENT;
$this->clientName = $clientName ?? self::CLIENT_NAME;
}

/**
Expand Down Expand Up @@ -116,7 +116,7 @@ public function setUpdateHttpMethod(string $updateHttpMethod): self
return $this;
}

public function getClientName(): ?string
public function getClientName(): string
{
return $this->clientName;
}
Expand All @@ -128,10 +128,6 @@ public function getClientName(): ?string
*/
private function makeHeaders(array $headers): array
{
if ($this->getClientName() === null) {
return $headers;
}

return array_merge(
$headers,
[
Expand Down
3 changes: 0 additions & 3 deletions tests/functional/DocumentGroup/GroupInvite/CancelCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

namespace SignNow\Tests\Functional\DocumentGroup\GroupInvite;

use Exception;
use FunctionalTester;
use Helper\Str;
use ReflectionException;
use SignNow\Api\Action\Data\DocumentGroupInvite\AuthenticationType;
use SignNow\Api\Action\DocumentGroup\GroupInvite;
use SignNow\Api\Service\EntityManager\EntityManager;
use SignNow\Rest\EntityManager\Exception\EntityManagerException;
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/DocumentGroup/GroupInvite/GetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

use Exception;
use FunctionalTester;
use Helper\Str;
use ReflectionException;
use SignNow\Api\Action\Data\DocumentGroupInvite\AuthenticationType;
use SignNow\Api\Action\DocumentGroup\GroupInvite;
use SignNow\Api\Service\EntityManager\EntityManager;
use SignNow\Rest\EntityManager\Exception\EntityManagerException;
Expand Down

0 comments on commit 1024b37

Please sign in to comment.