protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryOptions): array
    {
        $options = [];

        foreach ($mandatoryOptions as $key => $mandatoryOption) {
            if (! \is_scalar($mandatoryOption)) {
                $options[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryOptions[$key]);

                continue;
            }

            $options[$mandatoryOption] = null;
        }

        return $options;
    }
protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryOptions): array
    {
        $options = [];

        foreach ($mandatoryOptions as $key => $mandatoryOption) {
            if (! \is_scalar($mandatoryOption)) {
                $options[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryOptions[$key]);

                continue;
            }

            $options[$mandatoryOption] = null;
        }

        return $options;
    }
protected function readMandatoryOption ( string $ className , array $ dimensions , array $ mandatoryOptions ) : array { $ options = [ ] ; foreach ( $ mandatoryOptions as $ key => $ mandatoryOption ) { if ( ! \ is_scalar ( $ mandatoryOption ) ) { $ options [ $ key ] = $ this -> readMandatoryOption ( $ className , $ dimensions , $ mandatoryOptions [ $ key ] ) ; continue ; } $ options [ $ mandatoryOption ] = null ; } return $ options ; }
Read the mandatory options.

@param string $className
@param array  $dimensions
@param array  $mandatoryOptions

@return array
Read the mandatory options .