public static function newWithSumStoreCategoryAndDate($sum, $store, $category, $date) { $newExpense = new Expense(); $newExpense->setSum($sum)->setStore($store)->setCategory($category)->setDate($date); return $newExpense; }