Compare commits

..

1 Commits

Author SHA1 Message Date
3deb76056d
use username for multi games
Some checks failed
mapguesser/pipeline/pr-develop There was a failure building this commit
2023-09-25 23:58:42 +02:00
2 changed files with 4 additions and 4 deletions

4
Jenkinsfile vendored
View File

@ -37,7 +37,7 @@ pipeline {
sh 'vendor/bin/phpunit --log-junit unit_test_results.xml --testdox tests' sh 'vendor/bin/phpunit --log-junit unit_test_results.xml --testdox tests'
} }
post { post {
always { success {
archiveArtifacts 'unit_test_results.xml' archiveArtifacts 'unit_test_results.xml'
} }
} }
@ -56,7 +56,7 @@ pipeline {
sh 'php -d memory_limit=1G vendor/bin/phpstan analyse -c phpstan.neon --error-format=prettyJson > static_code_analysis_results.json' sh 'php -d memory_limit=1G vendor/bin/phpstan analyse -c phpstan.neon --error-format=prettyJson > static_code_analysis_results.json'
} }
post { post {
always { success {
archiveArtifacts 'static_code_analysis_results.json' archiveArtifacts 'static_code_analysis_results.json'
} }
} }

View File

@ -1,6 +1,7 @@
<?php namespace MapGuesser\Controller; <?php namespace MapGuesser\Controller;
use DateTime; use DateTime;
use Faker\Factory;
use SokoWeb\Interfaces\Authentication\IAuthenticationRequired; use SokoWeb\Interfaces\Authentication\IAuthenticationRequired;
use SokoWeb\Response\HtmlContent; use SokoWeb\Response\HtmlContent;
use SokoWeb\Response\JsonContent; use SokoWeb\Response\JsonContent;
@ -11,7 +12,6 @@ use MapGuesser\PersistentData\Model\Challenge;
use MapGuesser\PersistentData\Model\MultiRoom; use MapGuesser\PersistentData\Model\MultiRoom;
use MapGuesser\PersistentData\Model\PlaceInChallenge; use MapGuesser\PersistentData\Model\PlaceInChallenge;
use MapGuesser\PersistentData\Model\UserInChallenge; use MapGuesser\PersistentData\Model\UserInChallenge;
use MapGuesser\PersistentData\Model\User;
use MapGuesser\Repository\ChallengeRepository; use MapGuesser\Repository\ChallengeRepository;
use MapGuesser\Repository\MapRepository; use MapGuesser\Repository\MapRepository;
use MapGuesser\Repository\MultiRoomRepository; use MapGuesser\Repository\MultiRoomRepository;
@ -191,7 +191,7 @@ class GameController implements IAuthenticationRequired
public function prepareMultiGame(): IContent public function prepareMultiGame(): IContent
{ {
/** /**
* @var User|null $user * @var User $user
*/ */
$user = \Container::$request->user(); $user = \Container::$request->user();
if ($user === null) if ($user === null)