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