File tree Expand file tree Collapse file tree 10 files changed +19
-12
lines changed
Expand file tree Collapse file tree 10 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
4040 * @param \Cake\Console\ConsoleIo $io The console io
4141 * @return int|null The exit code or null for success
4242 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#delete_all
43- * @uses DatabaseBackup\Utility\BackupManager::deleteAll()
43+ * @uses \ DatabaseBackup\Utility\BackupManager::deleteAll()
4444 */
4545 public function execute (Arguments $ args , ConsoleIo $ io )
4646 {
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
6868 * @param \Cake\Console\ConsoleIo $io The console io
6969 * @return int|null The exit code or null for success
7070 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#export
71- * @uses DatabaseBackup\Command\RotateCommand::execute()
72- * @uses DatabaseBackup\Command\SendCommand::execute()
73- * @uses DatabaseBackup\Utility\BackupExport::compression()
74- * @uses DatabaseBackup\Utility\BackupExport::export()
75- * @uses DatabaseBackup\Utility\BackupExport::filename()
71+ * @uses \ DatabaseBackup\Command\RotateCommand::execute()
72+ * @uses \ DatabaseBackup\Command\SendCommand::execute()
73+ * @uses \ DatabaseBackup\Utility\BackupExport::compression()
74+ * @uses \ DatabaseBackup\Utility\BackupExport::export()
75+ * @uses \ DatabaseBackup\Utility\BackupExport::filename()
7676 */
7777 public function execute (Arguments $ args , ConsoleIo $ io )
7878 {
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
4545 * @param \Cake\Console\ConsoleIo $io The console io
4646 * @return int|null The exit code or null for success
4747 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#import
48- * @uses DatabaseBackup\Utility\BackupImport::filename()
49- * @uses DatabaseBackup\Utility\BackupImport::import()
48+ * @uses \ DatabaseBackup\Utility\BackupImport::filename()
49+ * @uses \ DatabaseBackup\Utility\BackupImport::import()
5050 */
5151 public function execute (Arguments $ args , ConsoleIo $ io )
5252 {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
4242 * @param \Cake\Console\ConsoleIo $io The console io
4343 * @return int|null The exit code or null for success
4444 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#index
45- * @uses DatabaseBackup\Utility\BackupManager::index()
45+ * @uses \ DatabaseBackup\Utility\BackupManager::index()
4646 */
4747 public function execute (Arguments $ args , ConsoleIo $ io )
4848 {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
4848 * @param \Cake\Console\ConsoleIo $io The console io
4949 * @return int|null The exit code or null for success
5050 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#rotate
51- * @uses DatabaseBackup\Utility\BackupManager::rotate()
51+ * @uses \ DatabaseBackup\Utility\BackupManager::rotate()
5252 */
5353 public function execute (Arguments $ args , ConsoleIo $ io )
5454 {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
5151 * @param \Cake\Console\ConsoleIo $io The console io
5252 * @return int|null The exit code or null for success
5353 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupShell#send
54- * @uses DatabaseBackup\Utility\BackupManager::send()
54+ * @uses \ DatabaseBackup\Utility\BackupManager::send()
5555 */
5656 public function execute (Arguments $ args , ConsoleIo $ io )
5757 {
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ protected function _importExecutableWithCompression($filename)
171171 * - Backup.afterExport: will be triggered after export
172172 * @param string $filename Filename where you want to export the database
173173 * @return bool true on success
174+ * @throws \Exception
174175 * @uses _exportExecutableWithCompression()
175176 */
176177 final public function export ($ filename )
@@ -213,6 +214,7 @@ final public function getConfig($key = null)
213214 * - Backup.afterImport: will be triggered after import
214215 * @param string $filename Filename from which you want to import the database
215216 * @return bool true on success
217+ * @throws \Exception
216218 * @uses _importExecutableWithCompression()
217219 */
218220 final public function import ($ filename )
Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ public function compression($compression)
131131 * contain patterns
132132 * @return \DatabaseBackup\Utility\BackupExport
133133 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupExport-utility#filename
134+ * @throws \Exception
134135 * @throws \InvalidArgumentException
136+ * @throws \Tools\Exception\NotWritableException
135137 * @uses compression()
136138 * @uses $config
137139 * @uses $filename
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function __construct()
5252 * @return \DatabaseBackup\Utility\BackupImport
5353 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupImport-utility#filename
5454 * @throws \InvalidArgumentException
55+ * @throws \Tools\Exception\NotReadableException
5556 * @uses $filename
5657 */
5758 public function filename ($ filename )
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class BackupManager
3434 * The path can be relative to the backup directory
3535 * @return bool
3636 * @see https://github.com/mirko-pagliai/cakephp-database-backup/wiki/How-to-use-the-BackupManager-utility#delete
37+ * @throws \Tools\Exception\NotWritableException
3738 */
3839 public function delete ($ filename )
3940 {
@@ -54,7 +55,7 @@ public function delete($filename)
5455 public function deleteAll ()
5556 {
5657 return array_filter (array_map (function ($ file ) {
57- return $ this ->delete ($ file ->filename ) ? $ file ->filename : false ;
58+ return ! $ this ->delete ($ file ->filename ) ?: $ file ->filename ;
5859 }, $ this ->index ()->toList ()));
5960 }
6061
@@ -117,6 +118,7 @@ public function rotate($rotate)
117118 * @param string $recipient Recipient's email address
118119 * @return \Cake\Mailer\Email
119120 * @since 1.1.0
121+ * @throws \Tools\Exception\NotReadableException
120122 */
121123 protected function getEmailInstance ($ backup , $ recipient )
122124 {
You can’t perform that action at this time.
0 commit comments