Skip to content

Commit 243edbf

Browse files
committed
little fixes
1 parent d59d899 commit 243edbf

File tree

10 files changed

+19
-12
lines changed

10 files changed

+19
-12
lines changed

src/Command/DeleteAllCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
{

src/Command/ExportCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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
{

src/Command/ImportCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
{

src/Command/IndexCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
{

src/Command/RotateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
{

src/Command/SendCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
{

src/Driver/Driver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

src/Utility/BackupExport.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/Utility/BackupImport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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)

src/Utility/BackupManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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
{

0 commit comments

Comments
 (0)