TestList.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * @author Joas Schilling <nickvergessen@owncloud.com>
  4. *
  5. * @copyright Copyright (c) 2015, ownCloud, Inc.
  6. * @license AGPL-3.0
  7. *
  8. * This code is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License, version 3,
  10. * as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License, version 3,
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>
  19. *
  20. */
  21. namespace Test\App\CodeChecker\Mock;
  22. use OC\App\CodeChecker\ICheck;
  23. class TestList implements ICheck {
  24. /** @var ICheck */
  25. protected $check;
  26. /**
  27. * @param ICheck $check
  28. */
  29. public function __construct(ICheck $check) {
  30. $this->check = $check;
  31. }
  32. /**
  33. * @param int $errorCode
  34. * @param string $errorObject
  35. * @return string
  36. */
  37. public function getDescription($errorCode, $errorObject) {
  38. return 'testing';
  39. }
  40. /**
  41. * @return array E.g.: `'ClassName' => 'oc version',`
  42. */
  43. public function getClasses() {
  44. return [
  45. // Deprecated classes
  46. 'OCP\AppFramework\IApi' => '8.0.0',
  47. ];
  48. }
  49. /**
  50. * @return array E.g.: `'ClassName::CONSTANT_NAME' => 'oc version',`
  51. */
  52. public function getConstants() {
  53. return [
  54. // Deprecated constants
  55. 'OCP\NamespaceName\ClassName::CONSTANT_NAME' => '8.0.0',
  56. ];
  57. }
  58. /**
  59. * @return array E.g.: `'functionName' => 'oc version',`
  60. */
  61. public function getFunctions() {
  62. return [
  63. // Deprecated functions
  64. 'OCP\NamespaceName\ClassName::functionName' => '8.0.0',
  65. ];
  66. }
  67. /**
  68. * @return array E.g.: `'ClassName::methodName' => 'oc version',`
  69. */
  70. public function getMethods() {
  71. return [
  72. // Deprecated methods
  73. 'OCP\NamespaceName\ClassName::methodName' => '8.0.0',
  74. ];
  75. }
  76. /**
  77. * @return bool
  78. */
  79. public function checkStrongComparisons() {
  80. return true;
  81. }
  82. }