class-gsc-count.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Google_Search_Console
  6. */
  7. /**
  8. * Class WPSEO_GSC_Count.
  9. *
  10. * @deprecated 12.5
  11. *
  12. * @codeCoverageIgnore
  13. */
  14. class WPSEO_GSC_Count {
  15. /**
  16. * The name of the option containing the last checked timestamp.
  17. *
  18. * @var string
  19. */
  20. const OPTION_CI_LAST_FETCH = 'wpseo_gsc_last_fetch';
  21. /**
  22. * The option name where the issues counts are saved.
  23. *
  24. * @var string
  25. */
  26. const OPTION_CI_COUNTS = 'wpseo_gsc_issues_counts';
  27. /**
  28. * Fetching the counts
  29. *
  30. * @deprecated 12.5
  31. *
  32. * @codeCoverageIgnore
  33. *
  34. * @param WPSEO_GSC_Service $service Service class instance.
  35. */
  36. public function __construct( WPSEO_GSC_Service $service ) {
  37. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  38. }
  39. /**
  40. * Getting the counts for given platform and return them as an array.
  41. *
  42. * @deprecated 12.5
  43. *
  44. * @codeCoverageIgnore
  45. *
  46. * @param string $platform Platform (desktop, mobile, feature phone).
  47. *
  48. * @return array
  49. */
  50. public function get_platform_counts( $platform ) {
  51. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  52. return array();
  53. }
  54. /**
  55. * Return the fetched issues.
  56. *
  57. * @deprecated 12.5
  58. *
  59. * @codeCoverageIgnore
  60. *
  61. * @return array
  62. */
  63. public function get_issues() {
  64. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  65. return $this->issues;
  66. }
  67. /**
  68. * Listing the issues an gives them back as fetched issues.
  69. *
  70. * @deprecated 12.5
  71. *
  72. * @codeCoverageIgnore
  73. *
  74. * @param string $platform Platform (desktop, mobile, feature phone).
  75. * @param string $category Issue category.
  76. */
  77. public function list_issues( $platform, $category ) {
  78. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  79. }
  80. /**
  81. * Getting the counts for given platform and category.
  82. *
  83. * @deprecated 12.5
  84. *
  85. * @codeCoverageIgnore
  86. *
  87. * @param string $platform Platform (desktop, mobile, feature phone).
  88. * @param string $category Issue type.
  89. *
  90. * @return integer
  91. */
  92. public function get_issue_count( $platform, $category ) {
  93. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  94. return 0;
  95. }
  96. /**
  97. * Update the count of the issues.
  98. *
  99. * @deprecated 12.5
  100. *
  101. * @codeCoverageIgnore
  102. *
  103. * @param string $platform Platform (desktop, mobile, feature phone).
  104. * @param string $category Issue type.
  105. * @param integer $new_count Updated count.
  106. */
  107. public function update_issue_count( $platform, $category, $new_count ) {
  108. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  109. }
  110. /**
  111. * Fetching the counts from the GSC API.
  112. *
  113. * @deprecated 12.5
  114. *
  115. * @codeCoverageIgnore
  116. */
  117. public function fetch_counts() {
  118. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  119. }
  120. }