Release 2.0.26 (#4087)

- setting "rounding days" not required
- developer: added user pref for public holiday group (to be used by plugins)
- developer: added WorkingTimeYearEvent (to be used by plugins)
- user pref: cleanup work contract form and support more fields (to be used by plugins)
- code cleanup
- bump theme and composer packages
This commit is contained in:
Kevin Papst
2023-06-09 16:29:19 +02:00
committed by GitHub
parent 0663995d06
commit 6e781b59e2
22 changed files with 241 additions and 167 deletions

View File

@@ -239,7 +239,7 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
* Make sure begin and end date have the correct timezone.
* This will be called once for each item after being loaded from the database.
*/
protected function localizeDates()
protected function localizeDates(): void
{
if ($this->localized) {
return;
@@ -432,7 +432,7 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
/**
* @param Tag $tag
*/
public function removeTag(Tag $tag)
public function removeTag(Tag $tag): void
{
if (!$this->tags->contains($tag)) {
return;
@@ -453,11 +453,14 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
*/
public function getTagsAsArray(): array
{
/** @var array<Tag> $tags */
$tags = $this->getTags()->toArray();
return array_map(
function (Tag $element) {
return $element->getName();
function ($element) {
return (string) $element->getName();
},
$this->getTags()->toArray()
$tags
);
}