type hinting
This commit is contained in:
parent
67a60ab78b
commit
d1b81891f8
@ -150,7 +150,7 @@ abstract class Report
|
|||||||
|
|
||||||
public function applySearchStringFilter($event)
|
public function applySearchStringFilter($event)
|
||||||
{
|
{
|
||||||
$input = request('search');
|
$input = request('search', '');
|
||||||
|
|
||||||
// Remove year as it's handled based on financial start
|
// Remove year as it's handled based on financial start
|
||||||
$search_year = 'year:' . $this->getSearchStringValue('year', '', $input);
|
$search_year = 'year:' . $this->getSearchStringValue('year', '', $input);
|
||||||
|
@ -8,16 +8,12 @@ trait SearchString
|
|||||||
* Get the value of a name in search string
|
* Get the value of a name in search string
|
||||||
* Example: search=type:customer year:2020 account_id:20
|
* Example: search=type:customer year:2020 account_id:20
|
||||||
* Example: issued_at>=2021-02-01 issued_at<=2021-02-10 account_id:49
|
* Example: issued_at>=2021-02-01 issued_at<=2021-02-10 account_id:49
|
||||||
*
|
|
||||||
* @return string|array
|
|
||||||
*/
|
*/
|
||||||
public function getSearchStringValue($name, $default = '', $input = null)
|
public function getSearchStringValue(string $name, string $default = '', string $input = ''): string|array
|
||||||
{
|
{
|
||||||
$value = $default;
|
$value = $default;
|
||||||
|
|
||||||
if (is_null($input)) {
|
$input = $input ?: request('search', '');
|
||||||
$input = request('search');
|
|
||||||
}
|
|
||||||
|
|
||||||
// $manager = $this->getSearchStringManager();
|
// $manager = $this->getSearchStringManager();
|
||||||
// $parsed = $manager->parse($input);
|
// $parsed = $manager->parse($input);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user