Skip to content

Commit 95165aa

Browse files
committed
make members for matches not-nullable
1 parent 497e867 commit 95165aa

20 files changed

+54
-53
lines changed

src/Analysis/Problem/Bukkit/AmbiguousPluginNameProblem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
*/
1414
class AmbiguousPluginNameProblem extends PluginProblem
1515
{
16-
protected ?string $firstPluginPath = null;
17-
protected ?string $secondPluginPath = null;
16+
protected string $firstPluginPath;
17+
protected string $secondPluginPath;
1818

1919
/**
2020
* Get a human-readable message

src/Analysis/Problem/Bukkit/PluginCommandExceptionProblem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class PluginCommandExceptionProblem extends PluginProblem
1616
{
17-
protected ?string $command = null;
17+
protected string $command;
1818

1919
/**
2020
* Get a human-readable message

src/Analysis/Problem/Bukkit/PluginDependencyProblem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
class PluginDependencyProblem extends PluginFileProblem
1515
{
16-
protected ?string $dependencyPluginName = null;
16+
protected string $dependencyPluginName;
1717

1818
/**
1919
* @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
@@ -12,12 +12,12 @@
1212
*/
1313
class WorldDuplicateProblem extends BukkitProblem
1414
{
15-
protected ?string $worldName = null;
15+
protected string $worldName;
1616

1717
/**
18-
* @return string|null
18+
* @return string
1919
*/
20-
public function getWorldName(): ?string
20+
public function getWorldName(): string
2121
{
2222
return $this->worldName;
2323
}

src/Analysis/Problem/CrashReport/TickingEntityProblem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getMessage(): string
3232
{
3333
return Translator::getInstance()->getTranslation("ticking-entity-problem", [
3434
"name" => $this->getName(),
35-
"location" => $this->getLocationX() . ", " . $this->getLocationY() . ", " . $this->getLocationZ()
35+
"location" => sprintf("%s, %s, %s", $this->getLocationX(), $this->getLocationY(), $this->getLocationZ())
3636
]);
3737
}
3838

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
public function getMessage(): string
1313
{
@@ -18,9 +18,9 @@ public function getMessage(): string
1818
}
1919

2020
/**
21-
* @return string|null
21+
* @return string
2222
*/
23-
public function getSecondModName(): ?string
23+
public function getSecondModName(): string
2424
{
2525
return $this->secondModName;
2626
}

src/Analysis/Problem/Fabric/FabricModProblem.php

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

19-
protected ?string $modName = null;
19+
protected string $modName;
2020

2121
/**
22-
* @return string|null
22+
* @return string
2323
*/
24-
public function getModName(): ?string
24+
public function getModName(): string
2525
{
2626
return $this->modName;
2727
}

0 commit comments

Comments
 (0)