Skip to content

Commit

Permalink
Fix CS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker authored and phansys committed Jan 14, 2025
1 parent ea6959d commit 950d7c0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/Tool/ClassUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ private function __construct()
* If doctrine/common is not installed, this method behaves like {@see get_class()}.
*
* @param TObject $object
*
* @return class-string<TObject>
*
* @template TObject of object
*/
public static function getClass(object $object): string
Expand Down
4 changes: 1 addition & 3 deletions src/Tool/Logging/DBAL/QueryAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ class QueryAnalyzer implements SQLLogger

/**
* Start time of currently executed query
*
* @var float
*/
private $queryStartTime;
private ?float $queryStartTime = null;

/**
* Total execution time of all queries
Expand Down
8 changes: 4 additions & 4 deletions tests/Gedmo/IpTraceable/IpTraceableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function testIpV4(): void
$listener = new IpTraceableListener();
$listener->setIpValue('123.218.45.39');
static::assertSame('123.218.45.39', $listener->getFieldValue(
$this->createStub(ClassMetadata::class),
static::createStub(ClassMetadata::class),
'ip',
$this->createStub(AdapterInterface::class)
static::createStub(AdapterInterface::class)
));
}

Expand All @@ -69,9 +69,9 @@ public function testIpV6(): void
$listener = new IpTraceableListener();
$listener->setIpValue('2001:0db8:0000:85a3:0000:0000:ac1f:8001');
static::assertSame('2001:0db8:0000:85a3:0000:0000:ac1f:8001', $listener->getFieldValue(
$this->createStub(ClassMetadata::class),
static::createStub(ClassMetadata::class),
'ip',
$this->createStub(AdapterInterface::class)
static::createStub(AdapterInterface::class)
));
}

Expand Down
6 changes: 3 additions & 3 deletions tests/Gedmo/Mapping/MappingEventAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ final class MappingEventAdapterTest extends TestCase
public function testCustomizedAdapter(): void
{
$subscriber = new EventSubscriberCustomMock();
$args = new PrePersistEventArgs(new \stdClass(), $this->createStub(EntityManagerInterface::class));
$args = new PrePersistEventArgs(new \stdClass(), static::createStub(EntityManagerInterface::class));

$adapter = $subscriber->getAdapter($args);
static::assertInstanceOf(CustomizedORMAdapter::class, $adapter);
}

public function testCorrectAdapter(): void
{
$emMock = $this->createStub(EntityManagerInterface::class);
$emMock = static::createStub(EntityManagerInterface::class);
$subscriber = new EventSubscriberMock();
$args = new PrePersistEventArgs(new \stdClass(), $emMock);

Expand All @@ -44,7 +44,7 @@ public function testCorrectAdapter(): void

public function testAdapterBehavior(): void
{
$emMock = $this->createStub(EntityManagerInterface::class);
$emMock = static::createStub(EntityManagerInterface::class);
$entity = new \stdClass();

$args = new PrePersistEventArgs($entity, $emMock);
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Tool/BaseTestCaseMongoODM.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function getDefaultDocumentManager(?EventManager $evm = null): Documen
*/
protected function getMockMappedDocumentManager(?EventManager $evm = null, ?Configuration $config = null): DocumentManager
{
$conn = $this->createStub(Client::class);
$conn = static::createStub(Client::class);

$config ??= $this->getMockAnnotatedConfig();

Expand Down

0 comments on commit 950d7c0

Please sign in to comment.