Created
January 7, 2016 15:47
-
-
Save thunderer/59d5eb66eff5e0c7348e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface IFoo { | |
public function getValue(); | |
} | |
trait FooTrait { | |
private $value; | |
public function __construct($value) { | |
$this->value = $value; | |
} | |
public function getValue() { | |
return $this->value; | |
} | |
} | |
final class TypeA implements IFoo { use FooTrait; } | |
final class TypeB implements IFoo { use FooTrait; } | |
final class TypeC implements IFoo { use FooTrait; } | |
final class TypeD implements IFoo { use FooTrait; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment