Actually query() returns value of the type "mixed" (as is also stated in the interface) - this is purely there to make our IDEs and Scrutinizer happier.
The core 3rdparty directory is in the include_path from lib/base.php anyway, so this is unnecessary, and causes problems for downstream distributors who unbundle Pimple.