/**
  * Parse the arguments.
  * @return array
  */
 private function parseArguments()
 {
     try {
         $this->getopt->parse();
         $options = $this->getopt->getOptions();
         if (isset($options['version'])) {
             echo sprintf($this->getopt->getBanner(), '');
             exit(0);
         }
         if (!isset($options['extpath'])) {
             throw new \Exception('Option \'extpath\' must be given');
         }
         $this->options = $options;
     } catch (\Exception $exception) {
         echo sprintf($this->getopt->getBanner(), PHP_EOL . $exception->getMessage() . PHP_EOL);
         exit(0);
     }
 }