Skip to content

Commit b087a37

Browse files
committed
Rename: 'isIdenticalTo' => 'isSameAs', 'isNotIdenticalTo' => 'isNotSameAs'
1 parent 3f7fd14 commit b087a37

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Ensurance.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ public function isNotEqualTo($value): Ensurance
234234
*
235235
* @return Ensurance
236236
*/
237-
public function isIdenticalTo($value): Ensurance
237+
public function isSameAs($value): Ensurance
238238
{
239-
$this->enforce($this->value === $value)->orThrow('"%s" is not identical to "%s"', $this->value, $value);
239+
$this->enforce($this->value === $value)->orThrow('"%s" is not the same as "%s"', $this->value, $value);
240240

241241
return $this;
242242
}
@@ -246,9 +246,9 @@ public function isIdenticalTo($value): Ensurance
246246
*
247247
* @return Ensurance
248248
*/
249-
public function isNotIdenticalTo($value): Ensurance
249+
public function isNotSameAs($value): Ensurance
250250
{
251-
$this->enforce($this->value !== $value)->orThrow('"%s" is identical to "%s"', $this->value, $value);
251+
$this->enforce($this->value !== $value)->orThrow('"%s" is the same as "%s"', $this->value, $value);
252252

253253
return $this;
254254
}

tests/EnsuranceTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ public function testIsNotEqual()
3737
ensure('42')->isNotEqualTo(4.2);
3838
}
3939

40-
public function testIsIdentical()
40+
public function testIsSame()
4141
{
42-
ensure('foo')->isIdenticalTo('foo');
43-
ensure(42)->isIdenticalTo(2 * 21);
42+
ensure('foo')->isSameAs('foo');
43+
ensure(42)->isSameAs(2 * 21);
4444
}
4545

46-
public function testIsNotIdentical()
46+
public function testIsNotSame()
4747
{
48-
ensure('foo')->isNotIdenticalTo('bar');
49-
ensure('foo')->isNotIdenticalTo(42);
48+
ensure('foo')->isNotSameAs('bar');
49+
ensure('foo')->isNotSameAs(42);
5050
}
5151

5252
public function testIsResource()

0 commit comments

Comments
 (0)