Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Atry committed Jun 6, 2022
1 parent 0d5e7d5 commit 2f4a563
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Constraint/IsType.hack
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Facebook\FBExpect\Constraint;

use function Facebook\FBExpect\is_iterable;

class IsType {
final class IsType {
const type TPredicate = (function(mixed): bool);
public function __construct(private string $expectedType) {}

Expand Down
2 changes: 1 addition & 1 deletion src/Constraint/TraversableContains.hack
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Facebook\FBExpect\Constraint;

class TraversableContains {
final class TraversableContains {

public function __construct(private mixed $value) {}

Expand Down
2 changes: 1 addition & 1 deletion src/ExpectObj.hack
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use namespace HH\Lib\{C, Str, Vec};
use type HH\Lib\Ref;
use type Facebook\HackTest\ExpectationFailedException;

class ExpectObj<T> extends Assert {
final class ExpectObj<T> extends Assert {
public function __construct(private T $var) {}

/**************************************
Expand Down
5 changes: 2 additions & 3 deletions tests/ExpectObjTest.hack
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ final class ExpectObjTest extends HackTest {
expect('haystack')->toNotMatchRegExp('/needle/');

// sorting
expect(vec[1, 2, 3])->toBeSortedBy(function(int $prev, int $curr): bool {
expect(vec[1, 2, 3])->toBeSortedBy((int $prev, int $curr): bool ==> {
if ($prev <= $curr) {
return true;
}
Expand Down Expand Up @@ -218,7 +218,6 @@ final class ExpectObjTest extends HackTest {
} else {
expect(() ==> $rm->invokeArgs($obj, vec[$expected, 'custom msg']))
->toThrow(ExpectationFailedException::class, 'custom msg');
;
}

// And with funky sprintfification
Expand Down Expand Up @@ -248,7 +247,7 @@ final class ExpectObjTest extends HackTest {
//
public function testToThrowWithMessage(): void {
expect(
function() {
() ==> {
expect(
() ==> {
throw new ExpectObjTestException('test 2');
Expand Down

0 comments on commit 2f4a563

Please sign in to comment.