Вход Регистрация
Файл: src/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php
Строк: 28
<?php

namespace MockeryGeneratorStringManipulationPass;

use 
MockeryGeneratorMockConfiguration;

class 
InterfacePass implements Pass
{
    public function 
apply($code, MockConfiguration $config)
    {
        
$interfaces = array_reduce((array) $config->getTargetInterfaces(), function ($code, $i) {
            return 
$code . ", \" . $i->getName();
        }, "");

        
$code = str_replace(
            "
implements MockInterface",
            "
implements MockInterface" . $interfaces,
            
$code
        );

        return 
$code;
    }
}
Онлайн: 1
Реклама