| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 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 | public function supports($migrationName) |
||
| 21 | { |
||
| 22 | $ext = pathinfo($migrationName, PATHINFO_EXTENSION); |
||
| 23 | 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 | public function parseMigrationDefinition(MigrationDefinition $definition) |
||
| 48 | } |
||
| 49 | } |
||
| 50 |