improve docblocks for Mapper:: variables

This commit is contained in:
Dennis Eichhorn 2020-05-02 10:13:21 +02:00
parent 61e1358692
commit 10c9afccce
2 changed files with 7 additions and 2 deletions

View File

@ -107,7 +107,9 @@ final class ApiController extends Controller
foreach ($accounts as $account) {
$account = (int) \trim($account);
$isInDb = ProfileMapper::getFor($account, 'account');
/** @var Profile $isInDb */
$isInDb = ProfileMapper::getFor($account, 'account');
if ($isInDb->getId() !== 0) {
$profiles[] = $isInDb;
@ -141,6 +143,7 @@ final class ApiController extends Controller
return;
}
/** @var Profile $profile */
$profile = ProfileMapper::getFor($request->getHeader()->getAccount(), 'account');
$old = clone $profile;

View File

@ -77,8 +77,10 @@ final class BackendController extends Controller
if ($request->getData('ptype') === '-') {
$view->setData('accounts', ProfileMapper::getBeforePivot((int) ($request->getData('id') ?? 0), null, 25));
} else {
} elseif ($request->getData('ptype') === '+') {
$view->setData('accounts', ProfileMapper::getAfterPivot((int) ($request->getData('id') ?? 0), null, 25));
} else {
$view->setData('accounts', ProfileMapper::getAfterPivot(0, null, 25));
}
return $view;