This repository was archived by the owner on Aug 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +11
-12
lines changed
Expand file tree Collapse file tree 9 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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(
Original file line number Diff line number Diff line change 1010
1111namespace Facebook\HackCodegen ;
1212
13- class DormField {
13+ final class DormField {
1414 private bool $optional = false ;
1515 private bool $manual = false ;
1616
Original file line number Diff line number Diff line change 66 * To re-generate this file run codegen.php DormUserSchema
77 *
88 *
9- * @partially-generated SignedSource<<cfcc245af5ac1dc449999b80c6e0ecef >>
9+ * @partially-generated SignedSource<<9a620c7d596d01640d6d302a4bdfae46 >>
1010 */
1111
1212final 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' ,
Original file line number Diff line number Diff line change 1010
1111namespace 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' ),
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ enum CodegenFileResult: int {
1717 UPDATE = 1 ;
1818 CREATE = 2 ;
1919}
20- ;
2120
2221enum CodegenFileType : int {
2322 PHP = 0 ;
Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff line change 99
1010namespace 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 }
You can’t perform that action at this time.
0 commit comments