src/MockHelper.php
protected function prepareMockConfig(array &$config = [])
    {
        if (!isset($config['willReturn'])) {
            $config['willReturn'] = [];
        }

        if (!empty($config['methods']) && is_array($config['methods'])) {
            $methodNames = [];
            foreach ($config['methods'] as $key => $value) {
                $methodNames[] = is_numeric($key) ? $value : $key;
                if (!is_numeric($key)) {
                    $config['willReturn'][$key] = $value;
                }
            }
            $config['methods'] = $methodNames;
        }

        if (!isset($config['will'])) {
            $config['will'] = [];
        }

        if(isset($config['constructor'], $config['disableOriginalConstructor'])) {
            unset($config['constructor']);
        }

        if (isset($config['constructor'])) {
            $config['disableOriginalConstructor'] = !$config['constructor'];
            unset($config['constructor']);
        }
    }
protected function prepareMockConfig(array &$config = [])
    {
        if (!isset($config['willReturn'])) {
            $config['willReturn'] = [];
        }

        if (!empty($config['methods']) && is_array($config['methods'])) {
            $methodNames = [];
            foreach ($config['methods'] as $key => $value) {
                $methodNames[] = is_numeric($key) ? $value : $key;
                if (!is_numeric($key)) {
                    $config['willReturn'][$key] = $value;
                }
            }
            $config['methods'] = $methodNames;
        }

        if (!isset($config['will'])) {
            $config['will'] = [];
        }

        if(isset($config['constructor'], $config['disableOriginalConstructor'])) {
            unset($config['constructor']);
        }

        if (isset($config['constructor'])) {
            $config['disableOriginalConstructor'] = !$config['constructor'];
            unset($config['constructor']);
        }
    }
protected function prepareMockConfig ( array & $ config = [ ] ) { if ( ! isset ( $ config [ 'willReturn' ] ) ) { $ config [ 'willReturn' ] = [ ] ; } if ( ! empty ( $ config [ 'methods' ] ) && is_array ( $ config [ 'methods' ] ) ) { $ methodNames = [ ] ; foreach ( $ config [ 'methods' ] as $ key => $ value ) { $ methodNames [ ] = is_numeric ( $ key ) ? $ value : $ key ; if ( ! is_numeric ( $ key ) ) { $ config [ 'willReturn' ] [ $ key ] = $ value ; } } $ config [ 'methods' ] = $ methodNames ; } if ( ! isset ( $ config [ 'will' ] ) ) { $ config [ 'will' ] = [ ] ; } if ( isset ( $ config [ 'constructor' ] , $ config [ 'disableOriginalConstructor' ] ) ) { unset ( $ config [ 'constructor' ] ) ; } if ( isset ( $ config [ 'constructor' ] ) ) { $ config [ 'disableOriginalConstructor' ] = ! $ config [ 'constructor' ] ; unset ( $ config [ 'constructor' ] ) ; } }
Index keys of the item "setMethods" using its values

@param array $config
Index keys of the item setMethods using its values