mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
doc blocks
This commit is contained in:
parent
d2e5563dbe
commit
6c874274b6
@ -45,6 +45,8 @@ class ClientFilters extends QueryFilters
|
||||
*
|
||||
* @param string query filter
|
||||
* @return Illuminate\Database\Query\Builder
|
||||
* @deprecated
|
||||
*
|
||||
*/
|
||||
public function filter(string $filter = '') : Builder
|
||||
{
|
||||
@ -119,6 +121,7 @@ class ClientFilters extends QueryFilters
|
||||
*
|
||||
* @param int company_id
|
||||
* @return Illuminate\Database\Query\Builder
|
||||
* @deprecated
|
||||
*/
|
||||
public function baseQuery(int $company_id, User $user) : Builder
|
||||
{
|
||||
@ -167,6 +170,12 @@ class ClientFilters extends QueryFilters
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the query by the users company ID
|
||||
*
|
||||
* @param $company_id The company Id
|
||||
* @return Illuminate\Database\Query\Builder
|
||||
*/
|
||||
public function entityFilter()
|
||||
{
|
||||
|
||||
|
@ -15,15 +15,17 @@ use Illuminate\Http\Request;
|
||||
abstract class QueryFilters
|
||||
{
|
||||
/**
|
||||
*
|
||||
* active status
|
||||
*/
|
||||
const STATUS_ACTIVE = 'active';
|
||||
|
||||
/**
|
||||
*
|
||||
* archived status
|
||||
*/
|
||||
const STATUS_ARCHIVED = 'archived';
|
||||
|
||||
/**
|
||||
*
|
||||
* deleted status
|
||||
*/
|
||||
const STATUS_DELETED = 'deleted';
|
||||
|
||||
@ -62,7 +64,7 @@ abstract class QueryFilters
|
||||
$this->builder = $builder;
|
||||
|
||||
$this->entityFilter();
|
||||
|
||||
|
||||
foreach ($this->filters() as $name => $value) {
|
||||
if (! method_exists($this, $name)) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user