Rename types to Type suffix
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
a3bf698359
commit
923cb7dcb7
12 changed files with 63 additions and 41 deletions
|
|
@ -25,7 +25,7 @@ class ArrayType implements TypeInterface
|
|||
public function __toString(): string
|
||||
{
|
||||
if (isset($this->settings['isRecord']) && $this->settings['isRecord']) {
|
||||
return new Record($this->value);
|
||||
return new RecordType($this->value);
|
||||
}
|
||||
|
||||
$subArray = isset($this->settings['isNestedArray']) && $this->settings['isNestedArray'];
|
||||
|
|
|
|||
16
src/Type/CustomType.php
Normal file
16
src/Type/CustomType.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Arendsen\FluxQueryBuilder\Type;
|
||||
|
||||
class CustomType implements TypeInterface
|
||||
{
|
||||
public function __construct(string $value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
16
src/Type/DurationType.php
Normal file
16
src/Type/DurationType.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Arendsen\FluxQueryBuilder\Type;
|
||||
|
||||
class DurationType implements TypeInterface
|
||||
{
|
||||
public function __construct(string $value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Arendsen\FluxQueryBuilder\Type;
|
||||
|
||||
class Math implements TypeInterface
|
||||
class MathType implements TypeInterface
|
||||
{
|
||||
public function __construct(string $value)
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@ namespace Arendsen\FluxQueryBuilder\Type;
|
|||
|
||||
use Arendsen\FluxQueryBuilder\Type;
|
||||
|
||||
class Record implements TypeInterface
|
||||
class RecordType implements TypeInterface
|
||||
{
|
||||
public function __construct(array $value)
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@ namespace Arendsen\FluxQueryBuilder\Type;
|
|||
|
||||
use DateTime;
|
||||
|
||||
class Time implements TypeInterface
|
||||
class TimeType implements TypeInterface
|
||||
{
|
||||
public function __construct(DateTime $dateTime)
|
||||
{
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue