mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 16:14:28 -04:00
simpler short conditionnal
“Since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.” http://php.net/manual/en/language.operators.comparison.php
This commit is contained in:
parent
8edb063b30
commit
30c65f4a23
@ -207,11 +207,11 @@ class ClientController extends \BaseController {
|
||||
$client->city = trim(Input::get('city'));
|
||||
$client->state = trim(Input::get('state'));
|
||||
$client->postal_code = trim(Input::get('postal_code'));
|
||||
$client->country_id = Input::get('country_id') ? Input::get('country_id') : null;
|
||||
$client->country_id = Input::get('country_id') ? : null;
|
||||
$client->private_notes = trim(Input::get('private_notes'));
|
||||
$client->size_id = Input::get('size_id') ? Input::get('size_id') : null;
|
||||
$client->industry_id = Input::get('industry_id') ? Input::get('industry_id') : null;
|
||||
$client->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1;
|
||||
$client->size_id = Input::get('size_id') ? : null;
|
||||
$client->industry_id = Input::get('industry_id') ? : null;
|
||||
$client->currency_id = Input::get('currency_id') ? : 1;
|
||||
$client->payment_terms = Input::get('payment_terms') ? : 0;
|
||||
$client->website = trim(Input::get('website'));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user