@@ -111,6 +111,8 @@ protected function configure()
111111 /**
112112 * @see Command
113113 *
114+ * @return int 0 if everything went fine, or an exit code
115+ *
114116 * @throws \InvalidArgumentException When the target directory does not exist
115117 */
116118 protected function execute (InputInterface $ input , OutputInterface $ output )
@@ -156,12 +158,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
156158 *
157159 * @param \Symfony\Component\Console\Input\InputInterface $input
158160 * @param \Symfony\Component\Console\Output\OutputInterface $output
159- * @return void
161+ * @return int
160162 */
161163 protected function loadFixtures (InputInterface $ input , OutputInterface $ output , $ type = null )
162164 {
163165 if (null === $ type ) {
164- return ;
166+ return - 2 ;
165167 }
166168
167169 $ datas = $ this ->getFixtureFiles ($ type );
@@ -177,7 +179,7 @@ protected function loadFixtures(InputInterface $input, OutputInterface $output,
177179 } elseif ('xml ' === $ type ) {
178180 $ loader = new XmlDataLoader ($ this ->getApplication ()->getKernel ()->getProjectDir () . '/app ' );
179181 } else {
180- return ;
182+ return - 3 ;
181183 }
182184
183185 try {
@@ -188,20 +190,20 @@ protected function loadFixtures(InputInterface $input, OutputInterface $output,
188190 '' ,
189191 $ e ->getMessage ()), 'fg=white;bg=red ' );
190192
191- return false ;
193+ return - 4 ;
192194 }
193195
194196 $ output ->writeln (sprintf ('<comment>%s</comment> %s fixtures file%s loaded. ' , $ nb , strtoupper ($ type ), $ nb > 1 ? 's ' : '' ));
195197
196- return true ;
198+ return 0 ;
197199 }
198200
199201 /**
200202 * Load SQL fixtures
201203 *
202204 * @param \Symfony\Component\Console\Input\InputInterface $input
203205 * @param \Symfony\Component\Console\Output\OutputInterface $output
204- * @return void
206+ * @return int
205207 */
206208 protected function loadSqlFixtures (InputInterface $ input , OutputInterface $ output )
207209 {
0 commit comments