More cleanup and php doc stuff.

This commit is contained in:
James Cole
2014-08-10 18:22:42 +02:00
parent d0a30f71cd
commit 80c1184eac
55 changed files with 342 additions and 11 deletions

View File

@@ -40,6 +40,9 @@ class Limit extends Ardent
];
/**
* @return array
*/
public static function factory()
{
$start = new Carbon;
@@ -54,16 +57,25 @@ class Limit extends Ardent
];
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function budget()
{
return $this->belongsTo('Budget', 'component_id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function component()
{
return $this->belongsTo('Component', 'component_id');
}
/**
* @param Carbon $start
*/
public function createRepetition(Carbon $start)
{
@@ -116,12 +128,18 @@ class Limit extends Ardent
}
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function limitrepetitions()
{
return $this->hasMany('LimitRepetition');
}
/**
* @return array
*/
public function getDates()
{
return ['created_at', 'updated_at', 'startdate', 'enddate'];