PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/helpers/import-cursor-helper.php +13 -11 18.3 → trunk View file →
@@ -1,24 +1,26 @@
1 1 <?php
2 2
3 3 namespace Yoast\WP\SEO\Helpers;
4 4
5 -use Yoast\WP\SEO\Helpers\Options_Helper;
6 -
7 5 /**
8 6 * The Import Cursor Helper.
9 - * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
10 7 */
11 8 class Import_Cursor_Helper {
12 9
13 10 /**
11 + * The Options_Helper.
12 + *
13 + * @var Options_Helper
14 + */
15 + public $options;
16 +
17 + /**
14 18 * Class constructor.
15 19 *
16 20 * @param Options_Helper $options The options helper.
17 21 */
18 - public function __construct(
19 - Options_Helper $options
20 - ) {
22 + public function __construct( Options_Helper $options ) {
21 23 $this->options = $options;
22 24 }
23 25
24 26 /**
@@ -23,17 +25,17 @@
23 25
24 26 /**
25 27 * Returns the stored cursor value.
26 28 *
27 - * @param string $cursor_id The cursor id.
28 - * @param mixed $default The default value if no cursor has been set yet.
29 + * @param string $cursor_id The cursor id.
30 + * @param mixed $default_value The default value if no cursor has been set yet.
29 31 *
30 32 * @return int The stored cursor value.
31 33 */
32 - public function get_cursor( $cursor_id, $default = 0 ) {
34 + public function get_cursor( $cursor_id, $default_value = 0 ) {
33 35 $import_cursors = $this->options->get( 'import_cursors', [] );
34 36
35 - return ( isset( $import_cursors[ $cursor_id ] ) ) ? $import_cursors[ $cursor_id ] : $default;
37 + return ( isset( $import_cursors[ $cursor_id ] ) ) ? $import_cursors[ $cursor_id ] : $default_value;
36 38 }
37 39
38 40 /**
39 41 * Stores the current cursor value.
@@ -40,9 +42,9 @@
40 42 *
41 43 * @param string $cursor_id The cursor id.
42 44 * @param int $last_imported_id The id of the lastly imported entry.
43 45 *
44 - * @return void.
46 + * @return void
45 47 */
46 48 public function set_cursor( $cursor_id, $last_imported_id ) {
47 49 $current_cursors = $this->options->get( 'import_cursors', [] );
48 50