Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
PHPCS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Apr 19, 2022
1 parent 20e9ac1 commit 9e43b23
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions features/jetpack-crm.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ function ( $features, $json_params ) {

/**
* Installs and activates a specified version of Jetpack CRM from the WP.org plugin repo.
*
* @param string $version Version of Jetpack CRM.
*/
function add_jpcrm_from_wporg( $version ) {

Expand All @@ -100,15 +102,22 @@ function ( $s ) use ( $cmd ) {

/**
* Installs and activates a specified build of Jetpack CRM from our custom build URL.
*
* @param string $build Hash of build to use.
*/
function add_jpcrm_from_custom_build( $build ) {

// Require commit SHA-1 hash (40 char long hex).
// if ( ! preg_match( '/^[A-Fa-f0-9]{40}$/', $build ) ) {
// return new \WP_Error( 'bad_commit_hash', 'Invalid commit hash.', array( 'status' => 404 ) );
// }
// phpcs:disable Squiz.PHP.CommentedOutCode.Found

$clean_build = str_replace('/', '_', $build);
/*
* Require commit SHA-1 hash (40 char long hex).
* if ( ! preg_match( '/^[A-Fa-f0-9]{40}$/', $build ) ) {
* return new \WP_Error( 'bad_commit_hash', 'Invalid commit hash.', array( 'status' => 404 ) );
* }
*/
// phpcs:enable

$clean_build = str_replace( '/', '_', $build );

// note that this public link is in a public repo
$jpcrm_build_base_url = 'https://jetpackcrm-builds.s3.amazonaws.com/builds/';
Expand Down Expand Up @@ -150,4 +159,4 @@ function () {
<?php
return ob_get_clean();
}
);
);

0 comments on commit 9e43b23

Please sign in to comment.