diff --git a/lib/Helper/Filter/JSON/AbstractJSONFilter.php b/lib/Helper/Filter/JSON/AbstractJSONFilter.php index 0ffaea89..352983a7 100644 --- a/lib/Helper/Filter/JSON/AbstractJSONFilter.php +++ b/lib/Helper/Filter/JSON/AbstractJSONFilter.php @@ -26,7 +26,7 @@ abstract class AbstractJSONFilter { /** * @param string|int|float|array $value */ - protected function setJSONValue(array &$json, string $key, string|int|float|array $value): bool { + protected function setJSONValue(array &$json, string $key, $value): bool { if (!array_key_exists($key, $json)) { $json[$key] = $value; return true; diff --git a/lib/Helper/Filter/Output/RecipeStubFilter.php b/lib/Helper/Filter/Output/RecipeStubFilter.php index a02df79a..8e38efcf 100644 --- a/lib/Helper/Filter/Output/RecipeStubFilter.php +++ b/lib/Helper/Filter/Output/RecipeStubFilter.php @@ -12,7 +12,7 @@ class RecipeStubFilter { public function __construct( RecipeIdTypeFilter $recipeIdTypeFilter, - RecipeIdCopyFilter $recipeIdCopyFilter, + RecipeIdCopyFilter $recipeIdCopyFilter ) { $this->filters = [ $recipeIdCopyFilter, diff --git a/lib/Helper/TimestampHelper.php b/lib/Helper/TimestampHelper.php index 4f19a228..a9836a3f 100644 --- a/lib/Helper/TimestampHelper.php +++ b/lib/Helper/TimestampHelper.php @@ -45,7 +45,7 @@ class TimestampHelper { // For now, we only support the ISO8601 format because it is required in the schema.org standard try { return $this->parseIsoFormat($timestamp); - } catch (InvalidTimestampException) { + } catch (InvalidTimestampException $ex) { // We do nothing here. Check the next format } @@ -65,15 +65,15 @@ class TimestampHelper { private function parseIsoFormat(string $timestamp): string { try { return $this->parseIsoCalendarDateFormat($timestamp, '-'); - } catch (InvalidTimestampException) { // Check next format + } catch (InvalidTimestampException $ex) { // Check next format } try { return $this->parseIsoCalendarDateFormat($timestamp, ''); - } catch (InvalidTimestampException) { // Check next format + } catch (InvalidTimestampException $ex) { // Check next format } try { return $this->parseIsoWeekDateFormat($timestamp, '-'); - } catch (InvalidTimestampException) { // Check next format + } catch (InvalidTimestampException $ex) { // Check next format } return $this->parseIsoWeekDateFormat($timestamp, '');