1 | <?php |
||
36 | class RoboFile extends AbstractRoboFile |
||
|
|||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Load the appserver.io base tasks. |
||
41 | * |
||
42 | * @var \AppserverIo\RoboTasks\Base\loadTasks |
||
43 | */ |
||
44 | use AppserverIo\RoboTasks\Base\loadTasks; |
||
45 | |||
46 | /** |
||
47 | * Initializes the default configuration. |
||
48 | */ |
||
49 | public function __construct() |
||
58 | |||
59 | /** |
||
60 | * Run's the composer install command. |
||
61 | * |
||
62 | * @return void |
||
63 | */ |
||
64 | public function composerInstall() |
||
72 | |||
73 | /** |
||
74 | * Run's the composer update command. |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | public function composerUpdate() |
||
86 | |||
87 | /** |
||
88 | * Clean up the environment for a new build. |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | public function clean() |
||
96 | |||
97 | /** |
||
98 | * Prepare's the environment for a new build. |
||
99 | * |
||
100 | * @return void |
||
101 | */ |
||
102 | public function prepare() |
||
110 | |||
111 | /** |
||
112 | * Run's the PHPMD. |
||
113 | * |
||
114 | * @return void |
||
115 | */ |
||
116 | public function runMd() |
||
129 | |||
130 | /** |
||
131 | * Run's the PHPCPD. |
||
132 | * |
||
133 | * @return void |
||
134 | */ |
||
135 | public function runCpd() |
||
148 | |||
149 | /** |
||
150 | * Run's the PHPCodeSniffer. |
||
151 | * |
||
152 | * @return void |
||
153 | */ |
||
154 | public function runCs() |
||
167 | |||
168 | /** |
||
169 | * Run's the PHPUnit tests. |
||
170 | * |
||
171 | * @return void |
||
172 | */ |
||
173 | public function runTests() |
||
174 | { |
||
175 | |||
176 | // run PHPUnit |
||
177 | $this->taskPHPUnit(sprintf('%s/bin/phpunit', $this->getVendorDir())) |
||
178 | ->configFile('phpunit.xml') |
||
179 | ->run(); |
||
180 | } |
||
181 | |||
182 | /** |
||
183 | * The complete build process. |
||
184 | * |
||
185 | * @return void |
||
186 | */ |
||
187 | public function build() |
||
196 | |||
197 | /** |
||
198 | * Returns the distribution directory. |
||
199 | * |
||
200 | * @return string The distribution directory |
||
201 | */ |
||
202 | protected function getDistDir() |
||
206 | } |
||
207 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.