. */ declare(strict_types=1); namespace FireflyIII\Support\Http\Controllers; use Carbon\Carbon; /** * Trait BasicDataSupport */ trait BasicDataSupport { /** * Find the ID in a given array. Return '0' if not there (amount). * * @return null|mixed */ protected function isInArray(array $array, int $entryId) { return $array[$entryId] ?? '0'; } /** * Find the ID in a given array. Return null if not there (amount). */ protected function isInArrayDate(array $array, int $entryId): ?Carbon { return $array[$entryId] ?? null; } }