Skip to content

Commit

Permalink
Enhancement: Extract FieldDefinition\Reference
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Apr 2, 2020
1 parent aea1cbb commit 047c75b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on: # yamllint disable-line rule:truthy
- "master"

env:
MIN_COVERED_MSI: 98
MIN_MSI: 96
MIN_COVERED_MSI: 99
MIN_MSI: 97
REQUIRED_PHP_EXTENSIONS: "mbstring"

jobs:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For a full diff see [`fa9c564...master`][fa9c564...master].
* Started throwing an `Exception\ClassNotFound` exception instead of a generic `Exception` when a class was not found ([#125]), by [@localheinz]
* Added `@template` annotations to assist with static code analysis ([#128]), by [@localheinz]
* Removed the fluent interface from `FixtureFactory::defineEntity()` ([#131]), by [@localheinz]
* Extracted `FieldDefinition\Reference` ([#157]), by [@localheinz]

### Fixed

Expand Down Expand Up @@ -82,5 +83,6 @@ For a full diff see [`fa9c564...master`][fa9c564...master].
[#133]: https://github.com/ergebnis/factory-bot/pull/133
[#149]: https://github.com/ergebnis/factory-bot/pull/149
[#155]: https://github.com/ergebnis/factory-bot/pull/155
[#157]: https://github.com/ergebnis/factory-bot/pull/157

[@localheinz]: https://github.com/localheinz
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MIN_COVERED_MSI:=98
MIN_MSI:=96
MIN_COVERED_MSI:=99
MIN_MSI:=97

.PHONY: it
it: coding-standards static-code-analysis tests ## Runs the coding-standards, static-code-analysis, and tests targets
Expand Down
3 changes: 0 additions & 3 deletions src/FieldDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

namespace Ergebnis\FactoryBot;

/**
* Contains static methods to define fields as sequences, references etc.
*/
final class FieldDefinition implements FieldDefinition\Resolvable
{
private $closure;
Expand Down
1 change: 1 addition & 0 deletions test/Integration/FixtureFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*
* @uses \Ergebnis\FactoryBot\EntityDefinition
* @uses \Ergebnis\FactoryBot\FieldDefinition
* @uses \Ergebnis\FactoryBot\FieldDefinition\Reference
*/
final class FixtureFactoryTest extends AbstractTestCase
{
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/FieldDefinition/ReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*
* @covers \Ergebnis\FactoryBot\FieldDefinition\Reference
*
* @uses \Ergebnis\FactoryBot\EntityDefinition
* @uses \Ergebnis\FactoryBot\FieldDefinition
* @uses \Ergebnis\FactoryBot\FixtureFactory
*/
final class ReferenceTest extends AbstractTestCase
Expand Down
1 change: 1 addition & 0 deletions test/Unit/FieldDefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*
* @uses \Ergebnis\FactoryBot\EntityDefinition
* @uses \Ergebnis\FactoryBot\Exception\InvalidCount
* @uses \Ergebnis\FactoryBot\FieldDefinition\Reference
* @uses \Ergebnis\FactoryBot\FixtureFactory
*/
final class FieldDefinitionTest extends AbstractTestCase
Expand Down
3 changes: 2 additions & 1 deletion test/Unit/FixtureFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
* @covers \Ergebnis\FactoryBot\FixtureFactory
*
* @uses \Ergebnis\FactoryBot\EntityDefinition
* @uses \Ergebnis\FactoryBot\FieldDefinition
* @uses \Ergebnis\FactoryBot\Exception\ClassMetadataNotFound
* @uses \Ergebnis\FactoryBot\Exception\ClassNotFound
* @uses \Ergebnis\FactoryBot\Exception\EntityDefinitionAlreadyRegistered
* @uses \Ergebnis\FactoryBot\Exception\EntityDefinitionNotRegistered
* @uses \Ergebnis\FactoryBot\Exception\InvalidCount
* @uses \Ergebnis\FactoryBot\Exception\InvalidFieldNames
* @uses \Ergebnis\FactoryBot\FieldDefinition
* @uses \Ergebnis\FactoryBot\FieldDefinition\Reference
*/
final class FixtureFactoryTest extends AbstractTestCase
{
Expand Down

0 comments on commit 047c75b

Please sign in to comment.