Skip to content

Commit fcd8e17

Browse files
committed
Rename create() method
1 parent eb7fc82 commit fcd8e17

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Builder/EnumBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class EnumBuilder extends TypeBuilder
1212
/** @var mixed[][] */
1313
private $values = [];
1414

15-
public static function createFromName(string $name) : self
15+
public static function create(string $name) : self
1616
{
1717
return new static($name);
1818
}

tests/Builder/EnumBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
final class EnumBuilderTest extends TestCase
1212
{
13-
public function testCreateFromName() : void
13+
public function testCreate() : void
1414
{
1515
$name = 'SomeEnum';
1616

17-
$builder = EnumBuilder::createFromName($name);
17+
$builder = EnumBuilder::create($name);
1818
$object = $builder
1919
->addValue('Value1', 'EnumName')
2020
->addValue('Value2', null, 'Value 2 Description')
@@ -37,6 +37,6 @@ public function testInvalidValue() : void
3737
{
3838
$this->expectException(LogicException::class);
3939

40-
EnumBuilder::createFromName('Enum')->addValue('invalid-value');
40+
EnumBuilder::create('Enum')->addValue('invalid-value');
4141
}
4242
}

tests/Builder/FieldBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
final class FieldBuilderTest extends TestCase
1212
{
13-
public function testCreateFromName() : void
13+
public function testCreate() : void
1414
{
1515
$field = FieldBuilder::create('SomeField', Type::string())
1616
->setDeprecationReason('Deprecated')

tests/Builder/ObjectBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
final class ObjectBuilderTest extends TestCase
1515
{
16-
public function testCreateFromName() : void
16+
public function testCreate() : void
1717
{
1818
$description = 'To the sichuan-style nachos add ghee, noodles, buttermilk and heated herring.';
1919
$name = 'SomeType';

0 commit comments

Comments
 (0)