Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CS errors #2909

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading