Skip to content

Commit fe04d0f

Browse files
committed
Code chapter 2
Signed-off-by: Howriq <[email protected]>
1 parent 715eef1 commit fe04d0f

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

src/App/src/ConfigProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public function getDependencies(): array
5454
'doctrine.entity_manager.orm_default' => EntityManagerFactory::class,
5555
GetIndexViewHandler::class => GetIndexViewHandlerFactory::class,
5656
EntityListenerResolver::class => EntityListenerResolverFactory::class,
57-
5857
],
5958
'aliases' => [
6059
EntityManager::class => 'doctrine.entity_manager.orm_default',
@@ -123,7 +122,7 @@ private function getDoctrineConfig(): array
123122
],
124123
],
125124
'migrations' => [
126-
'table_storage' => [
125+
'table_storage' => [
127126
'table_name' => 'doctrine_migration_versions',
128127
'version_column_name' => 'version',
129128
'version_column_length' => 191,

src/App/src/Types/UuidType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st
1414
{
1515
return 'UUID';
1616
}
17-
}
17+
}

src/Book/src/ConfigProvider.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Light\Book;
66

77
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
8-
use Light\App\Types\UuidType;
98

109
class ConfigProvider
1110
{
@@ -20,10 +19,8 @@ public function __invoke(): array
2019
private function getDependencies(): array
2120
{
2221
return [
23-
'delegators' => [
24-
],
25-
'factories' => [
26-
],
22+
'delegators' => [],
23+
'factories' => [],
2724
];
2825
}
2926

src/Book/src/Entity/Book.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
namespace Light\Book\Entity;
66

7-
use Light\App\Entity\UuidIdentifierTrait;
87
use Doctrine\ORM\Mapping as ORM;
98
use Light\App\Entity\AbstractEntity;
109
use Light\App\Entity\TimestampsTrait;
10+
use Light\App\Entity\UuidIdentifierTrait;
1111

1212
#[ORM\Entity]
1313
#[ORM\Table(name: 'books')]
1414
#[ORM\HasLifecycleCallbacks]
1515
class Book extends AbstractEntity
1616
{
17-
use UuidIdentifierTrait;
1817
use TimestampsTrait;
18+
use UuidIdentifierTrait;
1919

2020
#[ORM\Column(name: 'title', type: 'string', length: 500, nullable: true)]
2121
private ?string $title = null;
@@ -53,7 +53,7 @@ public function setAuthor(string $author): void
5353
public function getArrayCopy(): array
5454
{
5555
return [
56-
'title' => $this->title,
56+
'title' => $this->title,
5757
'author' => $this->author,
5858
];
5959
}

0 commit comments

Comments
 (0)