You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.7 KiB

3 years ago
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. *
  7. * @license AGPL-3.0
  8. *
  9. * This code is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License, version 3,
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>
  20. *
  21. */
  22. namespace OC\App\CodeChecker;
  23. class StrongComparisonCheck 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 $this->check->getDescription($errorCode, $errorObject);
  39. }
  40. /**
  41. * @return array
  42. */
  43. public function getClasses() {
  44. return $this->check->getClasses();
  45. }
  46. /**
  47. * @return array
  48. */
  49. public function getConstants() {
  50. return $this->check->getConstants();
  51. }
  52. /**
  53. * @return array
  54. */
  55. public function getFunctions() {
  56. return $this->check->getFunctions();
  57. }
  58. /**
  59. * @return array
  60. */
  61. public function getMethods() {
  62. return $this->check->getMethods();
  63. }
  64. /**
  65. * @return bool
  66. */
  67. public function checkStrongComparisons() {
  68. return true;
  69. }
  70. }