Skip to content

Commit 78b36e2

Browse files
Add type definitions
1 parent 32a392f commit 78b36e2

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/Command/Add/AddFiles.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,42 @@ class AddFiles extends Base
2828
*
2929
* @var string
3030
*/
31-
private $dryRun = '';
31+
private string $dryRun = '';
3232

3333
/**
3434
* Update.
3535
*
3636
* @var string
3737
*/
38-
private $update = '';
38+
private string $update = '';
3939

4040
/**
4141
* All.
4242
*
4343
* @var string
4444
*/
45-
private $all = '';
45+
private string $all = '';
4646

4747
/**
4848
* No all.
4949
*
5050
* @var string
5151
*/
52-
private $noAll = '';
52+
private string $noAll = '';
5353

5454
/**
5555
* Intent to add.
5656
*
5757
* @var string
5858
*/
59-
private $intentToAdd = '';
59+
private string $intentToAdd = '';
6060

6161
/**
6262
* Files to add content from to the index.
6363
*
6464
* @var string[]
6565
*/
66-
private $files = [];
66+
private array $files = [];
6767

6868
/**
6969
* Set dry run.

src/Command/Apply/ApplyPatch.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@ class ApplyPatch extends Base
2828
*
2929
* @var string[]
3030
*/
31-
private $patchFiles = [];
31+
private array $patchFiles = [];
3232

3333
/**
3434
* Action to take when encountering whitespace.
3535
*
3636
* @var string
3737
*/
38-
private $whitespace = ' --whitespace=\'warn\'';
38+
private string $whitespace = ' --whitespace=\'warn\'';
3939

4040
/**
4141
* Number of leading path components to remove from the diff paths.
4242
*
4343
* @var string
4444
*/
45-
private $pathComponents = ' -p1';
45+
private string $pathComponents = ' -p1';
4646

4747
/**
4848
* Ignore changes in whitespace in context lines.
4949
*
5050
* @var string
5151
*/
52-
private $ignoreSpaceChange = '';
52+
private string $ignoreSpaceChange = '';
5353

5454
/**
5555
* Patch files to apply.

src/Command/Checkout/RestoreWorkingTree.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class RestoreWorkingTree extends Base
2828
*
2929
* @var array<string>
3030
*/
31-
private $files = ['.'];
31+
private array $files = ['.'];
3232

3333
/**
3434
* Skip the checkout hooks?
3535
*
3636
* @var bool
3737
*/
38-
private $noMoreHooks = false;
38+
private bool $noMoreHooks = false;
3939

4040
/**
4141
* Do not trigger git hooks while restoring

src/Command/CloneCmd/CloneCmd.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ final class CloneCmd extends Base
3030
/**
3131
* @var Url
3232
*/
33-
private $url;
33+
private Url $url;
3434

3535
/**
3636
* @var string
3737
*/
38-
private $dir = '';
38+
private string $dir = '';
3939

4040
/**
4141
* @var string
4242
*/
43-
private $depth = '';
43+
private string $depth = '';
4444

4545
public function __construct(Url $url)
4646
{

src/Command/Config/Get.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Get extends Base
2828
*
2929
* @var string
3030
*/
31-
private $name;
31+
private string $name;
3232

3333
/**
3434
* The name of the configuration key to get.

0 commit comments

Comments
 (0)