Skip to content

Commit

Permalink
VectorGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyBel committed May 7, 2023
1 parent 5c77aff commit 82eb28b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\Arrays;

use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Type\Arrays\FromArrayType;
use PhpInvariant\Generator\TypeInterface;
use PhpInvariant\Random\Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\Arrays;

use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\GeneratorFactory;
use PhpInvariant\Generator\Type\Arrays\VectorType;
use PhpInvariant\Generator\TypeInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\DateTime;

use DateTimeImmutable;
use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Type\DateTime\DateTimeType;
use PhpInvariant\Generator\TypeInterface;
use PhpInvariant\Random\Random;
use DateTimeImmutable;

class DateTimeGenerator implements GeneratorInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\Scalar;

use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Type\Scalar\BooleanType;
use PhpInvariant\Generator\TypeInterface;
use PhpInvariant\Random\Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\Scalar;

use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Type\Scalar\FloatType;
use PhpInvariant\Generator\TypeInterface;
use PhpInvariant\Random\Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\Scalar;

use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Type\Scalar\IntegerType;
use PhpInvariant\Generator\TypeInterface;
use PhpInvariant\Random\Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace PhpInvariant\Generator\Generator;
namespace PhpInvariant\Generator\Generator\Scalar;

use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Type\Scalar\StringType;
use PhpInvariant\Generator\TypeInterface;
use PhpInvariant\Random\Random;
Expand Down
18 changes: 7 additions & 11 deletions src/Generator/GeneratorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
namespace PhpInvariant\Generator;

use PhpInvariant\Exception\PhpInvariantException;
use PhpInvariant\Generator\Generator\FromArrayGenerator;
use PhpInvariant\Generator\Generator\BooleanGenerator;
use PhpInvariant\Generator\Generator\DateTimeGenerator;
use PhpInvariant\Generator\Generator\FloatGenerator;
use PhpInvariant\Generator\Generator\Arrays\FromArrayGenerator;
use PhpInvariant\Generator\Generator\DateTime\DateTimeGenerator;
use PhpInvariant\Generator\Generator\GeneratorInterface;
use PhpInvariant\Generator\Generator\IntegerGenerator;
use PhpInvariant\Generator\Generator\StringGenerator;
use PhpInvariant\Generator\Generator\VectorGenerator;
use PhpInvariant\Generator\Generator\Scalar\IntegerGenerator;
use PhpInvariant\Generator\Type\Arrays\FromArrayType;
use PhpInvariant\Generator\Type\Arrays\VectorType;
use PhpInvariant\Generator\Type\DateTime\DateTimeType;
Expand All @@ -27,12 +23,12 @@ class GeneratorFactory
*/
private array $mapping = [
IntegerType::class => IntegerGenerator::class,
FloatType::class => FloatGenerator::class,
BooleanType::class => BooleanGenerator::class,
StringType::class => StringGenerator::class,
FloatType::class => Generator\Scalar\FloatGenerator::class,
BooleanType::class => Generator\Scalar\BooleanGenerator::class,
StringType::class => Generator\Scalar\StringGenerator::class,
DateTimeType::class => DateTimeGenerator::class,
FromArrayType::class => FromArrayGenerator::class,
VectorType::class => VectorGenerator::class
VectorType::class => Generator\Arrays\VectorGenerator::class

];

Expand Down

0 comments on commit 82eb28b

Please sign in to comment.