protected function getComponentData(array $signature, array $arguments): array
    {
        $data = [];

        $i = 0;
        foreach ($signature as $variable => $default) {
            // If the "variable" value is actually a numeric key, we can assume that
            // no default had been specified for the component argument and we'll
            // just use null instead, so that we can treat them all the same.
            if (\is_numeric($variable)) {
                $variable = $default;
                $default  = null;
            }

            $data[$variable] = $arguments[$i] ?? $default;

            ++$i;
        }

        return $data;
    }
protected function getComponentData(array $signature, array $arguments): array
    {
        $data = [];

        $i = 0;
        foreach ($signature as $variable => $default) {
            // If the "variable" value is actually a numeric key, we can assume that
            // no default had been specified for the component argument and we'll
            // just use null instead, so that we can treat them all the same.
            if (\is_numeric($variable)) {
                $variable = $default;
                $default  = null;
            }

            $data[$variable] = $arguments[$i] ?? $default;

            ++$i;
        }

        return $data;
    }
protected function getComponentData ( array $ signature , array $ arguments ) : array { $ data = [ ] ; $ i = 0 ; foreach ( $ signature as $ variable => $ default ) { // If the "variable" value is actually a numeric key, we can assume that // no default had been specified for the component argument and we'll // just use null instead, so that we can treat them all the same. if ( \ is_numeric ( $ variable ) ) { $ variable = $ default ; $ default = null ; } $ data [ $ variable ] = $ arguments [ $ i ] ?? $ default ; ++ $ i ; } return $ data ; }
Prepare the component data, while respecting provided defaults.

@param  array $signature
@param  array $arguments

@return array
Prepare the component data while respecting provided defaults .