@@ -16,8 +16,7 @@ |
||
16 | 16 | private $idColumnName; |
17 | 17 | private $columnFactory; |
18 | 18 | |
19 | - public function __construct |
|
20 | - ( |
|
19 | + public function __construct( |
|
21 | 20 | AbstractSchemaManager $schemaManager, |
22 | 21 | Comparator $schemaComparator, |
23 | 22 | NameGenerator $tableNameGenerator, |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!($loader = include __DIR__ . '/../vendor/autoload.php')) { |
|
3 | +if (!($loader = include __DIR__.'/../vendor/autoload.php')) { |
|
4 | 4 | die(<<<EOT |
5 | 5 | You need to install the project dependencies using Composer: |
6 | 6 | $ wget http://getcomposer.org/composer.phar |
@@ -17,8 +17,8 @@ |
||
17 | 17 | |
18 | 18 | public function registerContainerConfiguration(LoaderInterface $loader) |
19 | 19 | { |
20 | - new \PDO('sqlite:' . __DIR__ . '/sqlite.db'); |
|
21 | - $loader->load(__DIR__ . '/config.yml'); |
|
20 | + new \PDO('sqlite:'.__DIR__.'/sqlite.db'); |
|
21 | + $loader->load(__DIR__.'/config.yml'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | protected function build(ContainerBuilder $container) |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function generateSnapshot() { return $this->snapshotColumnName !== null; } |
22 | 22 | public function getSnapshotColumnName() { return $this->snapshotColumnName; } |
23 | 23 | |
24 | - public function __construct |
|
25 | - ( |
|
24 | + public function __construct( |
|
26 | 25 | $name, |
27 | 26 | ReadModelId $id, |
28 | 27 | array $fields, |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $container->setParameter('rapido.table_name_suffix', $config['table_name_suffix']); |
18 | 18 | $container->setParameter('rapido.id_column_name', $config['id_column_name']); |
19 | 19 | |
20 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
20 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
21 | 21 | $loader->load('services.xml'); |
22 | 22 | } |
23 | 23 |
@@ -15,11 +15,11 @@ |
||
15 | 15 | |
16 | 16 | public function generate($id) |
17 | 17 | { |
18 | - return $this->prefix . (string) $id; |
|
18 | + return $this->prefix.(string) $id; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function generateWithSuffix($id) |
22 | 22 | { |
23 | - return $this->generate($id) . $this->suffix; |
|
23 | + return $this->generate($id).$this->suffix; |
|
24 | 24 | } |
25 | 25 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | public static function setUpBeforeClass() |
25 | 25 | { |
26 | - unlink(__DIR__ . '/Config/sqlite.db'); |
|
26 | + unlink(__DIR__.'/Config/sqlite.db'); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | protected function setUp() |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | new ReadModelField('f1', new Boolean()), |
44 | 44 | new ReadModelField('f2', new TextString(10)), |
45 | 45 | ], |
46 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
47 | - function () {} |
|
46 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
47 | + function() {} |
|
48 | 48 | ); |
49 | 49 | |
50 | 50 | $this->writer->writeRecord($meta, ['id' => 1, 'f1' => true, 'f2' => 'test']); |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | [ |
63 | 63 | new ReadModelField('f1', new TextString(10), true), |
64 | 64 | ], |
65 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1']]); }, |
|
66 | - function () {} |
|
65 | + function($data) { return new Record($data['id'], ['f1' => $data['f1']]); }, |
|
66 | + function() {} |
|
67 | 67 | ); |
68 | 68 | |
69 | 69 | $this->writer->writeRecord($meta, ['id' => 1, 'f1' => 'test']); |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | new ReadModelField('f2', new TextString(10)), |
83 | 83 | new ReadModelField('f3', new TextString(10)), |
84 | 84 | ], |
85 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2'], 'f3' => $data['f2']]); }, |
|
86 | - function () {} |
|
85 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2'], 'f3' => $data['f2']]); }, |
|
86 | + function() {} |
|
87 | 87 | ); |
88 | 88 | |
89 | 89 | $this->writer->writeRecord($meta, ['id' => 2, 'f1' => true, 'f2' => 'test']); |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | new ReadModelField('f1', new Boolean()), |
103 | 103 | new ReadModelField('f2', new TextString(10)) |
104 | 104 | ], |
105 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
106 | - function () {} |
|
105 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
106 | + function() {} |
|
107 | 107 | ); |
108 | 108 | |
109 | 109 | $this->writer->writeRecord($meta, ['id' => 2, 'f1' => true, 'f2' => 'test2']); |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | new ReadModelField('f1', new Boolean()), |
123 | 123 | new ReadModelField('f2', new TextString(10)), |
124 | 124 | ], |
125 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
126 | - function () {}, |
|
125 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
126 | + function() {}, |
|
127 | 127 | 'created_at' |
128 | 128 | ); |
129 | 129 |
@@ -19,8 +19,7 @@ discard block |
||
19 | 19 | private $idColumnName; |
20 | 20 | private $dbalTypeMapper; |
21 | 21 | |
22 | - public function __construct |
|
23 | - ( |
|
22 | + public function __construct( |
|
24 | 23 | Connection $connection, |
25 | 24 | SchemaSynchronizer $tableGenerator, |
26 | 25 | NameGenerator $tableNameGenerator, |
@@ -48,7 +47,7 @@ discard block |
||
48 | 47 | $rowData = array_merge([$this->idColumnName => $record->getId()], $record->getData()); |
49 | 48 | |
50 | 49 | $idType = $this->dbalTypeMapper->mapReadModelToDbalType($metadata->getId()->getDataType()); |
51 | - $types = array_merge([$idType], array_map(function (ReadModelField $field) { |
|
50 | + $types = array_merge([$idType], array_map(function(ReadModelField $field) { |
|
52 | 51 | return $this->dbalTypeMapper->mapReadModelToDbalType($field->getDataType()); |
53 | 52 | }, $metadata->getFields())); |
54 | 53 |