template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:48 +00:00
parent b0711ef33c
commit 9aecd7181c
4 changed files with 22 additions and 21 deletions

View File

@ -12,10 +12,11 @@
*/
declare(strict_types=1);
use Modules\EventManagement\Models\ProgressType;
use Modules\ProjectManagement\Models\NullProject;
use Modules\ProjectManagement\Models\ProgressType;
/** \Modules\ProjectManagement\Models\Project $project */
$project = $this->data['project'];
$project = $this->data['project'] ?? new NullProject();
$isNew = $project->id === 0;

View File

@ -98,7 +98,7 @@ final class ProjectMapperTest extends \PHPUnit\Framework\TestCase
#[\PHPUnit\Framework\Attributes\Group('module')]
public function testNewest() : void
{
$newest = ProjectMapper::getAll()->sort('id', OrderType::DESC)->limit(1)->execute();
$newest = ProjectMapper::getAll()->sort('id', OrderType::DESC)->limit(1)->executeGetArray();
self::assertCount(1, $newest);
}