private function discoverEditor() : string
    {
        $editor = getenv('EDITOR');

        if ($editor) {
            return $editor;
        }

        return isset($_SERVER['OS']) && false !== strpos($_SERVER['OS'], 'indows')
            ? 'notepad'
            : 'vi';
    }
private function discoverEditor() : string
    {
        $editor = getenv('EDITOR');

        if ($editor) {
            return $editor;
        }

        return isset($_SERVER['OS']) && false !== strpos($_SERVER['OS'], 'indows')
            ? 'notepad'
            : 'vi';
    }
private function discoverEditor ( ) : string { $ editor = getenv ( 'EDITOR' ) ; if ( $ editor ) { return $ editor ; } return isset ( $ _SERVER [ 'OS' ] ) && false !== strpos ( $ _SERVER [ 'OS' ] , 'indows' ) ? 'notepad' : 'vi' ; }
Determines the system editor command and returns it.

Checks for the $EDITOR env variable, returning its value if present.

If not, it checks to see if we are on a Windows or other type of system,
returning "notepad" or "vi", respecively.
Determines the system editor command and returns it .