Formatting fixes

This commit is contained in:
Justin Foell
2021-03-26 10:53:51 -05:00
parent 1626abfcde
commit 28b994fbfa
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ class WPStrava_API {
$data = $this->remote_get( $uri, $args );
// Default to 1 hour of transient cache unless set otherwise.
$settings = WPStrava::get_instance()->settings;
$settings = WPStrava::get_instance()->settings;
$cache_time = $settings->cache_time ? absint( $settings->cache_time ) : HOUR_IN_SECONDS;
set_transient( $transient_key, $data, $cache_time );
+1 -1
View File
@@ -67,7 +67,7 @@ class WPStrava_Blocks_Activity implements WPStrava_Blocks_Interface {
$this->add_script = true;
$matches = [];
$matches = array();
preg_match( '/\/activities\/([0-9].*)$/', $attributes['url'], $matches );
if ( $matches[1] ) {
// Transform from block attributes to shortcode standard.
+1 -1
View File
@@ -67,7 +67,7 @@ class WPStrava_Blocks_Route implements WPStrava_Blocks_Interface {
$this->add_script = true;
$matches = [];
$matches = array();
preg_match( '/\/routes\/([0-9].*)$/', $attributes['url'], $matches );
if ( $matches[1] ) {
// Transform from block attributes to shortcode standard.
+2 -2
View File
@@ -544,8 +544,8 @@ class WPStrava_Settings {
$fifteen_min = 15 * MINUTE_IN_SECONDS;
?>
<select id="strava_cache_time" name="strava_cache_time">
<option value="<?php echo esc_attr( HOUR_IN_SECONDS )?>" <?php selected( $this->cache_time, HOUR_IN_SECONDS ); ?>><?php esc_html_e( '1 Hour', 'wp-strava' ); ?></option>
<option value="<?php echo esc_attr( $fifteen_min )?>" <?php selected( $this->cache_time, $fifteen_min ); ?>><?php esc_html_e( '15 Minutes', 'wp-strava' ); ?></option>
<option value="<?php echo esc_attr( HOUR_IN_SECONDS ); ?>" <?php selected( $this->cache_time, HOUR_IN_SECONDS ); ?>><?php esc_html_e( '1 Hour', 'wp-strava' ); ?></option>
<option value="<?php echo esc_attr( $fifteen_min ); ?>" <?php selected( $this->cache_time, $fifteen_min ); ?>><?php esc_html_e( '15 Minutes', 'wp-strava' ); ?></option>
</select>
<p class="description"><?php esc_html_e( 'How often to refresh data from the Strava API', 'wp-strava' ); ?></p>
<?php
+2 -2
View File
@@ -6,12 +6,12 @@ class WPStrava_SOMEnglishTest extends TestCase {
private $som;
public function setUp() : void {
public function setUp() {
\WP_Mock::setUp();
$this->som = new WPStrava_SOMEnglish();
}
public function tearDown() : void {
public function tearDown() {
\WP_Mock::tearDown();
}