| 1 | <?php |
||
| 17 | abstract class BaseGenerator implements Generator |
||
| 18 | { |
||
| 19 | |||
| 20 | use Namespaces; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $name; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $suite; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | private $template; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var TemplateFactoryInterface |
||
| 39 | */ |
||
| 40 | private $factory; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var array |
||
| 44 | */ |
||
| 45 | protected $settings; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * BaseGenerator constructor. |
||
| 49 | * |
||
| 50 | * @param string $suite |
||
| 51 | * @param string $template |
||
| 52 | */ |
||
| 53 | public function __construct(string $suite, string $template) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return TemplateInterface |
||
| 62 | */ |
||
| 63 | final public function getTemplate() : TemplateInterface |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string |
||
| 70 | */ |
||
| 71 | final protected function getSuite() : string |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return string |
||
| 78 | */ |
||
| 79 | public function produce() : string |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return string |
||
| 86 | */ |
||
| 87 | protected function getNamespaceForTest() : string |
||
| 91 | |||
| 92 | } |
||
| 93 |