1 | <?php |
||
26 | class PHP implements Action |
||
27 | { |
||
28 | /** |
||
29 | * Execute the configured action. |
||
30 | * |
||
31 | * @param \SebastianFeldmann\CaptainHook\Config $config |
||
32 | * @param \SebastianFeldmann\CaptainHook\Console\IO $io |
||
33 | * @param \SebastianFeldmann\Git\Repository $repository |
||
34 | * @param \SebastianFeldmann\CaptainHook\Config\Action $action |
||
35 | * @throws \SebastianFeldmann\CaptainHook\Exception\ActionFailed |
||
36 | */ |
||
37 | 7 | public function execute(Config $config, IO $io, Repository $repository, Config\Action $action) |
|
54 | |||
55 | /** |
||
56 | * Execute static method call and return its output. |
||
57 | * |
||
58 | * @param string $class |
||
59 | * @return string |
||
60 | */ |
||
61 | 3 | protected function executeStatic(string $class) : string |
|
74 | |||
75 | /** |
||
76 | * Create an action instance. |
||
77 | * |
||
78 | * @param string $class |
||
79 | * @return \SebastianFeldmann\CaptainHook\Hook\Action |
||
80 | * @throws \SebastianFeldmann\CaptainHook\Exception\ActionFailed |
||
81 | */ |
||
82 | 4 | protected function createAction(string $class) : Action |
|
92 | |||
93 | /** |
||
94 | * Is this a static method call. |
||
95 | * |
||
96 | * @param string $class |
||
97 | * @return bool |
||
98 | */ |
||
99 | 7 | protected function isStaticMethodCall(string $class) : bool |
|
103 | } |
||
104 |