Skip to content

Commit 03c4ea6

Browse files
Add type info
1 parent df09ebd commit 03c4ea6

File tree

12 files changed

+27
-27
lines changed

12 files changed

+27
-27
lines changed

src/Runner/Hook.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class Hook extends RepositoryAware
4545
*
4646
* @var string
4747
*/
48-
protected $hook;
48+
protected string $hook;
4949

5050
/**
5151
* Set to `true` to skip processing this hook's actions
@@ -112,7 +112,7 @@ public function beforeHook(): void
112112
}
113113

114114
/**
115-
* Execute stuff before every actions
115+
* Execute stuff before every action
116116
*
117117
* @param Config\Action $action
118118
* @return void
@@ -123,7 +123,7 @@ public function beforeAction(Config\Action $action): void
123123
}
124124

125125
/**
126-
* Execute stuff after every actions
126+
* Execute stuff after every action
127127
*
128128
* @param Config\Action $action
129129
* @return void

src/Runner/Hook/CommitMsg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CommitMsg extends Hook
3030
*
3131
* @var string
3232
*/
33-
protected $hook = Hooks::COMMIT_MSG;
33+
protected string $hook = Hooks::COMMIT_MSG;
3434

3535
/**
3636
* Read the commit message from file

src/Runner/Hook/PostCheckout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ class PostCheckout extends Hook
2929
*
3030
* @var string
3131
*/
32-
protected $hook = Hooks::POST_CHECKOUT;
32+
protected string $hook = Hooks::POST_CHECKOUT;
3333
}

src/Runner/Hook/PostCommit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ class PostCommit extends Hook
2929
*
3030
* @var string
3131
*/
32-
protected $hook = Hooks::POST_COMMIT;
32+
protected string $hook = Hooks::POST_COMMIT;
3333
}

src/Runner/Hook/PostMerge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ class PostMerge extends Hook
2929
*
3030
* @var string
3131
*/
32-
protected $hook = Hooks::POST_MERGE;
32+
protected string $hook = Hooks::POST_MERGE;
3333
}

src/Runner/Hook/PostRewrite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ class PostRewrite extends Hook
2929
*
3030
* @var string
3131
*/
32-
protected $hook = Hooks::POST_REWRITE;
32+
protected string $hook = Hooks::POST_REWRITE;
3333
}

src/Runner/Hook/PreCommit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ class PreCommit extends Hook
2929
*
3030
* @var string
3131
*/
32-
protected $hook = Hooks::PRE_COMMIT;
32+
protected string $hook = Hooks::PRE_COMMIT;
3333
}

src/Runner/Hook/PrePush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ class PrePush extends Hook
2929
*
3030
* @var string
3131
*/
32-
protected $hook = Hooks::PRE_PUSH;
32+
protected string $hook = Hooks::PRE_PUSH;
3333
}

src/Runner/Hook/PrepareCommitMsg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PrepareCommitMsg extends Hook
3333
*
3434
* @var string
3535
*/
36-
protected $hook = Hooks::PREPARE_COMMIT_MSG;
36+
protected string $hook = Hooks::PREPARE_COMMIT_MSG;
3737

3838
/**
3939
* @var string

tests/unit/Plugin/DummyHookPlugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
class DummyHookPlugin extends Hook\Base
99
{
10-
public static $beforeHookCalled = 0;
11-
public static $beforeActionCalled = 0;
12-
public static $afterActionCalled = 0;
13-
public static $afterHookCalled = 0;
10+
public static int $beforeHookCalled = 0;
11+
public static int $beforeActionCalled = 0;
12+
public static int $afterActionCalled = 0;
13+
public static int $afterHookCalled = 0;
1414

1515
public function beforeHook(RunnerHook $hook): void
1616
{

0 commit comments

Comments
 (0)