/** * Check whether warning must be skipped * * @param \ReflectionClass $class * @return bool */ protected function _ignoreWarning(\ReflectionClass $class) { $annotations = $this->_argumentsReader->getAnnotations($class); if (isset($annotations[self::SUPPRESS_ANNOTATION])) { return $annotations[self::SUPPRESS_ANNOTATION] == self::TYPE_DUPLICATIONS; } return false; }
public function testGetAnnotations() { $class = new \ReflectionClass('\\ClassWithSuppressWarnings'); $expected = ['SuppressWarnings' => 'Magento.TypeDuplication']; $this->assertEquals($expected, $this->_model->getAnnotations($class)); }