Skip to content

Commit

Permalink
Renamed Setup static constructor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
shudd3r committed Dec 13, 2019
1 parent 38fa69f commit a368abb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@ public function __construct(Build $build = null)
*
* @return static
*/
public static function basic(array $records = [], array $containers = []): self
public static function production(array $records = [], array $containers = []): self
{
return new self(new Setup\Build($records, $containers));
}

/**
* Creates Setup with additional identifier collision checks, and
* Container created with such Setup will also detect circular
* references and add call stack paths to thrown exceptions.
*
* @param Records\Record[] $records
* @param ContainerInterface[] $containers
*
* @return static
*/
public static function validated(array $records = [], array $containers = []): self
public static function development(array $records = [], array $containers = []): self
{
return new self(new Setup\Build\ValidatedBuild($records, $containers));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/SetupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class SetupTest extends TestCase
public function testInstantiation()
{
$this->assertInstanceOf(Setup::class, $this->builder());
$this->assertInstanceOf(Setup::class, Setup::basic());
$this->assertInstanceOf(Setup::class, Setup::validated());
$this->assertInstanceOf(Setup::class, Setup::production());
$this->assertInstanceOf(Setup::class, Setup::development());
}

public function testSetup_container_ReturnsContainerFromBuild()
Expand Down

0 comments on commit a368abb

Please sign in to comment.