Skip to content

Instantly share code, notes, and snippets.

@thiagomarini
Last active November 1, 2017 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thiagomarini/36399b2b0a5eb418f173b73859e9691b to your computer and use it in GitHub Desktop.
Save thiagomarini/36399b2b0a5eb418f173b73859e9691b to your computer and use it in GitHub Desktop.
Example of interface with methods receiving
<?php
/**
* The implementation will know how to deal with RoyalMail, DHL, DPD etc...
*/
interface CarrierServices
{
/**
* @param LabelRequest $labelRequest
* @return LabelResponse
* @throws CarrierException
*/
public function createLabel(LabelRequest $labelRequest): LabelResponse;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment