Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 public function testGetAnnotations()
 {
     $class = new \ReflectionClass('\\ClassWithSuppressWarnings');
     $expected = ['SuppressWarnings' => 'Magento.TypeDuplication'];
     $this->assertEquals($expected, $this->_model->getAnnotations($class));
 }