Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Djennez committed Apr 23, 2024
1 parent 9cbac04 commit 76d8f8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generators/schema/howto.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ private function add_duration( &$data, $attributes ) {
return;
}

$days = ! is_numeric( $attributes['days'] ) ? 0 : intval( $attributes['days'] );
$hours = ! is_numeric( $attributes['hours'] ) ? 0 : intval( $attributes['hours'] );
$minutes = ! is_numeric( $attributes['minutes'] ) ? 0 : intval( $attributes['minutes'] );
$days = ! \is_numeric( $attributes['days'] ) ? 0 : \intval( $attributes['days'] );
$hours = ! \is_numeric( $attributes['hours'] ) ? 0 : \intval( $attributes['hours'] );
$minutes = ! \is_numeric( $attributes['minutes'] ) ? 0 : \intval( $attributes['minutes'] );

if ( ( $days + $hours + $minutes ) > 0 ) {
$data['totalTime'] = \esc_attr( 'P' . $days . 'DT' . $hours . 'H' . $minutes . 'M' );
Expand Down

0 comments on commit 76d8f8f

Please sign in to comment.