Skip to content

Commit

Permalink
PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Sep 6, 2024
1 parent 762800c commit 91e04f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/src/Commands/RunActivationTestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected function configure() {
->addOption( 'wp', null, InputOption::VALUE_OPTIONAL, 'The WordPress version. Accepts "stable", "nightly", or a version number.', 'stable' )
->addOption( 'woo', null, InputOption::VALUE_OPTIONAL, 'The WooCommerce Version. Accepts "stable", "nightly", or a GitHub Tag (eg: 8.6.1).', 'stable' )
->addOption( 'plugin', 'p', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Plugin to activate in the environment. Accepts paths, Woo.com slugs/product IDs, WordPress.org slugs or GitHub URLs.', [] )
->addOption( 'ui', null, InputOption::VALUE_NONE, 'Runs tests in UI mode. In this mode, you can start and view the tests running.' );
->addOption( 'ui', null, InputOption::VALUE_NONE, 'Runs tests in UI mode. In this mode, you can start and view the tests running.' );
}

protected function execute( InputInterface $input, OutputInterface $output ): int {
Expand All @@ -44,7 +44,7 @@ protected function execute( InputInterface $input, OutputInterface $output ): in
}
$run_e2e_options['--wp'] = $input->getOption( 'wp' );
$run_e2e_options['--woo'] = $input->getOption( 'woo' );
$run_e2e_options['--ui'] = $input->getOption( 'ui' );
$run_e2e_options['--ui'] = $input->getOption( 'ui' );

foreach ( $input->getOption( 'plugin' ) as $plugin ) {
$run_e2e_options['--plugin'][] = $plugin;
Expand Down
6 changes: 3 additions & 3 deletions src/src/Environment/EnvironmentDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function maybe_download( string $env_name ): void {
* @param string $zip_file_path The path to the zip file.
*
* @return string A checksum of the zip contents.
* @throws \Exception
* @throws \Exception If the zip file cannot be opened.
*/
private function calculate_zip_content_checksum( string $zip_file_path ) {
$zip = new \ZipArchive();
Expand All @@ -149,10 +149,10 @@ private function calculate_zip_content_checksum( string $zip_file_path ) {
}

$checksums = [];
for ( $i = 0; $i < $zip->numFiles; $i ++ ) {
for ( $i = 0; $i < $zip->numFiles; $i++ ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
$stat = $zip->statIndex( $i );
if ( $stat ) {
$crc = $stat['crc']; // Get the CRC32 hash of the file
$crc = $stat['crc']; // Get the CRC32 hash of the file.
$checksums[] = $crc;
}
}
Expand Down

0 comments on commit 91e04f6

Please sign in to comment.