Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class YamlDefinitionParser extends AbstractDefinitionParser implements DefinitionParserInterface |
||
13 | { |
||
14 | /** |
||
15 | * Tells whether the given file can be handled by this handler, by checking e.g. the suffix |
||
16 | * |
||
17 | * @param string $migrationName typically a filename |
||
18 | * @return bool |
||
19 | */ |
||
20 | 149 | public function supports($migrationName) |
|
21 | { |
||
22 | 149 | $ext = pathinfo($migrationName, PATHINFO_EXTENSION); |
|
23 | 149 | return $ext == 'yml' || $ext == 'yaml'; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * Parses a migration definition file, and returns the list of actions to take |
||
28 | * |
||
29 | * @param MigrationDefinition $definition |
||
30 | * @return MigrationDefinition |
||
31 | */ |
||
32 | 114 | public function parseMigrationDefinition(MigrationDefinition $definition) |
|
48 | } |
||
49 | } |
||
50 |