public function instantiateTargets(Collection $targets)
    {
        if ($targets->isEmpty()) {
            return collect([Target::factory($this, $targets)]);
        }

        $current = collect();

        $targets = $targets
            ->map(function (Collection $targetList) {
                return $targetList->map(function ($target, $name) {
                    return Target::factory($this, $target, $name);
                });
            })
            ->reduce(function ($current, $targetList) {
                foreach ($targetList as $target) {
                    $current[] = $target;
                }

                return $current;
            }, $current);

        return $targets;
    }
public function instantiateTargets(Collection $targets)
    {
        if ($targets->isEmpty()) {
            return collect([Target::factory($this, $targets)]);
        }

        $current = collect();

        $targets = $targets
            ->map(function (Collection $targetList) {
                return $targetList->map(function ($target, $name) {
                    return Target::factory($this, $target, $name);
                });
            })
            ->reduce(function ($current, $targetList) {
                foreach ($targetList as $target) {
                    $current[] = $target;
                }

                return $current;
            }, $current);

        return $targets;
    }
public function instantiateTargets ( Collection $ targets ) { if ( $ targets -> isEmpty ( ) ) { return collect ( [ Target :: factory ( $ this , $ targets ) ] ) ; } $ current = collect ( ) ; $ targets = $ targets -> map ( function ( Collection $ targetList ) { return $ targetList -> map ( function ( $ target , $ name ) { return Target :: factory ( $ this , $ target , $ name ) ; } ) ; } ) -> reduce ( function ( $ current , $ targetList ) { foreach ( $ targetList as $ target ) { $ current [ ] = $ target ; } return $ current ; } , $ current ) ; return $ targets ; }
Instantiate all checkers for a resource.

@param Collection $targets
@return Collection|\IlluminateAgnostic\Arr\Support\Collection|\IlluminateAgnostic\Collection\Support\Collection|\IlluminateAgnostic\Str\Support\Collection|mixed|\Tightenco\Collect\Support\Collection|\Vanilla\Support\Collection
Instantiate all checkers for a resource .