trait Tlf\Lexer\Test\Directives\Traits

Constants

Properties

  • `protected $_trait_tests = [

      'Trait.InNamespace'=>[
          'ast.type''file',
          'start''php_code'],
          'input'"namespace Abc; trait Def {}",
          'expect'=>[
              'namespace'=>[
                  'type''namespace',
                  'name''Abc',
                  'declaration''namespace Abc;',
                  'trait'=>[
                      0=>[
                          'type''trait',
                          'namespace''Abc',
                          'fqn''Abc\\Def',
                          'name''Def',
                          'declaration''trait Def',
                      ],
                  ],
              ],
          ]
      ],
    
      'Trait.EmptyBody'=>[
          'ast.type''file',
          'start''php_code'],
          'input'"trait Abc {\n\n}",
          'expect'=>[
              'namespace''',
              'trait'=>[
                  0=>[
                      'type''trait',
                      'name''Abc',
                      'declaration''trait Abc',
                  ],
              ],
          ]
      ],
    
      'Trait.OpenInFile'=>[
          'ast.type''file',
          'start''php_code'],
          'input''trait Abc {',
          'expect'=>[
              'namespace''',
              'trait'=>[
                  0=>[
                  'type''trait',
                  'name''Abc',
                  'declaration'=> 'trait Abc',
                  ],
              ]
          ],
      ],
    
      'Trait.OpenInNamespace'=>[
          'ast.type''namespace',
          'start''php_code'],
          'input''trait Abc {',
          'expect'=>[
              'trait'=>[
                  0=>[
                  'type''trait',
                  'name''Abc',
                  'declaration'=> 'trait Abc',
                  ],
              ],
          ],
      ],
    

    ];`

Methods