コード例 #1
0
ファイル: Transformers.php プロジェクト: bgotink/PHP-CS-Fixer
 /**
  * Register Transformer.
  *
  * @param TransformerInterface $transformer Transformer
  */
 public function registerTransformer(TransformerInterface $transformer)
 {
     $this->items[] = $transformer;
     $transformer->registerCustomTokens();
     foreach ($transformer->getCustomTokenNames() as $name) {
         $this->addCustomToken(constant($name), $name);
     }
 }
コード例 #2
0
 /**
  * @dataProvider getPriorityCases
  */
 public function testPriority(TransformerInterface $first, TransformerInterface $second)
 {
     $this->assertLessThan($first->getPriority(), $second->getPriority());
 }