update php version

This commit is contained in:
Dennis Eichhorn 2022-04-19 23:37:08 +02:00
parent 538231604f
commit 3c50200ee1
109 changed files with 127 additions and 113 deletions

View File

@ -284,8 +284,6 @@ jobs:
if [[ $(find ./ -name "*tpl.php" | xargs grep -P '(style=)') -ne "" ]]; then exit 1; fi
if [[ $(find ./ -name "*tpl.php" | xargs grep -P '(value|title|alt|aria\-label)(=\")((?!\<\?).)*(>)') -ne "" ]]; then exit 1; fi
if [[ $(find ./ -name "*tpl.php" | xargs grep -P '(\<td\>|\<th\>|\<caption\>|\<label.*?(\"|l)\>)) -ne "" ]]; then exit 1; fi
- name: Js strict
run: if [[ $(grep -r -L "\"use strict\";" --include=*.js ./) -ne "" ]]; then exit 1; fi
- name: Js inspection
run: |
if [[ $(grep -rlni "onafterprint=\|onbeforeprint=\|onbeforeunload=\|onerror=\|onhaschange=\|onload=\|onmessage=\|onoffline=\|ononline=\|onpagehide=\|onpageshow=\|onpopstate=\|onredo=\|onresize=\|onstorage=\|onund=o\|onunload=\|onblur=\|onchage=\|oncontextmenu=\|onfocus=\|onformchange=\|onforminput=\|oninput=\|oninvalid=\|onreset=\|onselect=\|onsubmit=\|onkeydown=\|onkeypress=\|onkeyup=\|onclick=\|ondblclic=k\|ondrag=\|ondragend=\|ondragenter=\|ondragleave=\|ondragover=\|ondragstart=\|ondrop=\|onmousedown=\|onmousemove=\|onmouseout=\|onmouseover=\|onmouseup=\|onmousewheel=\|onscroll=\|onabor=t\|oncanplay=\|oncanplaythrough=\|ondurationchange=\|onemptied=\|onended=\|onerror=\|onloadeddata=\|onloadedmetadata=\|onloadstart=\|onpause=\|onplay=\|onplaying=\|onprogress=\|onratechange=\|onreadystatechange=\|onseeked=\|onseeking=\|onstalled=\|onsuspend=\|ontimeupdate=\|onvolumechange=" --include=*.js ./) -ne "" ]]; then exit 1; fi

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Template
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Web\{APPNAME}
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin\Install
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin\Install
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin\Install
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn
@ -333,7 +333,10 @@ final class ApiController extends Controller
{
// @todo: check if is allowed to change
$old = clone QAAnswerMapper::get()->where('id', (int) $request->getData('id'))->execute();
/** @var \Modules\QA\Models\QAAnswer $old */
$old = clone QAAnswerMapper::get()->where('id', (int) $request->getData('id'))->execute();
/** @var \Modules\QA\Models\QAAnswer $oldAccepted */
$oldAccepted = QAAnswerMapper::get()
->where('question', $old->question->getId())
->where('isAccepted', true)
@ -363,6 +366,7 @@ final class ApiController extends Controller
*/
public function updateAnsweredStatusFromRequest(RequestAbstract $request) : QAAnswer
{
/** @var \Modules\QA\Models\QAAnswer $answer */
$answer = QAAnswerMapper::get()->where('id', (int) $request->getData('id'))->execute();
$answer->isAccepted = !$answer->isAccepted;
@ -457,12 +461,14 @@ final class ApiController extends Controller
// @todo: check if is allowed to change
/** @var \Modules\QA\Models\QAQuestionVote $questionVote */
$questionVote = QAQuestionVoteMapper::get()
->where('question', (int) $request->getData('id'))
->where('createdBy', $request->header->account)
->execute();
if ($questionVote === false || $questionVote instanceof NullQAQuestionVote || $questionVote === null) {
/** @var \Modules\QA\Models\QAQuestion $question */
$question = QAQuestionMapper::get()->where('id', (int) $request->getData('id'))->execute();
$new = new QAQuestionVote();
@ -530,12 +536,14 @@ final class ApiController extends Controller
// @todo: check if is allowed to change
/** @var \Modules\QA\Models\QAAnswerVote $answerVote */
$answerVote = QAAnswerVoteMapper::get()
->where('answer', (int) $request->getData('id'))
->where('createdBy', $request->header->account)
->execute();
if ($answerVote === false || $answerVote instanceof NullQAAnswerVote || $answerVote === null) {
/** @var \Modules\QA\Models\QAAnswer $answer */
$answer = QAAnswerMapper::get()->where('id', (int) $request->getData('id'))->execute();
$new = new QAAnswerVote();

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn
@ -45,7 +45,11 @@ final class QAHelperMapper extends DataMapperFactory
->where(QAQuestionVoteMapper::TABLE . '.qa_question_vote_created_for', 'in', $accounts)
->groupBy('qa_question_vote_created_for')
->execute()
->fetchAll();
?->fetchAll();
if ($questionScore === null) {
$questionScore = [];;
}
foreach ($questionScore as $votes) {
$scores[(int) $votes['qa_question_vote_created_for']] = (int) $votes['score'];
@ -58,7 +62,11 @@ final class QAHelperMapper extends DataMapperFactory
->where(QAAnswerVoteMapper::TABLE . '.qa_answer_vote_created_for', 'in', $accounts)
->groupBy('qa_answer_vote_created_for')
->execute()
->fetchAll();
?->fetchAll();
if ($answerScore === null) {
$answerScore = [];;
}
foreach ($answerScore as $votes) {
$scores[(int) $votes['qa_answer_vote_created_for']] ??= 0;

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules\QA
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package Modules/tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Karaka
*
* PHP Version 8.0
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn

Some files were not shown because too many files have changed in this diff Show More