src/Configuration/DefinitionBuilder/CopyJobDefinitionBuilder.php
private function makeDictionary(
        Configuration $configuration,
        $dictionary,
        array $overrides,
        string $path
    ): ExtendedDictionaryDefinition {
        $name = $dictionary;
        if (is_array($dictionary)) {
            if (!isset($dictionary['name'])) {
                throw new \InvalidArgumentException('Dictionary "' . $path . '" information is missing key "name".');
            }
            $name      = $dictionary['name'];
            $overrides = array_merge($overrides, $dictionary);
            unset($overrides['name']);
        }

        return new ExtendedDictionaryDefinition($name, $configuration, $overrides);
    }
private function makeDictionary(
        Configuration $configuration,
        $dictionary,
        array $overrides,
        string $path
    ): ExtendedDictionaryDefinition {
        $name = $dictionary;
        if (is_array($dictionary)) {
            if (!isset($dictionary['name'])) {
                throw new \InvalidArgumentException('Dictionary "' . $path . '" information is missing key "name".');
            }
            $name      = $dictionary['name'];
            $overrides = array_merge($overrides, $dictionary);
            unset($overrides['name']);
        }

        return new ExtendedDictionaryDefinition($name, $configuration, $overrides);
    }
private function makeDictionary ( Configuration $ configuration , $ dictionary , array $ overrides , string $ path ) : ExtendedDictionaryDefinition { $ name = $ dictionary ; if ( is_array ( $ dictionary ) ) { if ( ! isset ( $ dictionary [ 'name' ] ) ) { throw new \ InvalidArgumentException ( 'Dictionary "' . $ path . '" information is missing key "name".' ) ; } $ name = $ dictionary [ 'name' ] ; $ overrides = array_merge ( $ overrides , $ dictionary ) ; unset ( $ overrides [ 'name' ] ) ; } return new ExtendedDictionaryDefinition ( $ name , $ configuration , $ overrides ) ; }
Make the passed value a valid dictionary.

@param Configuration $configuration The configuration.
@param string|array  $dictionary    The dictionary.
@param array         $overrides     The values to be overridden.
@param string        $path          The path for exceptions.

@return ExtendedDictionaryDefinition

@throws \InvalidArgumentException When the name key is missing.
Make the passed value a valid dictionary .