mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-13 19:56:41 +09:00
Merge pull request #149 from cmanon/feature/php-8-support
Feature/php 8 support
This commit is contained in:
@@ -16,5 +16,10 @@
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "phpcs -s"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+478
-540
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
||||
</rule>
|
||||
|
||||
<rule ref="PHPCompatibility"/>
|
||||
<config name="testVersion" value="5.3-7.4"/>
|
||||
<config name="testVersion" value="5.3-8.0"/>
|
||||
<arg name="extensions" value="php"/>
|
||||
|
||||
<file>./src</file>
|
||||
|
||||
@@ -133,8 +133,8 @@ class WPStrava_ActivityRenderer {
|
||||
}
|
||||
|
||||
if ( $activity_details->calories ) {
|
||||
$calories_title = '<th>' . __( 'Calories Burned', 'wp-strava' ) . '</th>';
|
||||
$calories = '<td data-label="' . __( 'Calories Burned', 'wp-strava' ) . '">
|
||||
$calories_title = '<th>' . __( 'Calories Burned', 'wp-strava' ) . '</th>';
|
||||
$calories = '<td data-label="' . __( 'Calories Burned', 'wp-strava' ) . '">
|
||||
<div class="activity-details-table-info">' . $strava_som->calories( $activity_details->calories ) . '</div>
|
||||
<div class="activity-details-table-units">' . $strava_som->get_calories_label() . '</div>
|
||||
</td>';
|
||||
|
||||
@@ -87,14 +87,14 @@ class WPStrava_SegmentsRenderer {
|
||||
* @since 2.9.0
|
||||
*/
|
||||
private function get_table( $segment_details, $som ) {
|
||||
$strava_som = WPStrava_SOM::get_som( $som );
|
||||
$elevation_title = '<th>' . __( 'Elevation Gain', 'wp-strava' ) . '</th>';
|
||||
$elevation = '<td data-label="' . __( 'Elevation Gain', 'wp-strava' ) . '">
|
||||
$strava_som = WPStrava_SOM::get_som( $som );
|
||||
$elevation_title = '<th>' . __( 'Elevation Gain', 'wp-strava' ) . '</th>';
|
||||
$elevation = '<td data-label="' . __( 'Elevation Gain', 'wp-strava' ) . '">
|
||||
<div class="activity-details-table-info">' . $strava_som->elevation( $segment_details->total_elevation_gain ) . '</div>
|
||||
<div class="activity-details-table-units">' . $strava_som->get_elevation_label() . '</div>
|
||||
</td>';
|
||||
$grade_title = '<th>' . __( 'Avg. Grade', 'wp-strava' ) . '</th>';
|
||||
$grade = '<td data-label="' . __( 'Avg. Grade', 'wp-strava' ) . '">
|
||||
$grade_title = '<th>' . __( 'Avg. Grade', 'wp-strava' ) . '</th>';
|
||||
$grade = '<td data-label="' . __( 'Avg. Grade', 'wp-strava' ) . '">
|
||||
<div class="activity-details-table-info">' . $strava_som->percent( $segment_details->average_grade ) . '</div>
|
||||
<div class="activity-details-table-units"> </div>
|
||||
</td>';
|
||||
|
||||
Reference in New Issue
Block a user