| @@ -3,20 +3,24 @@ | ||
| 3 | 3 | namespace Yoast\WP\SEO\Helpers; |
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * The Import Cursor Helper. |
| 7 | - * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded | |
| 8 | 7 | */ |
| 9 | 8 | class Import_Cursor_Helper { |
| 10 | 9 | |
| 11 | 10 | /** |
| 11 | + * The Options_Helper. | |
| 12 | + * | |
| 13 | + * @var Options_Helper | |
| 14 | + */ | |
| 15 | + public $options; | |
| 16 | + | |
| 17 | + /** | |
| 12 | 18 | * Class constructor. |
| 13 | 19 | * |
| 14 | 20 | * @param Options_Helper $options The options helper. |
| 15 | 21 | */ |
| 16 | - public function __construct( | |
| 17 | - Options_Helper $options | |
| 18 | - ) { | |
| 22 | + public function __construct( Options_Helper $options ) { | |
| 19 | 23 | $this->options = $options; |
| 20 | 24 | } |
| 21 | 25 | |
| 22 | 26 | /** |
| @@ -21,17 +25,17 @@ | ||
| 21 | 25 | |
| 22 | 26 | /** |
| 23 | 27 | * Returns the stored cursor value. |
| 24 | 28 | * |
| 25 | - * @param string $cursor_id The cursor id. | |
| 26 | - * @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. | |
| 27 | 31 | * |
| 28 | 32 | * @return int The stored cursor value. |
| 29 | 33 | */ |
| 30 | - public function get_cursor( $cursor_id, $default = 0 ) { | |
| 34 | + public function get_cursor( $cursor_id, $default_value = 0 ) { | |
| 31 | 35 | $import_cursors = $this->options->get( 'import_cursors', [] ); |
| 32 | 36 | |
| 33 | - return ( isset( $import_cursors[ $cursor_id ] ) ) ? $import_cursors[ $cursor_id ] : $default; | |
| 37 | + return ( isset( $import_cursors[ $cursor_id ] ) ) ? $import_cursors[ $cursor_id ] : $default_value; | |
| 34 | 38 | } |
| 35 | 39 | |
| 36 | 40 | /** |
| 37 | 41 | * Stores the current cursor value. |