forked from doctrine/dbal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See doctrine#6704
- Loading branch information
Showing
4 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\DBAL\Types\Exception; | ||
|
||
use ArgumentCountError; | ||
use Exception; | ||
|
||
use function sprintf; | ||
|
||
/** @psalm-immutable */ | ||
final class TypeArgumentCountError extends Exception implements TypesException | ||
{ | ||
public static function new(string $name, ArgumentCountError $previous): self | ||
{ | ||
return new self(sprintf('Type "%s" cannot be registered through Type::addType because it requires arguments. Use Type::getTypeRegistry()->register instead.', $name), previous: $previous); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\DBAL\Tests\Types; | ||
|
||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use Doctrine\DBAL\Types\Type; | ||
|
||
class TypeWithConstructor extends Type | ||
{ | ||
public function __construct(bool $requirement) | ||
{ | ||
} | ||
|
||
public function getSQLDeclaration(array $column, AbstractPlatform $platform) : string | ||
{ | ||
return ''; | ||
} | ||
} |