1 | <?php |
||
25 | class CheckLockFile implements Action |
||
26 | { |
||
27 | /** |
||
28 | * Executes the action. |
||
29 | * |
||
30 | * @param \sebastianfeldmann\CaptainHook\Config $config |
||
31 | * @param \sebastianfeldmann\CaptainHook\Console\IO $io |
||
32 | * @param \sebastianfeldmann\CaptainHook\Git\Repository $repository |
||
33 | * @param \sebastianfeldmann\CaptainHook\Config\Action $action |
||
34 | * @throws \Exception |
||
35 | */ |
||
36 | 3 | public function execute(Config $config, IO $io, Repository $repository, Config\Action $action) |
|
48 | |||
49 | /** |
||
50 | * Read the composer.lock file and extract the composer.json hash. |
||
51 | * |
||
52 | * @param string $path |
||
53 | * @return string |
||
54 | */ |
||
55 | 3 | private function getLockFileHash($path) |
|
61 | |||
62 | /** |
||
63 | * Read the composer.json file and create a md5 hash on its contents. |
||
64 | * |
||
65 | * @param string $path |
||
66 | * @return string |
||
67 | */ |
||
68 | 2 | private function getConfigFileHash($path) |
|
72 | |||
73 | /** |
||
74 | * Load a composer file. |
||
75 | * |
||
76 | * @param string $file |
||
77 | * @return \stdClass |
||
78 | * @throws \Exception |
||
79 | */ |
||
80 | 3 | private function loadFile($file) |
|
87 | } |
||
88 |