Skip to content

Commit

Permalink
Fix PHP CS
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Aug 15, 2023
1 parent 9474619 commit bdfc610
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<!-- Require presence of declare(strict_types=1) -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
<property name="linesCountBeforeDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="linesCountAfterDeclare" value="1"/>
</properties>
</rule>
</ruleset>
5 changes: 1 addition & 4 deletions src/JsonApi/Client/JsonApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@

class JsonApiClient
{
/**
* @var ClientInterface
*/
private $client;
private ClientInterface $client;
private DeserializerInterface $deserializer;

public function __construct(ClientInterface $client, ?DeserializerInterface $deserializer = null)
Expand Down
5 changes: 1 addition & 4 deletions src/JsonApi/Schema/Resource/ResourceObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ final class ResourceObject
/** @var array<string, Relationship> */
private array $relationships;

/**
/**
* @param Relationship[] $relationships
*/
/** @param Relationship[] $relationships */
public function __construct(
string $type,
string $id,
Expand Down
5 changes: 4 additions & 1 deletion tests/JsonApi/Hydrator/CustomHydratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
namespace WoohooLabs\Yang\Tests\JsonApi\Hydrator;

use PHPUnit\Framework\TestCase;
use stdClass;
use WoohooLabs\Yang\JsonApi\Hydrator\ClassDocumentHydrator;
use WoohooLabs\Yang\JsonApi\Hydrator\DocumentHydratorInterface;
use WoohooLabs\Yang\JsonApi\Schema\Document;
use WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObject;

use function assert;

class CustomHydratorTest extends TestCase
{
/**
Expand All @@ -28,7 +31,7 @@ public function hydrateSingleResourceWhenSingleResource(): void
$hydrator = $this->getCustomHydrator();
$object = $hydrator->hydrateSingleResource($document);

assert($object instanceof \stdClass);
assert($object instanceof stdClass);
$this->assertEquals("a", $object->type);
$this->assertEquals("1", $object->id);
}
Expand Down

0 comments on commit bdfc610

Please sign in to comment.