Code rearrange and optimise.

This commit is contained in:
James Cole
2015-03-29 21:27:51 +02:00
parent 210f84b6ea
commit bea321939e
34 changed files with 155 additions and 155 deletions

View File

@@ -98,10 +98,10 @@ class PiggyBanks
// first loop fixes this date. or should fix it.
$max = new Carbon;
echo '[#'.$piggyBank->id.', from: '.$start->format('Y-m-d.').' to '.$end->format('Y-m-d.').']';
echo '[#' . $piggyBank->id . ', from: ' . $start->format('Y-m-d.') . ' to ' . $end->format('Y-m-d.') . ']';
// create stuff. Or at least, try:
$repetition = $piggyBank->piggyBankRepetitions()->onDates($start, $end)->first();
if(!$repetition) {
if (!$repetition) {
$repetition = new PiggyBankRepetition;
$repetition->piggyBank()->associate($piggyBank);
$repetition->startdate = $start;

View File

@@ -46,7 +46,7 @@ class ReplaceTestVars
$input = $request->all();
$input['_token'] = $request->session()->token();
// we need to update _token value to make sure we get the POST / PUT tests passed.
Log::debug('Input token replaced ('.$input['_token'].').');
Log::debug('Input token replaced (' . $input['_token'] . ').');
$request->replace($input);
}