Skip to content

Commit 54ad6ba

Browse files
committed
Added type hinting
1 parent 3d758cb commit 54ad6ba

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

themes/osi/functions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function register_footer_above_sidebar() {
358358
*
359359
* @return void
360360
*/
361-
function osi_query_offset( &$query ) {
361+
function osi_query_offset( WP_Query &$query ) {
362362
if ( ! ( $query->is_blog() || is_main_query() ) || is_admin() || is_front_page() || is_archive() || is_404() ) {
363363
return;
364364
}
@@ -381,12 +381,12 @@ function osi_query_offset( &$query ) {
381381
/**
382382
* Adjust the pagination offset.
383383
*
384-
* @param int $found_posts The number of found posts.
384+
* @param integer $found_posts The number of found posts.
385385
* @param WP_Query $query WordPress Query object.
386-
*
387-
* @return int Adjusted number of found posts.
386+
*
387+
* @return integer Adjusted number of found posts.
388388
*/
389-
function osi_adjust_offset_pagination( $found_posts, $query ) {
389+
function osi_adjust_offset_pagination( int $found_posts, WP_Query $query ) {
390390
$offset = -1;
391391
if ( $query->is_blog() && is_main_query() && ! is_admin() && ! $query->is_front_page() ) {
392392
return $found_posts - $offset;

0 commit comments

Comments
 (0)