Skip to content

Commit 671aed1

Browse files
Merge pull request #160 from marcelthole/fix-typehints
Fix some missing typehints
2 parents bcf6162 + c2ed202 commit 671aed1

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

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/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

src/Backup/Source/Pgdump.php

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

src/Backup/Source/SimulatorExecutable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function simulate(Target $target, Result $result) : Status
3535
/**
3636
* Create backup status.
3737
*
38-
* @param \phpbu\App\Backup\Target
38+
* @param \phpbu\App\Backup\Target $target
3939
* @return \phpbu\App\Backup\Source\Status
4040
*/
4141
abstract protected function createStatus(Target $target) : Status;

src/Backup/Source/Status.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function uncompressedFile($path)
5151
}
5252

5353
/**
54-
* @param $path
54+
* @param string $path
5555
* @return \phpbu\App\Backup\Source\Status
5656
*/
5757
public function uncompressedDirectory($path)

src/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function getFilename() : string
115115
/**
116116
* Bootstrap setter.
117117
*
118-
* @param $file
118+
* @param string $file
119119
*/
120120
public function setBootstrap(string $file)
121121
{

src/Runner.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function getFactory()
4747
* Run phpbu
4848
*
4949
* @param \phpbu\App\Configuration $configuration
50-
* @param \phpbu\App\Factory
5150
* @return \phpbu\App\Result
5251
* @throws \phpbu\App\Exception
5352
*/

src/Util/Path.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class Path
1818
* Date placeholder replacement.
1919
* Replaces %{somevalue} with date({somevalue}).
2020
*
21-
* @param string $string
22-
* @param mixed <integer|null> $time
21+
* @param string $string
22+
* @param integer|null $time
2323
* @return string
2424
*/
2525
public static function replaceDatePlaceholders(string $string, $time = null) : string

0 commit comments

Comments
 (0)