| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class NetlifyBuildHook |
||
| 8 | { |
||
| 9 | /** @var \GuzzleHttp\Client */ |
||
| 10 | protected $client; |
||
| 11 | protected $id; |
||
| 12 | protected $branch; |
||
| 13 | protected $title; |
||
| 14 | const BASE_URL = 'https://api.netlify.com/build_hooks/'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param \GuzzleHttp\Client $client HTTP Client that'll trigger the hook |
||
| 18 | * @param string $id string Hook identifier |
||
| 19 | * @param string? $branch The branch that should be used for the build |
||
|
|
|||
| 20 | * @param string? $title The title for the deploy message on Netlify |
||
| 21 | */ |
||
| 22 | public function __construct(Client $client, string $id, $title = null, $branch = null) |
||
| 28 | } |
||
| 29 | |||
| 30 | public function trigger() : void |
||
| 39 | } |