Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yireo/Yireo_ThemeOverrideChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Sep 12, 2024
2 parents 04bc6c6 + 417c907 commit 4f80b02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.4] - 12 September 2024
## [0.0.5] - 12 September 2024
### Fixed
- PHPStan fixes

## [0.0.4] - 8 May 2024
### Fixed
- Add a command option to filter on file extension #3 @akosglue

## [0.0.3] - 28 August 2023
### Fixed
- Remove old imports and unused `$finder`
Expand Down
6 changes: 6 additions & 0 deletions Console/Command/CheckOverrideCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ protected function configure()
{
$this->setName('yireo:theme-overrides:check')
->setDescription('Check the overrides of a specified theme')
->addOption('extension', '-e', InputOption::VALUE_OPTIONAL, 'Filter the checked files by extension (for example xml, phtml, ...)')
->addArgument('theme', InputOption::VALUE_REQUIRED, 'Theme name');
}

Expand Down Expand Up @@ -100,6 +101,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
]);

$themeFiles = $this->finder->in($themePath)->files();

if($input->getOption('extension')) {
$themeFiles->name('*.' . $input->getOption('extension'));
}

foreach ($themeFiles as $themeFile) {
$parentThemeFile = null;
$lineDiff = 0;
Expand Down

0 comments on commit 4f80b02

Please sign in to comment.