private function assertSameParameterAttributes(\ReflectionParameter $original, ReflectionParameter $stubbed) { $this->assertSame($original->getName(), $stubbed->getName()); $this->assertSame($original->isArray(), $stubbed->isArray()); $this->assertSame($original->isCallable(), $stubbed->isCallable()); //$this->assertSame($original->allowsNull(), $stubbed->allowsNull()); @TODO WTF? $this->assertSame($original->canBePassedByValue(), $stubbed->canBePassedByValue()); $this->assertSame($original->isOptional(), $stubbed->isOptional()); $this->assertSame($original->isPassedByReference(), $stubbed->isPassedByReference()); $this->assertSame($original->isVariadic(), $stubbed->isVariadic()); if ($class = $original->getClass()) { $stubbedClass = $stubbed->getClass(); $this->assertInstanceOf(ReflectionClass::class, $stubbedClass); $this->assertSame($class->getName(), $stubbedClass->getName()); } else { $this->assertNull($stubbed->getClass()); } }
/** * {@inheritDoc} */ public function isArray() { return $this->betterReflectionParameter->isArray(); }