@@ -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, |
@@ -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 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $container->setParameter('rapido.id_column_name', $config['id_column_name']); |
19 | 19 | $container->setAlias('rapido.database_connection', $config['database_connection']); |
20 | 20 | |
21 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
21 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
22 | 22 | $loader->load('services.xml'); |
23 | 23 | } |
24 | 24 |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | private $idColumnName; |
18 | 18 | private $dbalTypeMapper; |
19 | 19 | |
20 | - public function __construct |
|
21 | - ( |
|
20 | + public function __construct( |
|
22 | 21 | Connection $connection, |
23 | 22 | NameGenerator $tableNameGenerator, |
24 | 23 | $idColumnName, |
@@ -39,7 +38,7 @@ discard block |
||
39 | 38 | $rowData = array_merge([$this->idColumnName => $record->getId()], $record->getData()); |
40 | 39 | |
41 | 40 | $idType = $this->dbalTypeMapper->mapReadModelToDbalType($metadata->getId()->getDataType()); |
42 | - $types = array_merge([$idType], array_map(function (ReadModelField $field) { |
|
41 | + $types = array_merge([$idType], array_map(function(ReadModelField $field) { |
|
43 | 42 | return $this->dbalTypeMapper->mapReadModelToDbalType($field->getDataType()); |
44 | 43 | }, $metadata->getFields())); |
45 | 44 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | public static function setUpBeforeClass() |
29 | 29 | { |
30 | - unlink(__DIR__ . '/Config/sqlite.db'); |
|
30 | + unlink(__DIR__.'/Config/sqlite.db'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | protected function setUp() |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | new ReadModelField('f1', new Boolean()), |
49 | 49 | new ReadModelField('f2', new TextString(10)), |
50 | 50 | ], |
51 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
52 | - function () {} |
|
51 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
52 | + function() {} |
|
53 | 53 | ); |
54 | 54 | |
55 | 55 | $this->synchronizer->ensureTableExists($meta); |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | [ |
69 | 69 | new ReadModelField('f1', new TextString(10), true), |
70 | 70 | ], |
71 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1']]); }, |
|
72 | - function () {} |
|
71 | + function($data) { return new Record($data['id'], ['f1' => $data['f1']]); }, |
|
72 | + function() {} |
|
73 | 73 | ); |
74 | 74 | |
75 | 75 | $this->synchronizer->ensureTableExists($meta); |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | new ReadModelField('f2', new TextString(10)), |
90 | 90 | new ReadModelField('f3', new TextString(10)), |
91 | 91 | ], |
92 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2'], 'f3' => $data['f2']]); }, |
|
93 | - function () {} |
|
92 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2'], 'f3' => $data['f2']]); }, |
|
93 | + function() {} |
|
94 | 94 | ); |
95 | 95 | |
96 | 96 | $this->synchronizer->ensureTableExists($meta); |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | new ReadModelField('f1', new Boolean()), |
111 | 111 | new ReadModelField('f2', new TextString(10)) |
112 | 112 | ], |
113 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
114 | - function () {} |
|
113 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
114 | + function() {} |
|
115 | 115 | ); |
116 | 116 | |
117 | 117 | $this->synchronizer->ensureTableExists($meta); |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | new ReadModelField('f1', new Boolean()), |
132 | 132 | new ReadModelField('f2', new TextString(10)), |
133 | 133 | ], |
134 | - function ($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
135 | - function () {}, |
|
134 | + function($data) { return new Record($data['id'], ['f1' => $data['f1'], 'f2' => $data['f2']]); }, |
|
135 | + function() {}, |
|
136 | 136 | 'created_at' |
137 | 137 | ); |
138 | 138 |