Skip to content

Commit

Permalink
[11.x] Use constructor property promotion for database query conditio…
Browse files Browse the repository at this point in the history
…n expression (#54302)

* Use constructor property promotion for database query condition expression

* StyleCI
  • Loading branch information
shaedrich authored Jan 22, 2025
1 parent dbe6b14 commit b0667a6
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/Illuminate/Database/Query/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,27 @@
use Illuminate\Contracts\Database\Query\Expression as ExpressionContract;
use Illuminate\Database\Grammar;

/**
* @template TValue of string|int|float
*/
class Expression implements ExpressionContract
{
/**
* The value of the expression.
*
* @var string|int|float
*/
protected $value;

/**
* Create a new raw query expression.
*
* @param string|int|float $value
* @param TValue $value
* @return void
*/
public function __construct($value)
{
$this->value = $value;
public function __construct(
protected $value
) {
}

/**
* Get the value of the expression.
*
* @param \Illuminate\Database\Grammar $grammar
* @return string|int|float
* @return TValue
*/
public function getValue(Grammar $grammar)
{
Expand Down

0 comments on commit b0667a6

Please sign in to comment.