Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/book/v6/tutorials/create-book-module-via-dot-maker.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ We create separate `Input` files to demonstrate their reusability and obtain a c
> Note that `dot-maker` will not generate inputs in the constructor, so the following are to be added by hand **if** going for this approach.

```php
$nameInput = new Input();
$nameInput = new Input('name');
$nameInput->setRequired(true);

$nameInput->getFilterChain()
Expand All @@ -337,9 +337,9 @@ $nameInput->getValidatorChain()
'message' => Message::VALIDATOR_REQUIRED_FIELD,
], true);

$this->add($nameInput, 'name');
$this->add($nameInput);

$authorInput = new Input();
$authorInput = new Input('author');
$authorInput->setRequired(true);

$authorInput->getFilterChain()
Expand All @@ -351,9 +351,9 @@ $authorInput->getValidatorChain()
'message' => Message::VALIDATOR_REQUIRED_FIELD,
], true);

$this->add($authorInput, 'author');
$this->add($authorInput);

$releaseDateInput = new Input();
$releaseDateInput = new Input('releaseDate');
$releaseDateInput->setRequired(true);

$releaseDateInput->getFilterChain()
Expand All @@ -365,7 +365,7 @@ $releaseDateInput->getValidatorChain()
'message' => Message::VALIDATOR_REQUIRED_FIELD,
], true);

$this->add($releaseDateInput, 'releaseDate');
$this->add($releaseDateInput);
```

## Migrations
Expand Down
12 changes: 6 additions & 6 deletions docs/book/v6/tutorials/create-book-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class CreateBookInputFilter extends AbstractInputFilter
We create separate `Input` files to demonstrate their reusability and obtain a clean `CreateBookInputFilter` but you could have all the inputs created directly in the `CreateBookInputFilter` like this:

```php
$nameInput = new Input();
$nameInput = new Input('name');
$nameInput->setRequired(true);

$nameInput->getFilterChain()
Expand All @@ -442,9 +442,9 @@ $nameInput->getValidatorChain()
'message' => Message::VALIDATOR_REQUIRED_FIELD,
], true);

$this->add($nameInput, 'name');
$this->add($nameInput);

$authorInput = new Input();
$authorInput = new Input('author');
$authorInput->setRequired(true);

$authorInput->getFilterChain()
Expand All @@ -456,9 +456,9 @@ $authorInput->getValidatorChain()
'message' => Message::VALIDATOR_REQUIRED_FIELD,
], true);

$this->add($authorInput, 'author');
$this->add($authorInput);

$releaseDateInput = new Input();
$releaseDateInput = new Input('releaseDate');
$releaseDateInput->setRequired(true);

$releaseDateInput->getFilterChain()
Expand All @@ -470,7 +470,7 @@ $releaseDateInput->getValidatorChain()
'message' => Message::VALIDATOR_REQUIRED_FIELD,
], true);

$this->add($releaseDateInput, 'releaseDate');
$this->add($releaseDateInput);
```

Now it's time to create the handlers.
Expand Down