Skip to content

Commit 472979e

Browse files
authored
Merge pull request #118 from aternosorg/not-nullable-matches
Make members for matches not-nullable
2 parents 2c98530 + 95165aa commit 472979e

19 files changed

+53
-52
lines changed

src/Analysis/Problem/Bukkit/AmbiguousPluginNameProblem.php

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

99
class AmbiguousPluginNameProblem extends PluginProblem
1010
{
11-
protected ?string $firstPluginPath = null;
12-
protected ?string $secondPluginPath = null;
11+
protected string $firstPluginPath;
12+
protected string $secondPluginPath;
1313

1414
/**
1515
* @inheritDoc

src/Analysis/Problem/Bukkit/PluginCommandExceptionProblem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class PluginCommandExceptionProblem extends PluginProblem
1111
{
12-
protected ?string $command = null;
12+
protected string $command;
1313

1414
/**
1515
* @inheritDoc

src/Analysis/Problem/Bukkit/PluginDependencyProblem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class PluginDependencyProblem extends PluginFileProblem
1010
{
11-
protected ?string $dependencyPluginName = null;
11+
protected string $dependencyPluginName;
1212

1313
/**
1414
* @return string|null

src/Analysis/Problem/Bukkit/PluginFileProblem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
*/
1919
abstract class PluginFileProblem extends PluginProblem
2020
{
21-
protected ?string $pluginFilePath = null;
21+
protected string $pluginFilePath;
2222

2323
/**
24-
* @return string|null
24+
* @return string
2525
*/
26-
public function getPluginFilePath(): ?string
26+
public function getPluginFilePath(): string
2727
{
2828
return $this->pluginFilePath;
2929
}

src/Analysis/Problem/Bukkit/PluginProblem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
*/
2121
abstract class PluginProblem extends BukkitProblem
2222
{
23-
protected ?string $pluginName = null;
23+
protected string $pluginName;
2424

2525
/**
26-
* @return string|null
26+
* @return string
2727
*/
28-
public function getPluginName(): ?string
28+
public function getPluginName(): string
2929
{
3030
return $this->pluginName;
3131
}

src/Analysis/Problem/Bukkit/UnsupportedApiVersionProblem.php

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

88
class UnsupportedApiVersionProblem extends PluginFileProblem
99
{
10-
protected ?string $apiVersion = null;
10+
protected string $apiVersion;
1111

1212
/**
13-
* @return string|null
13+
* @return string
1414
*/
15-
public function getApiVersion(): ?string
15+
public function getApiVersion(): string
1616
{
1717
return $this->apiVersion;
1818
}

src/Analysis/Problem/Bukkit/WorldDuplicateProblem.php

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

88
class WorldDuplicateProblem extends BukkitProblem
99
{
10-
protected ?string $worldName = null;
10+
protected string $worldName;
1111

1212
/**
13-
* @return string|null
13+
* @return string
1414
*/
15-
public function getWorldName(): ?string
15+
public function getWorldName(): string
1616
{
1717
return $this->worldName;
1818
}

src/Analysis/Problem/Fabric/FabricIncompatibleModsProblem.php

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

88
class FabricIncompatibleModsProblem extends FabricModProblem
99
{
10-
protected ?string $secondModName = null;
10+
protected string $secondModName;
1111

1212
/**
1313
* @inheritDoc
@@ -21,9 +21,9 @@ public function getMessage(): string
2121
}
2222

2323
/**
24-
* @return string|null
24+
* @return string
2525
*/
26-
public function getSecondModName(): ?string
26+
public function getSecondModName(): string
2727
{
2828
return $this->secondModName;
2929
}

src/Analysis/Problem/Fabric/FabricModProblem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ abstract class FabricModProblem extends FabricProblem
1111
protected static string $modNamePattern = "(?:'([^\']+)' \((?:[^\)]+)\)|([\w-]+))";
1212
protected static string $modIDPattern = "([^ ,]+)";
1313

14-
protected ?string $modName = null;
14+
protected string $modName;
1515

1616
/**
17-
* @return string|null
17+
* @return string
1818
*/
19-
public function getModName(): ?string
19+
public function getModName(): string
2020
{
2121
return $this->modName;
2222
}

src/Analysis/Problem/Forge/ModDuplicateProblem.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
class ModDuplicateProblem extends ModProblem
1111
{
12-
protected ?string $firstModPath = null;
13-
protected ?string $secondModPath = null;
12+
protected string $firstModPath;
13+
protected string $secondModPath;
1414

1515
/**
1616
* @inheritDoc
@@ -67,17 +67,17 @@ public function isEqual(InsightInterface $insight): bool
6767
}
6868

6969
/**
70-
* @return string|null
70+
* @return string
7171
*/
72-
public function getFirstModPath(): ?string
72+
public function getFirstModPath(): string
7373
{
7474
return $this->firstModPath;
7575
}
7676

7777
/**
78-
* @return string|null
78+
* @return string
7979
*/
80-
public function getSecondModPath(): ?string
80+
public function getSecondModPath(): string
8181
{
8282
return $this->secondModPath;
8383
}

0 commit comments

Comments
 (0)