Skip to content

Commit 97ffb62

Browse files
committed
Declaring private const types
1 parent 374013d commit 97ffb62

9 files changed

+15
-15
lines changed

src/Changelog/BumpAndCommitChangelogVersion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
interface BumpAndCommitChangelogVersion
1212
{
13-
public const BUMP_MINOR = 'bumpMinorVersion';
14-
public const BUMP_PATCH = 'bumpPatchVersion';
13+
public const string BUMP_MINOR = 'bumpMinorVersion';
14+
public const string BUMP_PATCH = 'bumpPatchVersion';
1515

1616
/**
1717
* @psalm-param self::BUMP_* $bumpType

src/Changelog/BumpAndCommitChangelogVersionViaKeepAChangelog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
class BumpAndCommitChangelogVersionViaKeepAChangelog implements BumpAndCommitChangelogVersion
1919
{
20-
private const CHANGELOG_FILE = 'CHANGELOG.md';
20+
private const string CHANGELOG_FILE = 'CHANGELOG.md';
2121

22-
private const COMMIT_TEMPLATE = <<< 'COMMIT'
22+
private const string COMMIT_TEMPLATE = <<< 'COMMIT'
2323
Bumps changelog version to %s
2424
2525
Updates the %s file to add a changelog entry for a new %s version.

src/Changelog/ChangelogReleaseNotes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/** @psalm-immutable */
1414
class ChangelogReleaseNotes
1515
{
16-
private const CONCATENATION_STRING = "\n\n-----\n\n";
16+
private const string CONCATENATION_STRING = "\n\n-----\n\n";
1717

1818
/** @psalm-param non-empty-string $changelogFile */
1919
public static function writeChangelogFile(string $changelogFile, self $releaseNotes): void

src/Environment/EnvironmentVariables.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/** @psalm-immutable */
1616
class EnvironmentVariables implements Variables
1717
{
18-
private const LOG_LEVELS = [
18+
private const array LOG_LEVELS = [
1919
'100',
2020
'200',
2121
'250',

src/Github/CreateReleaseTextViaKeepAChangelog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class CreateReleaseTextViaKeepAChangelog implements CreateReleaseText
2727
{
2828
/** @psalm-var non-empty-list<string> */
29-
private const DEFAULT_SECTIONS = [
29+
private const array DEFAULT_SECTIONS = [
3030
'Added',
3131
'Changed',
3232
'Deprecated',

test/unit/Changelog/BumpAndCommitChangelogVersionViaKeepAChangelogTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ private function createMockChangelog(): string
209209
return $changelogFile;
210210
}
211211

212-
private const CHANGELOG_STUB = <<< 'CHANGELOG'
212+
private const string CHANGELOG_STUB = <<< 'CHANGELOG'
213213
# Changelog
214214
215215
All notable changes to this project will be documented in this file, in reverse chronological order by release.

test/unit/Changelog/ChangelogReleaseNotesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function testMergedInstanceContainsChangelogEntryFromTheInstanceThatHadOn
161161
$this->assertEquals($expectedEntry, $reflectionProperty->getValue($merged));
162162
}
163163

164-
private const CHANGELOG_ENTRY = <<< 'ENTRY'
164+
private const string CHANGELOG_ENTRY = <<< 'ENTRY'
165165
## 1.0.1 - %s
166166
167167
### Added
@@ -186,7 +186,7 @@ public function testMergedInstanceContainsChangelogEntryFromTheInstanceThatHadOn
186186

187187
ENTRY;
188188

189-
private const CHANGELOG_STUB = <<< 'CHANGELOG'
189+
private const string CHANGELOG_STUB = <<< 'CHANGELOG'
190190
# Changelog
191191
192192
All notable changes to this project will be documented in this file, in reverse chronological order by release.

test/unit/Changelog/ReleaseChangelogViaKeepAChangelogTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
271271
return $repo;
272272
}
273273

274-
private const INVALID_CHANGELOG = <<< 'END'
274+
private const string INVALID_CHANGELOG = <<< 'END'
275275
# NOT A CHANGELOG
276276
277277
This file is not a changelog.
@@ -282,7 +282,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
282282

283283
END;
284284

285-
private const READY_CHANGELOG = <<< 'END'
285+
private const string READY_CHANGELOG = <<< 'END'
286286
# Changelog
287287
288288
All notable changes to this project will be documented in this file, in reverse chronological order by release.

test/unit/Github/CreateReleaseTextViaKeepAChangelogTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
209209
return $repo;
210210
}
211211

212-
private const INVALID_CHANGELOG = <<< 'END'
212+
private const string INVALID_CHANGELOG = <<< 'END'
213213
# NOT A CHANGELOG
214214
215215
This file is not a changelog.
@@ -220,7 +220,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
220220

221221
END;
222222

223-
private const READY_CHANGELOG = <<< 'END'
223+
private const string READY_CHANGELOG = <<< 'END'
224224
# Changelog
225225
226226
All notable changes to this project will be documented in this file, in reverse chronological order by release.
@@ -271,7 +271,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
271271

272272
END;
273273

274-
private const CHANGELOG_MULTI_SECTION = <<< 'END'
274+
private const string CHANGELOG_MULTI_SECTION = <<< 'END'
275275
# Changelog
276276
277277
All notable changes to this project will be documented in this file, in reverse chronological order by release.

0 commit comments

Comments
 (0)