Skip to content

Commit 380fb23

Browse files
authored
Merge pull request #1482 from jakzal/merge-7.5-to-main
Merge 7.5 to main
2 parents 99215f6 + b456819 commit 380fb23

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build
22

33
on:
44
push:
5-
branches: [main, next, master, 2.5, 3.4, 4.3, 5.1, 6.3]
5+
branches: [main, next, master, 2.5, 3.4, 4.3, 5.1, 6.3, 7.5]
66
pull_request:
77
release:
88
types: [created]

src/PhpSpec/Console/ConsoleIO.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ public function getLastWrittenMessage(): string
7979
return $this->lastMessage;
8080
}
8181

82-
public function writeln(string $message = '', int $indent = null): void
82+
public function writeln(string $message = '', ?int $indent = null): void
8383
{
8484
$this->write($message, $indent, true);
8585
}
8686

87-
public function writeTemp(string $message, int $indent = null): void
87+
public function writeTemp(string $message, ?int $indent = null): void
8888
{
8989
$this->write($message, $indent);
9090
$this->hasTempString = true;
@@ -107,7 +107,7 @@ public function freezeTemp(): void
107107
$this->write($this->lastMessage);
108108
}
109109

110-
public function write(string $message, int $indent = null, bool $newline = false): void
110+
public function write(string $message, ?int $indent = null, bool $newline = false): void
111111
{
112112
if ($this->hasTempString) {
113113
$this->hasTempString = false;
@@ -124,12 +124,12 @@ public function write(string $message, int $indent = null, bool $newline = false
124124
$this->lastMessage = $message.($newline ? "\n" : '');
125125
}
126126

127-
public function overwriteln(string $message = '', int $indent = null): void
127+
public function overwriteln(string $message = '', ?int $indent = null): void
128128
{
129129
$this->overwrite($message, $indent, true);
130130
}
131131

132-
public function overwrite(string $message, int $indent = null, bool $newline = false): void
132+
public function overwrite(string $message, ?int $indent = null, bool $newline = false): void
133133
{
134134
if (null !== $indent) {
135135
$message = $this->indentText($message, $indent);

src/PhpSpec/Exception/Fracture/CollaboratorNotFoundException.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class CollaboratorNotFoundException extends FractureException
2525
public function __construct(
2626
string $message,
2727
int $code = 0,
28-
Exception $previous = null,
29-
ReflectionParameter $reflectionParameter = null,
30-
string $className = null
28+
?Exception $previous = null,
29+
?ReflectionParameter $reflectionParameter = null,
30+
?string $className = null
3131
) {
3232
if ($reflectionParameter) {
3333
$this->collaboratorName = $this->extractCollaboratorName($reflectionParameter);

src/PhpSpec/Formatter/Html/HtmlIO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function isVerbose(): bool
2727
return true;
2828
}
2929

30-
public function writeln(string $message = '', int $indent = null): void
30+
public function writeln(string $message = '', ?int $indent = null): void
3131
{
3232
echo $message . "<br>";
3333
}

src/PhpSpec/Formatter/TapFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function afterSuite(SuiteEvent $event) : void
110110
* Format message as two-space indented YAML when needed outside of a
111111
* SKIP or TODO directive.
112112
*/
113-
private function getResultData(ExampleEvent $event, int $result = null): string
113+
private function getResultData(ExampleEvent $event, ?int $result = null): string
114114
{
115115
if (null === $result) {
116116
return $this->stripNewlines($event->getException()->getMessage());

src/PhpSpec/IO/IO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ interface IO
1717
{
1818
public function write(string $message): void;
1919
public function isVerbose(): bool;
20-
public function writeln(string $message = '', int $indent = null): void;
20+
public function writeln(string $message = '', ?int $indent = null): void;
2121
}

src/PhpSpec/Loader/ResourceLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(
3535
) {
3636
}
3737

38-
public function load(string $locator = '', int $line = null): Suite
38+
public function load(string $locator = '', ?int $line = null): Suite
3939
{
4040
$suite = new Suite();
4141
foreach ($this->manager->locateResources($locator) as $resource) {

src/PhpSpec/Runner/Maintainer/CollaboratorsMaintainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private function getOrCreateCollaborator(CollaboratorManager $collaborators, str
126126
/**
127127
* @throws CollaboratorNotFoundException
128128
*/
129-
private function throwCollaboratorNotFound(\Exception $e, \ReflectionParameter $parameter = null, string $className = null): void
129+
private function throwCollaboratorNotFound(\Exception $e, ?\ReflectionParameter $parameter = null, ?string $className = null): void
130130
{
131131
throw new CollaboratorNotFoundException(
132132
'Collaborator does not exist',

0 commit comments

Comments
 (0)