|
| 1 | +<?php |
| 2 | + |
| 3 | +class FooBar { |
| 4 | + public function __construct($a, $b) { |
| 5 | + parent::__construct($a, $b); |
| 6 | + } |
| 7 | +} |
| 8 | + |
| 9 | +class BarFoo { |
| 10 | + public function __construct($a, $b) { |
| 11 | + parent::__construct($a, 'XML', $b); |
| 12 | + } |
| 13 | +} |
| 14 | + |
| 15 | +class Foo { |
| 16 | + public function export($a, $b = null) { |
| 17 | + return parent::export($a, $b); |
| 18 | + } |
| 19 | +} |
| 20 | + |
| 21 | +class Bar { |
| 22 | + public function export($a, $b = null) { |
| 23 | + return parent::export($a); |
| 24 | + } |
| 25 | + |
| 26 | + public function ignoreNoParent($a, $b) { |
| 27 | + return $a + $b; |
| 28 | + } |
| 29 | + |
| 30 | + public function differentParentMethod($a, $b) { |
| 31 | + return parent::anotherMethod($a, $b); |
| 32 | + } |
| 33 | + |
| 34 | + public function methodCallWithExpression($a, $b) { |
| 35 | + return parent::methodCallWithExpression(($a + $b), ($b)); |
| 36 | + } |
| 37 | + |
| 38 | + public function uselessMethodCallWithExpression($a, $b) { |
| 39 | + return parent::uselessMethodCallWithExpression(($a), ($b)); |
| 40 | + } |
| 41 | + |
| 42 | + public function contentAfterCallingParent() { |
| 43 | + parent::contentAfterCallingParent(); |
| 44 | + |
| 45 | + return 1; |
| 46 | + } |
| 47 | + |
| 48 | + public function ignoreNoParentVoidMethod($a, $b) { |
| 49 | + $c = $a + $b; |
| 50 | + } |
| 51 | + |
| 52 | + public function modifiesParentReturnValue($a, $b) { |
| 53 | + return parent::modifiesParentReturnValue($a, $b) + $b; |
| 54 | + } |
| 55 | + |
| 56 | + public function uselessMethodCallTrailingComma($a) { |
| 57 | + return parent::uselessMethodCallTrailingComma($a,); |
| 58 | + } |
| 59 | + |
| 60 | + public function differentParameterOrder($a, $b) { |
| 61 | + return parent::differentParameterOrder($b, $a); |
| 62 | + } |
| 63 | + |
| 64 | + public function sameNumberDifferentParameters($a, $b) { |
| 65 | + return parent::sameNumberDifferentParameters($this->prop[$a], $this->{$b}); |
| 66 | + } |
| 67 | +} |
| 68 | + |
| 69 | +abstract class AbstractFoo { |
| 70 | + abstract public function sniffShouldBailEarly(); |
| 71 | +} |
| 72 | + |
| 73 | +interface InterfaceFoo { |
| 74 | + public function sniffShouldBailEarly(); |
| 75 | +} |
| 76 | + |
| 77 | +trait TraitFoo { |
| 78 | + abstract public function sniffShouldBailEarly(); |
| 79 | +} |
0 commit comments