Skip to content

Commit 7c7305e

Browse files
authored
Merge pull request #1789 from Blair2004/v5.0.x
V5.0.x
2 parents 21b4de6 + 21e4d8d commit 7c7305e

File tree

982 files changed

+42159
-22532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

982 files changed

+42159
-22532
lines changed

app/Broadcasting/PrivateChannel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __construct()
2121
*
2222
* @return array|bool
2323
*/
24-
public function join(User $user)
24+
public function join( User $user )
2525
{
2626
return true;
2727
}

app/Casts/CurrencyCast.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ class CurrencyCast implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param mixed $value
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param mixed $value
1414
* @return mixed
1515
*/
16-
public function get($model, string $key, $value, array $attributes)
16+
public function get( $model, string $key, $value, array $attributes )
1717
{
18-
return (string) ns()->currency->define($value);
18+
return (string) ns()->currency->define( $value );
1919
}
2020

2121
/**
2222
* Prepare the given value for storage.
2323
*
24-
* @param \Illuminate\Database\Eloquent\Model $model
25-
* @param mixed $value
24+
* @param \Illuminate\Database\Eloquent\Model $model
25+
* @param mixed $value
2626
* @return mixed
2727
*/
28-
public function set($model, string $key, $value, array $attributes)
28+
public function set( $model, string $key, $value, array $attributes )
2929
{
3030
return $value;
3131
}

app/Casts/DateCast.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ class DateCast implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param string $key
14-
* @param mixed $value
15-
* @param array $attributes
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param string $key
14+
* @param mixed $value
15+
* @param array $attributes
1616
* @return mixed
1717
*/
18-
public function get($model, $key, $value, $attributes)
18+
public function get( $model, $key, $value, $attributes )
1919
{
20-
if ($value !== null) {
21-
return ns()->date->getFormatted($value);
20+
if ( $value !== null ) {
21+
return ns()->date->getFormatted( $value );
2222
}
2323

2424
return $value;
@@ -27,13 +27,13 @@ public function get($model, $key, $value, $attributes)
2727
/**
2828
* Prepare the given value for storage.
2929
*
30-
* @param \Illuminate\Database\Eloquent\Model $model
31-
* @param string $key
32-
* @param array $value
33-
* @param array $attributes
30+
* @param \Illuminate\Database\Eloquent\Model $model
31+
* @param string $key
32+
* @param array $value
33+
* @param array $attributes
3434
* @return mixed
3535
*/
36-
public function set($model, $key, $value, $attributes)
36+
public function set( $model, $key, $value, $attributes )
3737
{
3838
return $value;
3939
}

app/Casts/DiscountTypeCast.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ class DiscountTypeCast implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param mixed $value
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param mixed $value
1414
* @return mixed
1515
*/
16-
public function get($model, string $key, $value, array $attributes)
16+
public function get( $model, string $key, $value, array $attributes )
1717
{
18-
return match ($value) {
19-
'percentage_discount' => __('Percentage'),
20-
'flat_discount' => __('Flat'),
21-
default => __('Unknown Type'),
18+
return match ( $value ) {
19+
'percentage_discount' => __( 'Percentage' ),
20+
'flat_discount' => __( 'Flat' ),
21+
default => __( 'Unknown Type' ),
2222
};
2323
}
2424

2525
/**
2626
* Prepare the given value for storage.
2727
*
28-
* @param \Illuminate\Database\Eloquent\Model $model
29-
* @param mixed $value
28+
* @param \Illuminate\Database\Eloquent\Model $model
29+
* @param mixed $value
3030
* @return mixed
3131
*/
32-
public function set($model, string $key, $value, array $attributes)
32+
public function set( $model, string $key, $value, array $attributes )
3333
{
3434
return $value;
3535
}

app/Casts/FloatConvertCasting.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ class FloatConvertCasting implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param mixed $value
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param mixed $value
1414
* @return mixed
1515
*/
16-
public function get($model, string $key, $value, array $attributes)
16+
public function get( $model, string $key, $value, array $attributes )
1717
{
18-
return ns()->math->set($value ?: 0)->toFloat();
18+
return ns()->math->set( $value ?: 0 )->toFloat();
1919
}
2020

2121
/**
2222
* Prepare the given value for storage.
2323
*
24-
* @param \Illuminate\Database\Eloquent\Model $model
25-
* @param mixed $value
24+
* @param \Illuminate\Database\Eloquent\Model $model
25+
* @param mixed $value
2626
* @return mixed
2727
*/
28-
public function set($model, string $key, $value, array $attributes)
28+
public function set( $model, string $key, $value, array $attributes )
2929
{
3030
return $value;
3131
}

app/Casts/GenderCast.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ class GenderCast implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param mixed $value
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param mixed $value
1414
* @return mixed
1515
*/
16-
public function get($model, string $key, $value, array $attributes)
16+
public function get( $model, string $key, $value, array $attributes )
1717
{
18-
return match ($value) {
19-
'male' => __('Male'),
20-
'female' => __('Female'),
21-
default => __('Not Defined'),
18+
return match ( $value ) {
19+
'male' => __( 'Male' ),
20+
'female' => __( 'Female' ),
21+
default => __( 'Not Defined' ),
2222
};
2323
}
2424

2525
/**
2626
* Prepare the given value for storage.
2727
*
28-
* @param \Illuminate\Database\Eloquent\Model $model
29-
* @param mixed $value
28+
* @param \Illuminate\Database\Eloquent\Model $model
29+
* @param mixed $value
3030
* @return mixed
3131
*/
32-
public function set($model, string $key, $value, array $attributes)
32+
public function set( $model, string $key, $value, array $attributes )
3333
{
3434
return $value;
3535
}

app/Casts/NotDefinedCast.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ class NotDefinedCast implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param mixed $value
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param mixed $value
1414
* @return mixed
1515
*/
16-
public function get($model, string $key, $value, array $attributes)
16+
public function get( $model, string $key, $value, array $attributes )
1717
{
18-
return empty($value) ? __('Not Defined') : $value;
18+
return empty( $value ) ? __( 'Not Defined' ) : $value;
1919
}
2020

2121
/**
2222
* Prepare the given value for storage.
2323
*
24-
* @param \Illuminate\Database\Eloquent\Model $model
25-
* @param mixed $value
24+
* @param \Illuminate\Database\Eloquent\Model $model
25+
* @param mixed $value
2626
* @return mixed
2727
*/
28-
public function set($model, string $key, $value, array $attributes)
28+
public function set( $model, string $key, $value, array $attributes )
2929
{
3030
return $value;
3131
}

app/Casts/OrderDeliveryCast.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ class OrderDeliveryCast implements CastsAttributes
1010
/**
1111
* Cast the given value.
1212
*
13-
* @param \Illuminate\Database\Eloquent\Model $model
14-
* @param mixed $value
13+
* @param \Illuminate\Database\Eloquent\Model $model
14+
* @param mixed $value
1515
* @return mixed
1616
*/
17-
public function get($model, string $key, $value, array $attributes)
17+
public function get( $model, string $key, $value, array $attributes )
1818
{
1919
/**
2020
* @var OrdersService $orderService
2121
*/
22-
$orderService = app()->make(OrdersService::class);
22+
$orderService = app()->make( OrdersService::class );
2323

24-
return $orderService->getDeliveryStatus($value);
24+
return $orderService->getDeliveryStatus( $value );
2525
}
2626

2727
/**
2828
* Prepare the given value for storage.
2929
*
30-
* @param \Illuminate\Database\Eloquent\Model $model
31-
* @param mixed $value
30+
* @param \Illuminate\Database\Eloquent\Model $model
31+
* @param mixed $value
3232
* @return mixed
3333
*/
34-
public function set($model, string $key, $value, array $attributes)
34+
public function set( $model, string $key, $value, array $attributes )
3535
{
3636
return $value;
3737
}

app/Casts/OrderPaymentCast.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ class OrderPaymentCast implements CastsAttributes
99
/**
1010
* Cast the given value.
1111
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param mixed $value
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param mixed $value
1414
* @return mixed
1515
*/
16-
public function get($model, string $key, $value, array $attributes)
16+
public function get( $model, string $key, $value, array $attributes )
1717
{
18-
return ns()->order->getPaymentLabel($value);
18+
return ns()->order->getPaymentLabel( $value );
1919
}
2020

2121
/**
2222
* Prepare the given value for storage.
2323
*
24-
* @param \Illuminate\Database\Eloquent\Model $model
25-
* @param mixed $value
24+
* @param \Illuminate\Database\Eloquent\Model $model
25+
* @param mixed $value
2626
* @return mixed
2727
*/
28-
public function set($model, string $key, $value, array $attributes)
28+
public function set( $model, string $key, $value, array $attributes )
2929
{
3030
return $value;
3131
}

app/Casts/OrderProcessCast.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ class OrderProcessCast implements CastsAttributes
1010
/**
1111
* Cast the given value.
1212
*
13-
* @param \Illuminate\Database\Eloquent\Model $model
14-
* @param mixed $value
13+
* @param \Illuminate\Database\Eloquent\Model $model
14+
* @param mixed $value
1515
* @return mixed
1616
*/
17-
public function get($model, string $key, $value, array $attributes)
17+
public function get( $model, string $key, $value, array $attributes )
1818
{
1919
/**
2020
* @var OrdersService $orderService
2121
*/
22-
$orderService = app()->make(OrdersService::class);
22+
$orderService = app()->make( OrdersService::class );
2323

24-
return $orderService->getProcessStatus($value);
24+
return $orderService->getProcessStatus( $value );
2525
}
2626

2727
/**
2828
* Prepare the given value for storage.
2929
*
30-
* @param \Illuminate\Database\Eloquent\Model $model
31-
* @param mixed $value
30+
* @param \Illuminate\Database\Eloquent\Model $model
31+
* @param mixed $value
3232
* @return mixed
3333
*/
34-
public function set($model, string $key, $value, array $attributes)
34+
public function set( $model, string $key, $value, array $attributes )
3535
{
3636
return $value;
3737
}

app/Casts/OrderTypeCast.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ class OrderTypeCast implements CastsAttributes
1010
/**
1111
* Cast the given value.
1212
*
13-
* @param \Illuminate\Database\Eloquent\Model $model
14-
* @param mixed $value
13+
* @param \Illuminate\Database\Eloquent\Model $model
14+
* @param mixed $value
1515
* @return mixed
1616
*/
17-
public function get($model, string $key, $value, array $attributes)
17+
public function get( $model, string $key, $value, array $attributes )
1818
{
1919
/**
2020
* @var OrdersService $orderService
2121
*/
22-
$orderService = app()->make(OrdersService::class);
22+
$orderService = app()->make( OrdersService::class );
2323

24-
return $orderService->getTypeLabel($value);
24+
return $orderService->getTypeLabel( $value );
2525
}
2626

2727
/**
2828
* Prepare the given value for storage.
2929
*
30-
* @param \Illuminate\Database\Eloquent\Model $model
31-
* @param mixed $value
30+
* @param \Illuminate\Database\Eloquent\Model $model
31+
* @param mixed $value
3232
* @return mixed
3333
*/
34-
public function set($model, string $key, $value, array $attributes)
34+
public function set( $model, string $key, $value, array $attributes )
3535
{
3636
return $value;
3737
}

0 commit comments

Comments
 (0)