Skip to content

Commit a89b289

Browse files
authored
null-safe
1 parent b576005 commit a89b289

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
}
2323
],
2424
"require": {
25-
"php": ">=7.3",
25+
"php": ">=8.0",
2626
"barryvdh/laravel-debugbar": "^3.6"
2727
},
2828
"require-dev": {
29-
"orchestra/testbench": "^6.0",
29+
"orchestra/testbench": "^7.0",
3030
"phpunit/phpunit": "^9.0"
3131
},
3232
"autoload": {

src/AkauntingCollector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ public function collect()
3636
$company_date_format = company_date_format() . ' (' . company_date(Date::createFromTimestamp(0)) . ')';
3737

3838
if ($account_id = setting('default.account', null)) {
39-
$default_account = Account::find($account_id)->getAttributes();
39+
$default_account = Account::find($account_id)?->getAttributes();
4040
}
4141

4242
if ($currency_code = setting('default.currency')) {
43-
$default_currency = Currency::code($currency_code)->first()->getAttributes();
43+
$default_currency = Currency::code($currency_code)->first()?->getAttributes();
4444
}
4545

4646
if ($income_category_id = setting('default.income_category', null)) {
47-
$default_income_category = Category::find($income_category_id)->getAttributes();
47+
$default_income_category = Category::find($income_category_id)?->getAttributes();
4848
}
4949

5050
if ($expense_category_id = setting('default.expense_category', null)) {
51-
$default_expense_category = Category::find($expense_category_id)->getAttributes();
51+
$default_expense_category = Category::find($expense_category_id)?->getAttributes();
5252
}
5353

5454
$default_locale = setting('default.locale');

0 commit comments

Comments
 (0)