Fix formatting and interfaces in nearly every file

This commit is contained in:
Nabeel Shahzad
2018-03-19 20:50:40 -05:00
parent 04c5b9e7bf
commit ccf56ddec1
331 changed files with 3282 additions and 2492 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Repositories;
use App\Interfaces\Repository;
use App\Models\Expense;
use Illuminate\Support\Collection;
use Prettus\Repository\Contracts\CacheableInterface;
@@ -11,7 +12,7 @@ use Prettus\Repository\Traits\CacheableRepository;
* Class ExpenseRepository
* @package App\Repositories
*/
class ExpenseRepository extends BaseRepository implements CacheableInterface
class ExpenseRepository extends Repository implements CacheableInterface
{
use CacheableRepository;
@@ -23,28 +24,27 @@ class ExpenseRepository extends BaseRepository implements CacheableInterface
/**
* Get all of the expenses for a given type, and also
* include expenses for a given airline ID
* @param $type
* @param $type
* @param null $airline_id
* @param null $ref_class
* @return Collection
*/
public function getAllForType($type, $airline_id=null, $ref_class=null)
public function getAllForType($type, $airline_id = null, $ref_class = null)
{
$where = [
'type' => $type,
['airline_id', '=', null]
];
if($ref_class) {
if ($ref_class) {
$where['ref_class'] = $ref_class;
}
$expenses = $this->findWhere($where);
if($airline_id) {
if ($airline_id) {
$where = [
'type' => $type,
'type' => $type,
'airline_id' => $airline_id
];