Completed
Pull Request — master (#3711)
by
unknown
61:46
created

testDefaultValueCharacterVarying()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\DBAL\Functional\Schema;
6
7
use Doctrine\DBAL\Platforms\AbstractPlatform;
8
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
9
use Doctrine\DBAL\Schema;
10
use Doctrine\DBAL\Schema\Comparator;
11
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
12
use Doctrine\DBAL\Schema\PostgreSqlSchemaManager;
13
use Doctrine\DBAL\Schema\Table;
14
use Doctrine\DBAL\Schema\TableDiff;
15
use Doctrine\DBAL\Types\BlobType;
16
use Doctrine\DBAL\Types\DecimalType;
17
use Doctrine\DBAL\Types\Type;
18
use Doctrine\DBAL\Types\Types;
19
use function array_map;
20
use function array_pop;
21
use function count;
22
use function current;
23
use function strtolower;
24
25
class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
26
{
27
    /** @var PostgreSqlSchemaManager */
28
    protected $schemaManager;
29
30
    protected function tearDown() : void
31
    {
32
        parent::tearDown();
33
34
        $this->connection->getConfiguration()->setSchemaAssetsFilter(null);
35
    }
36
37
    /**
38
     * @group DBAL-177
39
     */
40
    public function testGetSearchPath() : void
41
    {
42
        $params = $this->connection->getParams();
43
44
        $paths = $this->schemaManager->getSchemaSearchPaths();
45
        self::assertEquals([$params['user'], 'public'], $paths);
46
    }
47
48
    /**
49
     * @group DBAL-244
50
     */
51
    public function testGetSchemaNames() : void
52
    {
53
        $names = $this->schemaManager->getSchemaNames();
54
55
        self::assertIsArray($names);
56
        self::assertNotEmpty($names);
57
        self::assertContains('public', $names, 'The public schema should be found.');
58
    }
59
60
    /**
61
     * @group DBAL-21
62
     */
63
    public function testSupportDomainTypeFallback() : void
64
    {
65
        $createDomainTypeSQL = 'CREATE DOMAIN MyMoney AS DECIMAL(18,2)';
66
        $this->connection->exec($createDomainTypeSQL);
67
68
        $createTableSQL = 'CREATE TABLE domain_type_test (id INT PRIMARY KEY, value MyMoney)';
69
        $this->connection->exec($createTableSQL);
70
71
        $table = $this->connection->getSchemaManager()->listTableDetails('domain_type_test');
72
        self::assertInstanceOf(DecimalType::class, $table->getColumn('value')->getType());
73
74
        Type::addType('MyMoney', MoneyType::class);
75
        $this->connection->getDatabasePlatform()->registerDoctrineTypeMapping('MyMoney', 'MyMoney');
76
77
        $table = $this->connection->getSchemaManager()->listTableDetails('domain_type_test');
78
        self::assertInstanceOf(MoneyType::class, $table->getColumn('value')->getType());
79
    }
80
81
    /**
82
     * @group DBAL-37
83
     */
84
    public function testDetectsAutoIncrement() : void
85
    {
86
        $autoincTable = new Table('autoinc_table');
87
        $column       = $autoincTable->addColumn('id', 'integer');
88
        $column->setAutoincrement(true);
89
        $this->schemaManager->createTable($autoincTable);
90
        $autoincTable = $this->schemaManager->listTableDetails('autoinc_table');
91
92
        self::assertTrue($autoincTable->getColumn('id')->getAutoincrement());
93
    }
94
95
    /**
96
     * @group DBAL-37
97
     */
98
    public function testAlterTableAutoIncrementAdd() : void
99
    {
100
        $tableFrom = new Table('autoinc_table_add');
101
        $column    = $tableFrom->addColumn('id', 'integer');
0 ignored issues
show
Unused Code introduced by
The assignment to $column is dead and can be removed.
Loading history...
102
        $this->schemaManager->createTable($tableFrom);
103
        $tableFrom = $this->schemaManager->listTableDetails('autoinc_table_add');
104
        self::assertFalse($tableFrom->getColumn('id')->getAutoincrement());
105
106
        $tableTo = new Table('autoinc_table_add');
107
        $column  = $tableTo->addColumn('id', 'integer');
108
        $column->setAutoincrement(true);
109
110
        $c    = new Comparator();
111
        $diff = $c->diffTable($tableFrom, $tableTo);
112
113
        self::assertNotNull($diff);
114
115
        $sql = $this->connection->getDatabasePlatform()->getAlterTableSQL($diff);
116
        self::assertEquals([
117
            'CREATE SEQUENCE autoinc_table_add_id_seq',
118
            "SELECT setval('autoinc_table_add_id_seq', (SELECT MAX(id) FROM autoinc_table_add))",
119
            "ALTER TABLE autoinc_table_add ALTER id SET DEFAULT nextval('autoinc_table_add_id_seq')",
120
        ], $sql);
121
122
        $this->schemaManager->alterTable($diff);
123
        $tableFinal = $this->schemaManager->listTableDetails('autoinc_table_add');
124
        self::assertTrue($tableFinal->getColumn('id')->getAutoincrement());
125
    }
126
127
    /**
128
     * @group DBAL-37
129
     */
130
    public function testAlterTableAutoIncrementDrop() : void
131
    {
132
        $tableFrom = new Table('autoinc_table_drop');
133
        $column    = $tableFrom->addColumn('id', 'integer');
134
        $column->setAutoincrement(true);
135
        $this->schemaManager->createTable($tableFrom);
136
        $tableFrom = $this->schemaManager->listTableDetails('autoinc_table_drop');
137
        self::assertTrue($tableFrom->getColumn('id')->getAutoincrement());
138
139
        $tableTo = new Table('autoinc_table_drop');
140
        $column  = $tableTo->addColumn('id', 'integer');
0 ignored issues
show
Unused Code introduced by
The assignment to $column is dead and can be removed.
Loading history...
141
142
        $c    = new Comparator();
143
        $diff = $c->diffTable($tableFrom, $tableTo);
144
145
        self::assertNotNull($diff);
146
147
        self::assertInstanceOf(TableDiff::class, $diff, 'There should be a difference and not false being returned from the table comparison');
148
        self::assertEquals(['ALTER TABLE autoinc_table_drop ALTER id DROP DEFAULT'], $this->connection->getDatabasePlatform()->getAlterTableSQL($diff));
149
150
        $this->schemaManager->alterTable($diff);
151
        $tableFinal = $this->schemaManager->listTableDetails('autoinc_table_drop');
152
        self::assertFalse($tableFinal->getColumn('id')->getAutoincrement());
153
    }
154
155
    /**
156
     * @group DBAL-75
157
     */
158
    public function testTableWithSchema() : void
159
    {
160
        $this->connection->exec('CREATE SCHEMA nested');
161
162
        $nestedRelatedTable = new Table('nested.schemarelated');
163
        $column             = $nestedRelatedTable->addColumn('id', 'integer');
164
        $column->setAutoincrement(true);
165
        $nestedRelatedTable->setPrimaryKey(['id']);
166
167
        $nestedSchemaTable = new Table('nested.schematable');
168
        $column            = $nestedSchemaTable->addColumn('id', 'integer');
169
        $column->setAutoincrement(true);
170
        $nestedSchemaTable->setPrimaryKey(['id']);
171
        $nestedSchemaTable->addForeignKeyConstraint($nestedRelatedTable, ['id'], ['id']);
172
173
        $this->schemaManager->createTable($nestedRelatedTable);
174
        $this->schemaManager->createTable($nestedSchemaTable);
175
176
        $tables = $this->schemaManager->listTableNames();
177
        self::assertContains('nested.schematable', $tables, 'The table should be detected with its non-public schema.');
178
179
        $nestedSchemaTable = $this->schemaManager->listTableDetails('nested.schematable');
180
        self::assertTrue($nestedSchemaTable->hasColumn('id'));
181
        self::assertEquals(['id'], $nestedSchemaTable->getPrimaryKey()->getColumns());
182
183
        $relatedFks = $nestedSchemaTable->getForeignKeys();
184
        self::assertCount(1, $relatedFks);
185
        $relatedFk = array_pop($relatedFks);
186
        self::assertEquals('nested.schemarelated', $relatedFk->getForeignTableName());
187
    }
188
189
    /**
190
     * @group DBAL-91
191
     * @group DBAL-88
192
     */
193
    public function testReturnQuotedAssets() : void
194
    {
195
        $sql = 'create table dbal91_something ( id integer  CONSTRAINT id_something PRIMARY KEY NOT NULL  ,"table"   integer );';
196
        $this->connection->exec($sql);
197
198
        $sql = 'ALTER TABLE dbal91_something ADD CONSTRAINT something_input FOREIGN KEY( "table" ) REFERENCES dbal91_something ON UPDATE CASCADE;';
199
        $this->connection->exec($sql);
200
201
        $table = $this->schemaManager->listTableDetails('dbal91_something');
202
203
        self::assertEquals(
204
            [
205
                'CREATE TABLE dbal91_something (id INT NOT NULL, "table" INT DEFAULT NULL, PRIMARY KEY(id))',
206
                'CREATE INDEX IDX_A9401304ECA7352B ON dbal91_something ("table")',
207
            ],
208
            $this->connection->getDatabasePlatform()->getCreateTableSQL($table)
209
        );
210
    }
211
212
    /**
213
     * @group DBAL-204
214
     */
215
    public function testFilterSchemaExpression() : void
216
    {
217
        $testTable = new Table('dbal204_test_prefix');
218
        $column    = $testTable->addColumn('id', 'integer');
0 ignored issues
show
Unused Code introduced by
The assignment to $column is dead and can be removed.
Loading history...
219
        $this->schemaManager->createTable($testTable);
220
        $testTable = new Table('dbal204_without_prefix');
221
        $column    = $testTable->addColumn('id', 'integer');
222
        $this->schemaManager->createTable($testTable);
223
224
        $this->connection->getConfiguration()->setSchemaAssetsFilter(static function (string $name) : bool {
225
            return preg_match('#^dbal204_#', $name) === 1;
226
        });
227
        $names = $this->schemaManager->listTableNames();
228
        self::assertCount(2, $names);
229
230
        $this->connection->getConfiguration()->setSchemaAssetsFilter(static function (string $name) : bool {
231
            return preg_match('#^dbal204_test#', $name) === 1;
232
        });
233
        $names = $this->schemaManager->listTableNames();
234
        self::assertCount(1, $names);
235
    }
236
237
    public function testListForeignKeys() : void
238
    {
239
        if (! $this->connection->getDatabasePlatform()->supportsForeignKeyConstraints()) {
240
            $this->markTestSkipped('Does not support foreign key constraints.');
241
        }
242
243
        $fkOptions   = ['SET NULL', 'SET DEFAULT', 'NO ACTION','CASCADE', 'RESTRICT'];
244
        $foreignKeys = [];
245
        $fkTable     = $this->getTestTable('test_create_fk1');
246
        for ($i = 0; $i < count($fkOptions); $i++) {
0 ignored issues
show
Performance Best Practice introduced by
It seems like you are calling the size function count() as part of the test condition. You might want to compute the size beforehand, and not on each iteration.

If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration:

for ($i=0; $i<count($array); $i++) { // calls count() on each iteration
}

// Better
for ($i=0, $c=count($array); $i<$c; $i++) { // calls count() just once
}
Loading history...
247
            $fkTable->addColumn('foreign_key_test' . $i, 'integer');
248
            $foreignKeys[] = new ForeignKeyConstraint(
249
                ['foreign_key_test' . $i],
250
                'test_create_fk2',
251
                ['id'],
252
                'foreign_key_test' . $i . '_fk',
253
                ['onDelete' => $fkOptions[$i]]
254
            );
255
        }
256
        $this->schemaManager->dropAndCreateTable($fkTable);
257
        $this->createTestTable('test_create_fk2');
258
259
        foreach ($foreignKeys as $foreignKey) {
260
            $this->schemaManager->createForeignKey($foreignKey, 'test_create_fk1');
261
        }
262
        $fkeys = $this->schemaManager->listTableForeignKeys('test_create_fk1');
263
        self::assertEquals(count($foreignKeys), count($fkeys), "Table 'test_create_fk1' has to have " . count($foreignKeys) . ' foreign keys.');
264
        for ($i = 0; $i < count($fkeys); $i++) {
0 ignored issues
show
Performance Best Practice introduced by
It seems like you are calling the size function count() as part of the test condition. You might want to compute the size beforehand, and not on each iteration.

If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration:

for ($i=0; $i<count($array); $i++) { // calls count() on each iteration
}

// Better
for ($i=0, $c=count($array); $i<$c; $i++) { // calls count() just once
}
Loading history...
265
            self::assertEquals(['foreign_key_test' . $i], array_map('strtolower', $fkeys[$i]->getLocalColumns()));
266
            self::assertEquals(['id'], array_map('strtolower', $fkeys[$i]->getForeignColumns()));
267
            self::assertEquals('test_create_fk2', strtolower($fkeys[0]->getForeignTableName()));
268
            if ($foreignKeys[$i]->getOption('onDelete') === 'NO ACTION') {
269
                self::assertFalse($fkeys[$i]->hasOption('onDelete'), 'Unexpected option: ' . $fkeys[$i]->getOption('onDelete'));
270
            } else {
271
                self::assertEquals($foreignKeys[$i]->getOption('onDelete'), $fkeys[$i]->getOption('onDelete'));
272
            }
273
        }
274
    }
275
276
    /**
277
     * @group DBAL-511
278
     */
279
    public function testDefaultValueCharacterVarying() : void
280
    {
281
        $testTable = new Table('dbal511_default');
282
        $testTable->addColumn('id', 'integer');
283
        $testTable->addColumn('def', 'string', ['default' => 'foo']);
284
        $testTable->setPrimaryKey(['id']);
285
286
        $this->schemaManager->createTable($testTable);
287
288
        $databaseTable = $this->schemaManager->listTableDetails($testTable->getName());
289
290
        self::assertEquals('foo', $databaseTable->getColumn('def')->getDefault());
291
    }
292
293
    /**
294
     * @group DDC-2843
295
     */
296
    public function testBooleanDefault() : void
297
    {
298
        $table = new Table('ddc2843_bools');
299
        $table->addColumn('id', 'integer');
300
        $table->addColumn('checked', 'boolean', ['default' => false]);
301
302
        $this->schemaManager->createTable($table);
303
304
        $databaseTable = $this->schemaManager->listTableDetails($table->getName());
305
306
        $c    = new Comparator();
307
        $diff = $c->diffTable($table, $databaseTable);
308
309
        self::assertNull($diff);
310
    }
311
312
    public function testListTableWithBinary() : void
313
    {
314
        $tableName = 'test_binary_table';
315
316
        $table = new Table($tableName);
317
        $table->addColumn('id', 'integer');
318
        $table->addColumn('column_varbinary', 'binary', []);
319
        $table->addColumn('column_binary', 'binary', ['fixed' => true]);
320
        $table->setPrimaryKey(['id']);
321
322
        $this->schemaManager->createTable($table);
323
324
        $table = $this->schemaManager->listTableDetails($tableName);
325
326
        self::assertInstanceOf(BlobType::class, $table->getColumn('column_varbinary')->getType());
327
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
328
329
        self::assertInstanceOf(BlobType::class, $table->getColumn('column_binary')->getType());
330
        self::assertFalse($table->getColumn('column_binary')->getFixed());
331
    }
332
333
    public function testListQuotedTable() : void
334
    {
335
        $offlineTable = new Schema\Table('user');
336
        $offlineTable->addColumn('id', 'integer');
337
        $offlineTable->addColumn('username', 'string');
338
        $offlineTable->addColumn('fk', 'integer');
339
        $offlineTable->setPrimaryKey(['id']);
340
        $offlineTable->addForeignKeyConstraint($offlineTable, ['fk'], ['id']);
341
342
        $this->schemaManager->dropAndCreateTable($offlineTable);
343
344
        $onlineTable = $this->schemaManager->listTableDetails('"user"');
345
346
        $comparator = new Schema\Comparator();
347
348
        self::assertNull($comparator->diffTable($offlineTable, $onlineTable));
349
    }
350
351
    public function testListTablesExcludesViews() : void
352
    {
353
        $this->createTestTable('list_tables_excludes_views');
354
355
        $name = 'list_tables_excludes_views_test_view';
356
        $sql  = 'SELECT * from list_tables_excludes_views';
357
358
        $view = new Schema\View($name, $sql);
359
360
        $this->schemaManager->dropAndCreateView($view);
361
362
        $tables = $this->schemaManager->listTables();
363
364
        $foundTable = false;
365
        foreach ($tables as $table) {
366
            self::assertInstanceOf(Table::class, $table, 'No Table instance was found in tables array.');
367
            if (strtolower($table->getName()) !== 'list_tables_excludes_views_test_view') {
368
                continue;
369
            }
370
371
            $foundTable = true;
372
        }
373
374
        self::assertFalse($foundTable, 'View "list_tables_excludes_views_test_view" must not be found in table list');
375
    }
376
377
    /**
378
     * @group DBAL-1033
379
     */
380
    public function testPartialIndexes() : void
381
    {
382
        $offlineTable = new Schema\Table('person');
383
        $offlineTable->addColumn('id', 'integer');
384
        $offlineTable->addColumn('name', 'string');
385
        $offlineTable->addColumn('email', 'string');
386
        $offlineTable->addUniqueIndex(['id', 'name'], 'simple_partial_index', ['where' => '(id IS NULL)']);
387
388
        $this->schemaManager->dropAndCreateTable($offlineTable);
389
390
        $onlineTable = $this->schemaManager->listTableDetails('person');
391
392
        $comparator = new Schema\Comparator();
393
394
        self::assertNull($comparator->diffTable($offlineTable, $onlineTable));
395
        self::assertTrue($onlineTable->hasIndex('simple_partial_index'));
396
        self::assertTrue($onlineTable->getIndex('simple_partial_index')->hasOption('where'));
397
        self::assertSame('(id IS NULL)', $onlineTable->getIndex('simple_partial_index')->getOption('where'));
398
    }
399
400
    public function testJsonbColumn() : void
401
    {
402
        if (! $this->schemaManager->getDatabasePlatform() instanceof PostgreSqlPlatform) {
403
            $this->markTestSkipped('Requires PostgresSQL 9.4+');
404
405
            return;
406
        }
407
408
        $table = new Schema\Table('test_jsonb');
409
        $table->addColumn('foo', Types::JSON)->setPlatformOption('jsonb', true);
410
        $this->schemaManager->dropAndCreateTable($table);
411
412
        $columns = $this->schemaManager->listTableColumns('test_jsonb');
413
414
        self::assertSame(Types::JSON, $columns['foo']->getType()->getName());
415
        self::assertTrue($columns['foo']->getPlatformOption('jsonb'));
416
    }
417
418
    /**
419
     * @group DBAL-2427
420
     */
421
    public function testListNegativeColumnDefaultValue() : void
422
    {
423
        $table = new Schema\Table('test_default_negative');
424
        $table->addColumn('col_smallint', 'smallint', ['default' => -1]);
425
        $table->addColumn('col_integer', 'integer', ['default' => -1]);
426
        $table->addColumn('col_bigint', 'bigint', ['default' => -1]);
427
        $table->addColumn('col_float', 'float', ['default' => -1.1]);
428
        $table->addColumn('col_decimal', 'decimal', ['default' => -1.1]);
429
        $table->addColumn('col_string', 'string', ['default' => '(-1)']);
430
431
        $this->schemaManager->dropAndCreateTable($table);
432
433
        $columns = $this->schemaManager->listTableColumns('test_default_negative');
434
435
        self::assertEquals(-1, $columns['col_smallint']->getDefault());
436
        self::assertEquals(-1, $columns['col_integer']->getDefault());
437
        self::assertEquals(-1, $columns['col_bigint']->getDefault());
438
        self::assertEquals(-1.1, $columns['col_float']->getDefault());
439
        self::assertEquals(-1.1, $columns['col_decimal']->getDefault());
440
        self::assertEquals('(-1)', $columns['col_string']->getDefault());
441
    }
442
443
    /**
444
     * @return mixed[][]
445
     */
446
    public static function serialTypes() : iterable
447
    {
448
        return [
449
            ['integer'],
450
            ['bigint'],
451
        ];
452
    }
453
454
    /**
455
     * @dataProvider serialTypes
456
     * @group 2906
457
     */
458
    public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValue(string $type) : void
459
    {
460
        $tableName = 'test_serial_type_' . $type;
461
462
        $table = new Schema\Table($tableName);
463
        $table->addColumn('id', $type, ['autoincrement' => true, 'notnull' => false]);
464
465
        $this->schemaManager->dropAndCreateTable($table);
466
467
        $columns = $this->schemaManager->listTableColumns($tableName);
468
469
        self::assertNull($columns['id']->getDefault());
470
    }
471
472
    /**
473
     * @dataProvider serialTypes
474
     * @group 2906
475
     */
476
    public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValueEvenWhenDefaultIsSet(string $type) : void
477
    {
478
        $tableName = 'test_serial_type_with_default_' . $type;
479
480
        $table = new Schema\Table($tableName);
481
        $table->addColumn('id', $type, ['autoincrement' => true, 'notnull' => false, 'default' => 1]);
482
483
        $this->schemaManager->dropAndCreateTable($table);
484
485
        $columns = $this->schemaManager->listTableColumns($tableName);
486
487
        self::assertNull($columns['id']->getDefault());
488
    }
489
490
    /**
491
     * @group 2916
492
     * @dataProvider autoIncrementTypeMigrations
493
     */
494
    public function testAlterTableAutoIncrementIntToBigInt(string $from, string $to, string $expected) : void
495
    {
496
        $tableFrom = new Table('autoinc_type_modification');
497
        $column    = $tableFrom->addColumn('id', $from);
498
        $column->setAutoincrement(true);
499
        $this->schemaManager->dropAndCreateTable($tableFrom);
500
        $tableFrom = $this->schemaManager->listTableDetails('autoinc_type_modification');
501
        self::assertTrue($tableFrom->getColumn('id')->getAutoincrement());
502
503
        $tableTo = new Table('autoinc_type_modification');
504
        $column  = $tableTo->addColumn('id', $to);
505
        $column->setAutoincrement(true);
506
507
        $c    = new Comparator();
508
        $diff = $c->diffTable($tableFrom, $tableTo);
509
        self::assertInstanceOf(TableDiff::class, $diff, 'There should be a difference and not false being returned from the table comparison');
510
        self::assertSame(['ALTER TABLE autoinc_type_modification ALTER id TYPE ' . $expected], $this->connection->getDatabasePlatform()->getAlterTableSQL($diff));
511
512
        $this->schemaManager->alterTable($diff);
513
        $tableFinal = $this->schemaManager->listTableDetails('autoinc_type_modification');
514
        self::assertTrue($tableFinal->getColumn('id')->getAutoincrement());
515
    }
516
517
    public function testQuotingMixedCaseAssets() : void
518
    {
519
        $table = new Table('mixedCaseTable');
520
        $table->addColumn('mixedCaseColumn', 'text');
521
        $this->schemaManager->createTable($table);
522
        $columns = $this->schemaManager->listTableColumns('mixedCaseTable');
523
        self::assertCount(1, $columns);
524
        self::assertSame('mixedCaseColumn', current($columns)->getName());
525
    }
526
527
    /**
528
     * @return mixed[][]
529
     */
530
    public static function autoIncrementTypeMigrations() : iterable
531
    {
532
        return [
533
            'int->bigint' => ['integer', 'bigint', 'BIGINT'],
534
            'bigint->int' => ['bigint', 'integer', 'INT'],
535
        ];
536
    }
537
}
538
539
class MoneyType extends Type
540
{
541
    /**
542
     * {@inheritDoc}
543
     */
544
    public function getName() : string
545
    {
546
        return 'MyMoney';
547
    }
548
549
    /**
550
     * {@inheritDoc}
551
     */
552
    public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) : string
553
    {
554
        return 'MyMoney';
555
    }
556
}
557