protected function calculateMode($mode, $extended)
    {
        if (true === $extended) {
            return self::ALL;
        }

        if (self::READ === $mode) {
            return self::READONLY;
        }

        return self::WRITEONLY;
    }
protected function calculateMode($mode, $extended)
    {
        if (true === $extended) {
            return self::ALL;
        }

        if (self::READ === $mode) {
            return self::READONLY;
        }

        return self::WRITEONLY;
    }
protected function calculateMode ( $ mode , $ extended ) { if ( true === $ extended ) { return self :: ALL ; } if ( self :: READ === $ mode ) { return self :: READONLY ; } return self :: WRITEONLY ; }
calculates the file runtimeEnvironment

@param   string  $mode      opening runtimeEnvironment: r, w, a or x
@param   bool    $extended  true if + was set with opening runtimeEnvironment
@return  int
calculates the file runtimeEnvironment