createForObjectArgument() public static method

public static createForObjectArgument ( $instance ) : TypeError
return TypeError
Example #1
0
 /**
  * @param string  $reference
  * @param object $instance
  */
 public function __construct(string $reference, $instance)
 {
     if (false === is_object($instance)) {
         throw TypeErrorFactory::createForObjectArgument($instance);
     }
     $this->reference = $reference;
     $this->instance = $instance;
 }