[TASK] Fix typehints in docblocks of Mapper

Resolves: #47174
Releases: 6.0, 6.1
Change-Id: Ib29e83b59f6f97e19f3123700d8971e1ea2ea7e8
Reviewed-on: https://review.typo3.org/19881
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUGFIX] RequestBuilder must not call $request->setMethod with NULL

If running a cli script the variable $_SERVER['REQUEST_METHOD'] is
not set at all. So when dispatching a sub webrequest the variable is
still not set and the RequestBuilder sets the method of Request to
NULL which is not allowed.

Therefore the variable will now be fetched via the Enrivonment-
Service which detects if the variable is empty and falls back to
"GET".

Releases: 6.1, 6.0, 4.7, 1.3
Resolves: #13845
Change-Id: I5e33aba48605895f9eae1e3b710364091e7e84f0
Reviewed-on: https://review.typo3.org/19887
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] Added handling for array in findOneByXXX result

If query findOneByXXX is configured to return an array, the first array
element is returned (instead of calling ->getFirst() on a non object).

Fixes: #46035
Releases: 6.1, 6.0, 4.7, 1.3
Change-Id: I2c9d3083ce0eaebd2929ce9f50ec2a7cc36fe222
Reviewed-on: https://review.typo3.org/19855
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn