4 * This file is part of the Prophecy.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6 * Marcello Duarte <marcello.duarte@gmail.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Prophecy\Doubler\ClassPatch;
14 use Prophecy\Doubler\Generator\Node\ClassNode;
17 * Class patch interface.
18 * Class patches extend doubles functionality or help
19 * Prophecy to avoid some internal PHP bugs.
21 * @author Konstantin Kudryashov <ever.zet@gmail.com>
23 interface ClassPatchInterface
26 * Checks if patch supports specific class node.
28 * @param ClassNode $node
32 public function supports(ClassNode $node);
35 * Applies patch to the specific class node.
37 * @param ClassNode $node
40 public function apply(ClassNode $node);
43 * Returns patch priority, which determines when patch will be applied.
45 * @return int Priority number (higher - earlier)
47 public function getPriority();