Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Symfony\Component\Yaml\Tests\A
  • Symfony\Component\Yaml\Tests\B
  • Symfony\Component\Yaml\Tests\DumperTest
  • Symfony\Component\Yaml\Tests\InlineTest
  • Symfony\Component\Yaml\Tests\ParseExceptionTest
  • Symfony\Component\Yaml\Tests\ParserTest
  • Symfony\Component\Yaml\Tests\YamlTest
  • Overview
  • Namespace
  • Function
  • Tree
 1: <?php
 2: 
 3: namespace Mockery\Generator\StringManipulation\Pass;
 4: 
 5: use Mockery\Generator\MockConfiguration;
 6: 
 7: /**
 8:  * The standard Mockery\Mock class includes some methods to ease mocking, such
 9:  * as __wakeup, however if the target has a final __wakeup method, it can't be
10:  * mocked. This pass removes the builtin methods where they are final on the
11:  * target
12:  */
13: class RemoveBuiltinMethodsThatAreFinalPass
14: {
15:     protected $methods = array(
16:         '__wakeup' => '/public function __wakeup\(\)\s+\{.*?\}/sm',
17:     );
18: 
19:     public function apply($code, MockConfiguration $config)
20:     {
21:         $target = $config->getTargetClass();
22: 
23:         if (!$target) {
24:             return $code;
25:         }
26: 
27:         foreach ($target->getMethods() as $method) {
28:             if ($method->isFinal() && isset($this->methods[$method->getName()])) {
29:                 $code = preg_replace($this->methods[$method->getName()], '', $code);
30:             }
31:         }
32: 
33:         return $code;
34:     }
35: 
36: }
37: 
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen