Phpro\SoapClient\CodeGenerator\Assembler\InterfaceAssembler::canAssemble PHP Method

canAssemble() public method

public canAssemble ( Phpro\SoapClient\CodeGenerator\Context\ContextInterface $context ) : boolean
$context Phpro\SoapClient\CodeGenerator\Context\ContextInterface
return boolean
    public function canAssemble(ContextInterface $context)
    {
        return $context instanceof TypeContext || $context instanceof PropertyContext;
    }

Usage Example

 /**
  * @test
  */
 function it_can_assemble_property_context()
 {
     $assembler = new InterfaceAssembler('MyUsedClass');
     $class = new ClassGenerator('MyType', 'MyNamespace');
     $type = new Type('MyNamespace', 'MyType', []);
     $property = new Property('prop1', 'string');
     $context = new PropertyContext($class, $type, $property);
     $this->assertTrue($assembler->canAssemble($context));
 }
All Usage Examples Of Phpro\SoapClient\CodeGenerator\Assembler\InterfaceAssembler::canAssemble