| @@ -3,8 +3,10 @@ | ||
| 3 | 3 | * ElasticPress backward compat functions |
| 4 | 4 | * |
| 5 | 5 | * @since 3.0 |
| 6 | 6 | * @package elasticpress |
| 7 | + * | |
| 8 | + * phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed | |
| 7 | 9 | */ |
| 8 | 10 | |
| 9 | 11 | /** |
| 10 | 12 | * This class was replaced with \ElasticPress\FeatureRequirementsStatus |
| @@ -27,9 +29,9 @@ | ||
| 27 | 29 | /** |
| 28 | 30 | * Returns the status of a feature |
| 29 | 31 | * |
| 30 | 32 | * 0 is no issues |
| 31 | - * 1 is usable but there are warnngs | |
| 33 | + * 1 is usable but there are warnings | |
| 32 | 34 | * 2 is not usable |
| 33 | 35 | * |
| 34 | 36 | * @var int |
| 35 | 37 | * @since 2.2 |
| @@ -48,18 +50,18 @@ | ||
| 48 | 50 | /** |
| 49 | 51 | * Search Elasticsearch for related content |
| 50 | 52 | * |
| 51 | 53 | * @param int $post_id Post ID |
| 52 | - * @param int $return Number of posts to get | |
| 54 | + * @param int $post_return Number of posts to get | |
| 53 | 55 | * @since 2.1 |
| 54 | 56 | * @return array|bool |
| 55 | 57 | */ |
| 56 | -function ep_find_related( $post_id, $return = 5 ) { | |
| 58 | +function ep_find_related( $post_id, $post_return = 5 ) { | |
| 57 | 59 | _deprecated_function( __FUNCTION__, '3.0', 'ElasticPress\Features::factory()->get_registered_feature' ); |
| 58 | 60 | |
| 59 | 61 | $feature = \ElasticPress\Features::factory()->get_registered_feature( 'related_posts' ); |
| 60 | 62 | |
| 61 | - return ( ! empty( $feature ) ) ? $feature->find_related( $post_id, $return ) : false; | |
| 63 | + return ( ! empty( $feature ) ) ? $feature->find_related( $post_id, $post_return ) : false; | |
| 62 | 64 | } |
| 63 | 65 | |
| 64 | 66 | /** |
| 65 | 67 | * Index a post given an ID |
| @@ -64,9 +66,9 @@ | ||
| 64 | 66 | /** |
| 65 | 67 | * Index a post given an ID |
| 66 | 68 | * |
| 67 | 69 | * @param int $post_id Post ID |
| 68 | - * @return boolean|array | |
| 70 | + * @return boolean|object | |
| 69 | 71 | */ |
| 70 | 72 | function ep_index_post( $post_id ) { |
| 71 | 73 | _deprecated_function( __FUNCTION__, '3.0', "ElasticPress\Indexables::factory()->get( 'post' )->index" ); |
| 72 | 74 | |