PHP Classes
elePHPant
Icontem

File: phpcf-src/test/original/trait.php

Recommend this page to a friend!
  Classes of Alex Krash  >  PHP Code formatter  >  phpcf-src/test/original/trait.php  >  Download  
File: phpcf-src/test/original/trait.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP Code formatter
Reformat PHP code according to standard options
Author: By
Last change:
Date: 4 years ago
Size: 636 bytes
 

Contents

Class file image Download
<?php
trait SampleTrait{
   
/**
     * @var int this is trait variable
     */
   
protected $trait_variable = 1;

    public function
test($a,$b){
       
$b = 10; // test
   
}
}

trait
TraitTwo {

}

trait
TraitThree {
    public function
test($a,$b) {
       
$b = 20;
    }
}

class
Impl { use SampleTrait,TraitTwo;}

class
ImplConflict {
    use
SampleTrait, TraitThree {
       
    }
}

class
ImplResolved {
    use
SampleTrait, TraitThree {
       
TraitThree::test insteadof
       
SampleTrait;
       
SampleTrait::test
       
as testNew
       
;
       
test
       
as
        private
       
test;
    }
}