1 | <?php |
||
11 | abstract class HackedFileHasher { |
||
12 | /** |
||
13 | * Returns a hash of the given filename. |
||
14 | * |
||
15 | * Ignores file line endings |
||
16 | */ |
||
17 | public function hash($filename) { |
||
32 | |||
33 | /** |
||
34 | * @param string $filename |
||
35 | * @param string $hash |
||
36 | */ |
||
37 | public function setCache($filename, $hash) { |
||
40 | |||
41 | /** |
||
42 | * @param string $filename |
||
43 | * @return string|false |
||
44 | */ |
||
45 | public function getCache($filename) { |
||
54 | |||
55 | /** |
||
56 | * @param string $filename |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getCacheKey($filename) { |
||
68 | |||
69 | /** |
||
70 | * Compute and return the hash of the given file. |
||
71 | * |
||
72 | * @param string $filename |
||
73 | * A fully-qualified filename to hash. |
||
74 | * |
||
75 | * @return string |
||
76 | * The computed hash of the given file. |
||
77 | */ |
||
78 | abstract public function performHash($filename); |
||
79 | |||
80 | /** |
||
81 | * Compute and return the lines of the given file. |
||
82 | * |
||
83 | * @param string $filename |
||
84 | * A fully-qualified filename to return. |
||
85 | * |
||
86 | * @return array|false |
||
87 | * The lines of the given filename or FALSE on failure. |
||
88 | */ |
||
89 | abstract public function fetchLines($filename); |
||
90 | } |
||
91 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.