code: static function findConfigFile($filename, $cwd)
      {
          if (!is_dir($cwd)) {
              throw new \InvalidArgumentException(sprintf(
                  '%s is not a directory', $cwd
              ));
          }
  
          # Look for the definition name in the $cwd
          # until one is found.
          while (!$rp = realpath("$cwd/$filename")) {
              # Go up the hierarchy
              $cwd .= '/..';
  
              # We are at the filesystem boundary if there's
              # nothing to go up to.
              if (realpath($cwd) === false) {
                  break;
              }
          }
  
          return $rp;
      }
docs: # False if the file was not found.