@@ -29,8 +29,8 @@ class ExportCommand extends Command
2929{
3030 /**
3131 * Hook method for defining this command's option parser
32- * @param ConsoleOptionParser $parser The parser to be defined
33- * @return ConsoleOptionParser
32+ * @param \Cake\Console\ ConsoleOptionParser $parser The parser to be defined
33+ * @return \Cake\Console\ ConsoleOptionParser
3434 */
3535 protected function buildOptionParser (ConsoleOptionParser $ parser )
3636 {
@@ -47,8 +47,9 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
4747 'short ' => 'f ' ,
4848 ],
4949 'rotate ' => [
50- 'help ' => __d ('database_backup ' , 'Rotates backups. You have to indicate the number of backups you ' .
51- 'want to keep. So, it will delete all backups that are older. By default, no backup will be deleted ' ),
50+ 'help ' => __d ('database_backup ' , 'Rotates backups. You have to indicate the number of backups ' .
51+ 'you ìwant to keep. So, it will delete all backups that are older. By default, no backup ' .
52+ 'will be deleted ' ),
5253 'short ' => 'r ' ,
5354 ],
5455 'send ' => [
@@ -63,8 +64,8 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
6364 * Exports a database backup.
6465 *
6566 * This command uses `RotateCommand` and `SendCommand`.
66- * @param Arguments $args The command arguments
67- * @param ConsoleIo $io The console io
67+ * @param \Cake\Console\ Arguments $args The command arguments
68+ * @param \Cake\Console\ ConsoleIo $io The console io
6869 * @return null|int The exit code or null for success
6970 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#export
7071 * @uses DatabaseBackup\Command\RotateCommand::execute()
@@ -78,13 +79,13 @@ public function execute(Arguments $args, ConsoleIo $io)
7879 parent ::execute ($ args , $ io );
7980
8081 try {
81- $ instance = new BackupExport ;
82+ $ instance = new BackupExport () ;
8283 //Sets the output filename or the compression type.
8384 //Regarding the `rotate` option, the `BackupShell::rotate()` method
8485 // will be called at the end, instead of `BackupExport::rotate()`
85- if ($ args ->hasOption ('filename ' )) {
86+ if ($ args ->getOption ('filename ' )) {
8687 $ instance ->filename ($ args ->getOption ('filename ' ));
87- } elseif ($ args ->hasOption ('compression ' )) {
88+ } elseif ($ args ->getOption ('compression ' )) {
8889 $ instance ->compression ($ args ->getOption ('compression ' ));
8990 }
9091
@@ -95,8 +96,8 @@ public function execute(Arguments $args, ConsoleIo $io)
9596 $ quiet = $ args ->getOption ('quiet ' );
9697
9798 //Sends via email
98- if ($ args ->hasOption ('send ' )) {
99- $ SendCommand = new SendCommand ;
99+ if ($ args ->getOption ('send ' )) {
100+ $ SendCommand = new SendCommand () ;
100101 $ SendCommand ->execute (new Arguments (
101102 [$ file , $ args ->getOption ('send ' )],
102103 compact ('verbose ' , 'quiet ' ),
@@ -105,8 +106,8 @@ public function execute(Arguments $args, ConsoleIo $io)
105106 }
106107
107108 //Rotates
108- if ($ args ->hasOption ('rotate ' )) {
109- $ RotateCommand = new RotateCommand ;
109+ if ($ args ->getOption ('rotate ' )) {
110+ $ RotateCommand = new RotateCommand () ;
110111 $ RotateCommand ->execute (new Arguments (
111112 [$ args ->getOption ('rotate ' )],
112113 compact ('verbose ' , 'quiet ' ),
0 commit comments