Skip to content

Commit 6722a95

Browse files
Merge branch 'master' into 5.1
2 parents 601ec47 + 30c43ae commit 6722a95

25 files changed

+60
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/build/coverage
99
/build/logs
1010
/build/phar
11+
/build/phar-scoped
1112
/composer.lock
1213
/phpbu.xml
1314
/phpbu.json

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ before_script:
99
- composer self-update
1010
- composer install --no-interaction --prefer-source
1111
- wget -O phpunit.phar https://phar.phpunit.de/phpunit-6.5.6.phar
12+
- if [ $TRAVIS_PHP_VERSION = "7.1" ]; then wget -O phpstan.phar https://github.com/phpstan/phpstan/releases/download/0.10.5/phpstan.phar ; fi
1213

1314
script:
1415
- php phpunit.phar --configuration ./build/travis-ci.phpunit.xml
16+
- if [ $TRAVIS_PHP_VERSION = "7.1" ]; then php phpstan.phar analyse --no-progress -c phpstan.neon; fi
1517

1618
after_success:
1719
- wget https://scrutinizer-ci.com/ocular.phar

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Simple configuration example:
130130
```xml
131131
<?xml version="1.0" encoding="UTF-8"?>
132132
<phpbu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
133-
xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/5.0/phpbu.xsd"
133+
xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/5.1/phpbu.xsd"
134134
verbose="true">
135135
<backups>
136136
<backup name="myAppDB">

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
parameters:
2+
level: 2
3+
paths:
4+
- %currentWorkingDirectory%/src/
5+
ignoreErrors:
6+
- '#Call to an undefined method SebastianFeldmann\\Ftp\\Client::delete\(\)#'
7+
- '#Call to an undefined method ObjectStorage_Abstract::setLocalFile\(\)#'
8+
- '#Instantiated class phpbu\\App\\Runner\\Restore not found#'
9+
- '#Cannot cast DateTimeImmutable to int#'
10+
- '#Cannot call method getTimestamp\(\) on string#'

src/Backup/Cleaner/Quantity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function getFilesToDelete(Target $target, Collector $collector)
7676
/**
7777
* Returns true when the capacity is exceeded.
7878
*
79-
* @param array
79+
* @param array $files
8080
* @return bool
8181
*/
8282
private function isCapacityExceeded(array $files)

src/Backup/Cleaner/Stepwise.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,19 @@ protected function setupRanges()
9696
$all = new Range($start, $end, new Stepwise\Keeper\All());
9797

9898
// define the range that keeps backups per day
99-
$end = mktime(0, 0, 0, date('m', $end), date('d', $end) - $this->daysToKeepDaily, date('Y', $end));
99+
$end = mktime(0, 0, 0, date('m', $end), (int) date('d', $end) - $this->daysToKeepDaily, date('Y', $end));
100100
$daily = new Range($all->getEnd(), $end, new Stepwise\Keeper\OnePerGroup('Ymd'));
101101

102102
// define the range that keeps backups per week
103-
$end = mktime(0, 0, 0, date('m', $end), date('d', $end) - (7 * $this->weeksToKeepWeekly), date('Y', $end));
103+
$end = mktime(0, 0, 0, date('m', $end), (int) date('d', $end) - (7 * $this->weeksToKeepWeekly), date('Y', $end));
104104
$weekly = new Range($daily->getEnd(), $end, new Stepwise\Keeper\OnePerGroup('YW'));
105105

106106
// define the range that keeps backups per month
107-
$end = mktime(0, 0, 0, date('m', $end) - $this->monthToKeepMonthly, date('d', $end), date('Y', $end));
107+
$end = mktime(0, 0, 0, (int) date('m', $end) - $this->monthToKeepMonthly, date('d', $end), date('Y', $end));
108108
$monthly = new Range($weekly->getEnd(), $end, new Stepwise\Keeper\OnePerGroup('Ym'));
109109

110110
// define the range that keeps backups per year
111-
$end = mktime(0, 0, 0, date('m', $end), date('d', $end), date('Y', $end) - $this->yearsToKeepYearly);
111+
$end = mktime(0, 0, 0, date('m', $end), date('d', $end), (int) date('Y', $end) - $this->yearsToKeepYearly);
112112
$yearly = new Range($monthly->getEnd(), $end, new Stepwise\Keeper\OnePerGroup('Y'));
113113

114114
// delete all backups older then configured year range

src/Backup/Crypter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function setup(array $options = []);
2727
* Checks the created backup.
2828
*
2929
* @param \phpbu\App\Backup\Target $target
30-
* @param \phpbu\App\Result
30+
* @param \phpbu\App\Result $result
3131
* @throws \phpbu\App\Exception
3232
*/
3333
public function crypt(Target $target, Result $result);

src/Backup/Source/Arangodump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected function createExecutable(Target $target) : Executable
173173
/**
174174
* Create backup status.
175175
*
176-
* @param \phpbu\App\Backup\Target
176+
* @param \phpbu\App\Backup\Target $target
177177
* @return \phpbu\App\Backup\Source\Status
178178
*/
179179
protected function createStatus(Target $target) : Status

src/Backup/Source/Mongodump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ protected function createExecutable(Target $target) : Executable
189189
/**
190190
* Create backup status.
191191
*
192-
* @param \phpbu\App\Backup\Target
192+
* @param \phpbu\App\Backup\Target $target
193193
* @return \phpbu\App\Backup\Source\Status
194194
*/
195195
protected function createStatus(Target $target) : Status

src/Backup/Source/Mysqldump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ protected function createExecutable(Target $target) : Executable
281281
/**
282282
* Create backup status.
283283
*
284-
* @param \phpbu\App\Backup\Target
284+
* @param \phpbu\App\Backup\Target $target
285285
* @return \phpbu\App\Backup\Source\Status
286286
*/
287287
protected function createStatus(Target $target) : Status

0 commit comments

Comments
 (0)