Skip to content

Commit dd820b6

Browse files
committed
wip
1 parent 8c3ac6a commit dd820b6

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

mago.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ excludes = [
1313
"**/*.stub.php",
1414
"**/*.input.php",
1515
"**/*.expected.php",
16+
"packages/testing/tests/ProviderTest.php",
1617
]
1718

1819
[formatter]

packages/testing/src/Testers/Tester.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function isNot(mixed $expected): self
7878

7979
public function isEqualTo(mixed $expected): self
8080
{
81-
if ($expected != $this->subject) {
81+
if ($expected != $this->subject) { // @mago-expect lint:identity-comparison
8282
throw new TestHasFailed('failed asserting that %s is equal to %s', $this->subject, $expected);
8383
}
8484

@@ -87,7 +87,7 @@ public function isEqualTo(mixed $expected): self
8787

8888
public function isNotEqualTo(mixed $expected): self
8989
{
90-
if ($expected == $this->subject) {
90+
if ($expected == $this->subject) { // @mago-expect lint:identity-comparison
9191
throw new TestHasFailed('failed asserting that %s is not equal to %s', $this->subject, $expected);
9292
}
9393

@@ -162,7 +162,7 @@ public function contains(mixed $search): self
162162
throw new TestHasFailed('failed asserting that %s contains %s', $this->subject, $search);
163163
}
164164

165-
if (is_array($this->subject) && ! in_array($search, $this->subject)) {
165+
if (is_array($this->subject) && ! in_array($search, $this->subject, strict: true)) {
166166
throw new TestHasFailed('failed asserting that %s contains %s', $this->subject, $search);
167167
}
168168

@@ -179,7 +179,7 @@ public function containsNot(mixed $search): self
179179
throw new TestHasFailed('failed asserting that %s does not contain %s', $this->subject, $search);
180180
}
181181

182-
if (is_array($this->subject) && in_array($search, $this->subject)) {
182+
if (is_array($this->subject) && in_array($search, $this->subject, strict: true)) {
183183
throw new TestHasFailed('failed asserting that %s does not contain %s', $this->subject, $search);
184184
}
185185

@@ -294,7 +294,7 @@ public function isNotList(): self
294294

295295
public function isEmpty(): self
296296
{
297-
if (! empty($this->subject)) {
297+
if (! empty($this->subject)) { // @mago-expect lint:no-empty
298298
throw new TestHasFailed('failed asserting that %s is empty', $this->subject);
299299
}
300300

@@ -303,7 +303,7 @@ public function isEmpty(): self
303303

304304
public function isNotEmpty(): self
305305
{
306-
if (empty($this->subject)) {
306+
if (empty($this->subject)) { // @mago-expect lint:no-empty
307307
throw new TestHasFailed('failed asserting that %s is not empty', $this->subject);
308308
}
309309

packages/testing/tests/PsrInjectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function psrInjection(Dependency $dependency): void
5555

5656
final class PsrContainer implements ContainerInterface
5757
{
58-
public function get(string $id)
58+
public function get(string $id): Dependency
5959
{
6060
return new Dependency('psr');
6161
}

0 commit comments

Comments
 (0)