Adopt Laravel coding style

Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.

You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started.

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
This commit is contained in:
Laravel Shift
2021-06-10 20:15:52 +00:00
parent 54cb6c050a
commit 934afa036f
4549 changed files with 35238 additions and 38391 deletions
+26 -26
View File
@@ -14,7 +14,7 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['purchase_date'] = $value;
return;
}
/**
@@ -22,13 +22,13 @@ class SnipeModel extends Model
*/
public function setPurchaseCostAttribute($value)
{
$value = Helper::ParseFloat($value);
$value = Helper::ParseFloat($value);
if ($value == '0.0') {
$value = null;
}
$this->attributes['purchase_cost'] = $value;
return;
}
public function setLocationIdAttribute($value)
@@ -37,7 +37,7 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['location_id'] = $value;
return;
}
public function setCategoryIdAttribute($value)
@@ -47,7 +47,7 @@ class SnipeModel extends Model
}
$this->attributes['category_id'] = $value;
// dd($this->attributes);
return;
}
public function setSupplierIdAttribute($value)
@@ -56,7 +56,7 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['supplier_id'] = $value;
return;
}
public function setDepreciationIdAttribute($value)
@@ -65,7 +65,7 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['depreciation_id'] = $value;
return;
}
public function setManufacturerIdAttribute($value)
@@ -74,7 +74,7 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['manufacturer_id'] = $value;
return;
}
public function setMinAmtAttribute($value)
@@ -83,7 +83,7 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['min_amt'] = $value;
return;
}
public function setParentIdAttribute($value)
@@ -92,79 +92,79 @@ class SnipeModel extends Model
$value = null;
}
$this->attributes['parent_id'] = $value;
return;
}
public function setFieldSetIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['fieldset_id'] = $value;
return;
}
public function setCompanyIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['company_id'] = $value;
return;
}
public function setWarrantyMonthsAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['warranty_months'] = $value;
return;
}
public function setRtdLocationIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['rtd_location_id'] = $value;
return;
}
public function setDepartmentIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['department_id'] = $value;
return;
}
public function setManagerIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['manager_id'] = $value;
return;
}
public function setModelIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['model_id'] = $value;
return;
}
public function setStatusIdAttribute($value)
{
if($value == '') {
if ($value == '') {
$value = null;
}
$this->attributes['status_id'] = $value;
return;
}
//