123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?php
- use mindplay\test\traits\AliasTrait;
- use mindplay\test\traits\InsteadofTraitA;
- /**
- * @note('simple-trait')
- */
- trait SimpleTrait
- {
- /**
- * @note('simple-trait')
- */
- protected $sampleFromTrait = 'test';
- /**
- * @Note('simple-trait')
- */
- public function runFromTrait()
- {
- }
- }
- class SimpleTraitTester
- {
- use SimpleTrait, mindplay\test\traits\AnotherSimpleTrait;
- }
- trait InheritanceBaseTrait
- {
- /**
- * @Note('inheritance-base-trait')
- */
- public function traitAndParent()
- {
- }
- /**
- * @Note('inheritance-base-trait')
- */
- public function baseTraitAndParent()
- {
- }
- }
- trait InheritanceTrait
- {
- use InheritanceBaseTrait;
- /**
- * @Note('inheritance-trait')
- */
- public function traitAndParent()
- {
- }
- /**
- * @Note('inheritance-trait')
- */
- public function traitAndChild()
- {
- }
- /**
- * @Note('inheritance-trait')
- */
- public function traitAndParentAndChild()
- {
- }
- }
- class InheritanceBaseTraitTester
- {
- /**
- * @Note('inheritance-base-trait-tester')
- */
- public function baseTraitAndParent()
- {
- }
- /**
- * @Note('inheritance-base-trait-tester')
- */
- public function traitAndParent()
- {
- }
- /**
- * @Note('inheritance-base-trait-tester')
- */
- public function traitAndParentAndChild()
- {
- }
- }
- class InheritanceTraitTester extends InheritanceBaseTraitTester
- {
- use InheritanceTrait;
- /**
- * @Note('inheritance-trait-tester')
- */
- public function traitAndChild()
- {
- }
- /**
- * @Note('inheritance-trait-tester')
- */
- public function traitAndParentAndChild()
- {
- }
- }
- class AliasBaseTraitTester
- {
- /**
- * @Note('alias-base-trait-tester')
- */
- public function baseTraitRun()
- {
- }
- /**
- * @Note('alias-base-trait-tester')
- */
- public function traitRun()
- {
- }
- /**
- * @Note('alias-base-trait-tester')
- */
- public function run()
- {
- }
- }
- class AliasTraitTester extends AliasBaseTraitTester
- {
- use AliasTrait {
- AliasTrait::run as traitRun;
- }
- /**
- * @Note('alias-trait-tester')
- */
- public function run()
- {
- }
- }
- class InsteadofBaseTraitTester
- {
- /**
- * @Note('insteadof-base-trait-tester')
- */
- public function trate()
- {
- }
- /**
- * @Note('insteadof-base-trait-tester')
- */
- public function baseTrait()
- {
- }
- }
- class InsteadofTraitTester extends InsteadofBaseTraitTester
- {
- use InsteadofTraitA, mindplay\test\traits\InsteadofTraitB {
- InsteadofTraitA::trate insteadof mindplay\test\traits\InsteadofTraitB;
- mindplay\test\traits\InsteadofTraitB::baseTrait insteadof InsteadofTraitA;
- }
- }
|