ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.145.154.194 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/mockery/mockery/library/Mockery/Generator/ |
Upload File : |
<?php /** * Mockery * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://github.com/padraic/mockery/blob/master/LICENSE * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to padraic@php.net so we can send you a copy immediately. * * @category Mockery * @package Mockery * @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com) * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License */ namespace Mockery\Generator; use Mockery\Generator\StringManipulation\Pass\CallTypeHintPass; use Mockery\Generator\StringManipulation\Pass\ClassNamePass; use Mockery\Generator\StringManipulation\Pass\ClassPass; use Mockery\Generator\StringManipulation\Pass\ConstantsPass; use Mockery\Generator\StringManipulation\Pass\InstanceMockPass; use Mockery\Generator\StringManipulation\Pass\InterfacePass; use Mockery\Generator\StringManipulation\Pass\MagicMethodTypeHintsPass; use Mockery\Generator\StringManipulation\Pass\MethodDefinitionPass; use Mockery\Generator\StringManipulation\Pass\Pass; use Mockery\Generator\StringManipulation\Pass\RemoveBuiltinMethodsThatAreFinalPass; use Mockery\Generator\StringManipulation\Pass\RemoveDestructorPass; use Mockery\Generator\StringManipulation\Pass\RemoveUnserializeForInternalSerializableClassesPass; use Mockery\Generator\StringManipulation\Pass\TraitPass; use Mockery\Generator\StringManipulation\Pass\AvoidMethodClashPass; class StringManipulationGenerator implements Generator { protected $passes = array(); /** * Creates a new StringManipulationGenerator with the default passes * * @return StringManipulationGenerator */ public static function withDefaultPasses() { return new static([ new CallTypeHintPass(), new MagicMethodTypeHintsPass(), new ClassPass(), new TraitPass(), new ClassNamePass(), new InstanceMockPass(), new InterfacePass(), new AvoidMethodClashPass(), new MethodDefinitionPass(), new RemoveUnserializeForInternalSerializableClassesPass(), new RemoveBuiltinMethodsThatAreFinalPass(), new RemoveDestructorPass(), new ConstantsPass(), ]); } public function __construct(array $passes) { $this->passes = $passes; } public function generate(MockConfiguration $config) { $code = file_get_contents(__DIR__ . '/../Mock.php'); $className = $config->getName() ?: $config->generateName(); $namedConfig = $config->rename($className); foreach ($this->passes as $pass) { $code = $pass->apply($code, $namedConfig); } return new MockDefinition($namedConfig, $code); } public function addPass(Pass $pass) { $this->passes[] = $pass; } }