Chris@0: Chris@0: * Marcello Duarte Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Prophecy\Doubler\ClassPatch; Chris@0: Chris@0: use Prophecy\Doubler\Generator\Node\ClassNode; Chris@0: Chris@0: /** Chris@0: * Class patch interface. Chris@0: * Class patches extend doubles functionality or help Chris@0: * Prophecy to avoid some internal PHP bugs. Chris@0: * Chris@0: * @author Konstantin Kudryashov Chris@0: */ Chris@0: interface ClassPatchInterface Chris@0: { Chris@0: /** Chris@0: * Checks if patch supports specific class node. Chris@0: * Chris@0: * @param ClassNode $node Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function supports(ClassNode $node); Chris@0: Chris@0: /** Chris@0: * Applies patch to the specific class node. Chris@0: * Chris@0: * @param ClassNode $node Chris@0: * @return void Chris@0: */ Chris@0: public function apply(ClassNode $node); Chris@0: Chris@0: /** Chris@0: * Returns patch priority, which determines when patch will be applied. Chris@0: * Chris@0: * @return int Priority number (higher - earlier) Chris@0: */ Chris@0: public function getPriority(); Chris@0: }