Lots of code cleanup.

This commit is contained in:
James Cole
2014-11-15 07:46:01 +01:00
parent 3e02b50ea1
commit 6832f2ebd0
23 changed files with 245 additions and 819 deletions

View File

@@ -78,29 +78,6 @@ class Transaction extends Ardent
return $this->belongsToMany('Component');
}
/**
* @param Piggybank $piggybank
*
* @return bool
*/
public function connectPiggybank(\Piggybank $piggybank = null)
{
// TODO connect a piggy bank to a transaction.
throw new NotImplementedException;
// if (is_null($piggybank)) {
// return true;
// }
// /** @var \Firefly\Storage\Piggybank\PiggybankRepositoryInterface $piggyRepository */
// $piggyRepository = \App::make('Firefly\Storage\Piggybank\PiggybankRepositoryInterface');
// if ($this->account_id == $piggybank->account_id) {
// $this->piggybank()->associate($piggybank);
// $this->save();
// \Event::fire('piggybanks.createRelatedTransfer', [$piggybank, $this->transactionJournal, $this]);
// return true;
// }
// return false;
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/