Skip to content

Commit 6df2054

Browse files
committed
Fix lint errors
1 parent 4af8c3b commit 6df2054

File tree

9 files changed

+11
-12
lines changed

9 files changed

+11
-12
lines changed

examples/dorm/CodegenDorm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* that will allow to read the data from a database and store it
1818
* in the object.
1919
*/
20-
class CodegenDorm {
20+
final class CodegenDorm {
2121

2222
private ICodegenFactory $codegen;
2323

examples/dorm/CodegenMutator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* For a given DormSchema, this class generates code for a class
1717
* that will allow to insert rows in a database.
1818
*/
19-
class CodegenMutator {
19+
final class CodegenMutator {
2020

2121
private HackCodegenFactory $codegen;
2222

@@ -211,7 +211,7 @@ private function getCheckRequiredFieldsMethod(): CodegenMethod {
211211
->closeStatement()
212212
->addAssignment(
213213
'$missing',
214-
'$required->removeAll($this->data->keys());',
214+
'$required->removeAll($this->data->keys())',
215215
HackBuilderValues::literal(),
216216
)
217217
->addMultilineCall(

examples/dorm/core/DormField.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Facebook\HackCodegen;
1212

13-
class DormField {
13+
final class DormField {
1414
private bool $optional = false;
1515
private bool $manual = false;
1616

examples/dorm/demo/DormUserMutator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* To re-generate this file run codegen.php DormUserSchema
77
*
88
*
9-
* @partially-generated SignedSource<<cfcc245af5ac1dc449999b80c6e0ecef>>
9+
* @partially-generated SignedSource<<9a620c7d596d01640d6d302a4bdfae46>>
1010
*/
1111

1212
final class DormUserMutator {
@@ -59,7 +59,7 @@ public function checkRequiredFields(): void {
5959
'last_name',
6060
'is_active',
6161
};
62-
$missing = $required->removeAll($this->data->keys());;
62+
$missing = $required->removeAll($this->data->keys());
6363
invariant(
6464
$missing->isEmpty(),
6565
'The following required fields are missing: %s',

examples/dorm/demo/DormUserSchema.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Facebook\HackCodegen;
1212

13-
class DormUserSchema implements DormSchema {
13+
final class DormUserSchema implements DormSchema {
1414
public function getFields(): Map<string, DormField> {
1515
return Map {
1616
'FirstName' => string_field('first_name'),

src/CodegenFile.hack

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ enum CodegenFileResult: int {
1717
UPDATE = 1;
1818
CREATE = 2;
1919
}
20-
;
2120

2221
enum CodegenFileType: int {
2322
PHP = 0;

src/_Private/StrBuffer.hack

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Facebook\HackCodegen\_Private;
1313
*
1414
* The string can be retrived once via the `detach()` method.
1515
*/
16-
class StrBuffer {
16+
final class StrBuffer {
1717

1818
private string $str = '';
1919
private bool $detached = false;

src/key-value-render/HackBuilderNativeValueCollectionRenderer.hack

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ use type Facebook\HackCodegen\{
1616
IHackCodegenConfig,
1717
};
1818

19-
class HackBuilderNativeValueCollectionRenderer<Tv, T as Traversable<Tv>>
19+
final class HackBuilderNativeValueCollectionRenderer<Tv, T as Traversable<Tv>>
2020
implements IHackBuilderValueRenderer<T> {
2121
public function __construct(
2222
private ContainerType $container,
2323
private IHackBuilderValueRenderer<Tv> $valueRenderer,
2424
) {
2525
}
2626

27-
final public function render(IHackCodegenConfig $config, T $values): string {
27+
public function render(IHackCodegenConfig $config, T $values): string {
2828
$value_renderer = $this->valueRenderer;
2929
$builder = (new HackBuilder($config))->openContainer($this->container);
3030
foreach ($values as $value) {

tests/TestLib/OnExit.hack

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Facebook\HackCodegen;
1111

12-
class OnExit implements \IDisposable {
12+
final class OnExit implements \IDisposable {
1313
const type TCallback = (function():void);
1414
public function __construct(private self::TCallback $cb) {
1515
}

0 commit comments

Comments
 (0)