diff options
| author | Andrew <andrewdimola@gmail.com> | 2022-07-10 23:06:24 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-10 23:06:24 -0400 | 
| commit | 52cec041d09776207f352f35c3b437a5f678050b (patch) | |
| tree | fc773ae94d18e34173a38f667a40d584082f625f /hack.html.markdown | |
| parent | cbe2e63882afe937311e84b28c252df5d418f45d (diff) | |
Update function names
Follow best practices (function should be snake case [do_task()], and methods should be camel case [doTask()])
Diffstat (limited to 'hack.html.markdown')
| -rw-r--r-- | hack.html.markdown | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/hack.html.markdown b/hack.html.markdown index 8e2d4b19..95fd9b52 100644 --- a/hack.html.markdown +++ b/hack.html.markdown @@ -79,14 +79,14 @@ namespace LearnHackinYMinutes {      // Use `arraykey` to represent either an integer or string.      $the_answer = 42; -    $is_answer = processKey($the_answer); +    $is_answer = process_key($the_answer);      // Similarily, `num` represents either an int or float.      $lucky_number = 7;      $lucky_square = calculate_square($lucky_number);    } -  function processKey(arraykey $the_answer): bool { +  function process_key(arraykey $the_answer): bool {      if ($the_answer is int) {        return true;      } else { @@ -217,7 +217,7 @@ namespace LearnHackinYMinutes {    // As another example, `__Memoize` caches the result of a function.    <<__Memoize>> -  function doExpensiveTask(): ?string { +  function do_expensive_task(): ?string {      // return file_get_contents('http://hacklang.org');      return "dynamic string with contents from hacklang.org";    } | 
