We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -39,7 +39,6 @@ discard block |
||
39 | 39 | * @param array $options Name, type, label, etc. |
40 | 40 | * @param array/closure $values The HTML for the filter. |
41 | 41 | * @param closure $filter_logic Query modification (filtering) logic. |
42 | - * @param closure $default_logic Query modification (filtering) logic when filter is not active. |
|
43 | 42 | */ |
44 | 43 | public function addFilter($options, $values = false, $filter_logic = false, $fallback_logic = false) |
45 | 44 | { |
@@ -150,7 +149,7 @@ discard block |
||
150 | 149 | |
151 | 150 | /** |
152 | 151 | * Determine if the current CRUD action is a list operation (using standard or ajax DataTables). |
153 | - * @return bool |
|
152 | + * @return boolean|null |
|
154 | 153 | */ |
155 | 154 | public function doingListOperation() |
156 | 155 | { |
@@ -66,20 +66,20 @@ |
||
66 | 66 | |
67 | 67 | // if a closure was passed as "filter_logic" |
68 | 68 | if ($this->doingListOperation()) { |
69 | - if ( $this->request->has( $options['name'] ) ) { |
|
70 | - if ( is_callable( $filter_logic ) ) { |
|
71 | - // apply it |
|
72 | - $filter_logic( $this->request->input( $options['name'] ) ); |
|
73 | - } else { |
|
74 | - $this->addDefaultFilterLogic( $filter->name, $filter_logic ); |
|
75 | - } |
|
76 | - } else { |
|
77 | - //if the filter is not active, but fallback logic was supplied |
|
78 | - if ( is_callable( $fallback_logic ) ) { |
|
79 | - // apply the default logic |
|
80 | - $fallback_logic(); |
|
81 | - } |
|
82 | - } |
|
69 | + if ( $this->request->has( $options['name'] ) ) { |
|
70 | + if ( is_callable( $filter_logic ) ) { |
|
71 | + // apply it |
|
72 | + $filter_logic( $this->request->input( $options['name'] ) ); |
|
73 | + } else { |
|
74 | + $this->addDefaultFilterLogic( $filter->name, $filter_logic ); |
|
75 | + } |
|
76 | + } else { |
|
77 | + //if the filter is not active, but fallback logic was supplied |
|
78 | + if ( is_callable( $fallback_logic ) ) { |
|
79 | + // apply the default logic |
|
80 | + $fallback_logic(); |
|
81 | + } |
|
82 | + } |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 |