Skip to content

Commit

Permalink
rename trait
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 31, 2021
1 parent 7a5d462 commit 45ff23c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Illuminate\Support\Traits;

trait Conditional
trait Conditionable
{
/**
* Apply the callback if the given "value" is true.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Validation/Rules/Dimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Illuminate\Validation\Rules;

use Illuminate\Support\Traits\Conditional;
use Illuminate\Support\Traits\Conditionable;

class Dimensions
{
use Conditional;
use Conditionable;

/**
* The constraints for the dimensions rule.
Expand Down
5 changes: 2 additions & 3 deletions src/Illuminate/Validation/Rules/Exists.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

namespace Illuminate\Validation\Rules;

use Illuminate\Support\Traits\Conditional;
use Illuminate\Support\Traits\Conditionable;

class Exists
{
use DatabaseRule;
use Conditional;
use Conditionable, DatabaseRule;

/**
* Convert the rule to a validation string.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Validation/Rules/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
use Illuminate\Contracts\Validation\UncompromisedVerifier;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Traits\Conditional;
use Illuminate\Support\Traits\Conditionable;
use InvalidArgumentException;

class Password implements Rule, DataAwareRule
{
use Conditional;
use Conditionable;

/**
* The data under validation.
Expand Down
5 changes: 2 additions & 3 deletions src/Illuminate/Validation/Rules/Unique.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
namespace Illuminate\Validation\Rules;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Traits\Conditional;
use Illuminate\Support\Traits\Conditionable;

class Unique
{
use DatabaseRule;
use Conditional;
use Conditionable, DatabaseRule;

/**
* The ID that should be ignored.
Expand Down

0 comments on commit 45ff23c

Please sign in to comment.