-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace PHPStan\Type\Doctrine\Descriptors\Symfony; | ||
|
||
use PHPStan\Type\Doctrine\Descriptors\DoctrineTypeDescriptor; | ||
use PHPStan\Type\ObjectType; | ||
use PHPStan\Type\StringType; | ||
use PHPStan\Type\Type; | ||
use Symfony\Bridge\Doctrine\Types\UuidType; | ||
use Symfony\Component\Uid\Uuid; | ||
|
||
class UuidTypeDescriptor implements DoctrineTypeDescriptor | ||
{ | ||
#[Override] | ||
Check failure on line 14 in src/Type/Doctrine/Descriptors/Symfony/UuidTypeDescriptor.php
|
||
public function getType(): string | ||
{ | ||
return UuidType::class; | ||
} | ||
|
||
#[Override] | ||
Check failure on line 20 in src/Type/Doctrine/Descriptors/Symfony/UuidTypeDescriptor.php
|
||
public function getWritableToPropertyType(): Type | ||
{ | ||
return new ObjectType(Uuid::class); | ||
} | ||
|
||
#[Override] | ||
Check failure on line 26 in src/Type/Doctrine/Descriptors/Symfony/UuidTypeDescriptor.php
|
||
public function getWritableToDatabaseType(): Type | ||
{ | ||
return new ObjectType(Uuid::class); | ||
} | ||
|
||
#[Override] | ||
Check failure on line 32 in src/Type/Doctrine/Descriptors/Symfony/UuidTypeDescriptor.php
|
||
public function getDatabaseInternalType(): Type | ||
{ | ||
return new StringType(); | ||
} | ||
} |