Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpoulter committed Oct 27, 2019
1 parent 828097d commit 8df9df1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ class Enum extends Select
/**
* Create a new field.
*
* @param string $name
* @param string $name
* @param string|callable|null $attribute
* @param callable|null $resolveCallback
* @param callable|null $resolveCallback
*
* @return void
*/
public function __construct($name, $attribute = null, callable $resolveCallback = null)
Expand All @@ -28,6 +29,7 @@ public function __construct($name, $attribute = null, callable $resolveCallback
* Setup the Enum field with the Enum class
*
* @param string $class
*
* @return $this
*/
public function attachEnum($class)
Expand All @@ -49,17 +51,14 @@ function ($enum) {
* Hydrate the given attribute on the model based on the incoming request.
*
* @param NovaRequest $request
* @param string $requestAttribute
* @param object $model
* @param string $attribute
* @param string $requestAttribute
* @param object $model
* @param string $attribute
*
* @return void
*/
protected function fillAttributeFromRequest(
NovaRequest $request,
$requestAttribute,
$model,
$attribute
) {
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
if ($request->exists($requestAttribute)) {
$model->{$attribute} = $request[$requestAttribute];
}
Expand Down

0 comments on commit 8df9df1

Please sign in to comment.