Hi,

Let's say you have classes in a package.

Helpers\Cleaner
Helpers\Validator
Helpers\Time

And a function:

PHP Code:
function test($foo$barHelpers\Cleaner $cleanerHelpers\Validator $validatorHelpers\Time $time) {
    
// Whatever

You create a class that holds all of them:

Helpers/Helper

Which would result in:

$helper->$cleaner
$helper->$validator
$helper->$time

So then you can have less parameters:

PHP Code:
function test($foo$barHelpers\Help $helper) {
    
// Whatever

Is there a name for this and is it considered good or bad practice?

Thanks.