protected function runMode()
    {
        $mode = self::MODE_NONE;

        // If an extension is given as an argument, that will override other
        // mode options
        if ( $this->options->basePath !== getcwd() )
        {
            $mode |= self::MODE_SINGLE_EXTENSION;
            return $mode;
        }

        if ( $this->options->searchKernelOverride )
        {
            $mode |= self::MODE_KERNEL_OVERRIDE;
            return $mode;
        }

        // If no file selectors are chosen we will default to extension files.
        if ( !$this->options->searchKernelFiles and !$this->options->searchExtensionFiles and !$this->options->searchTestFiles )
        {
            $mode |= self::MODE_EXTENSION;
        }

        if ( $this->options->searchKernelFiles )
        {
            $mode |= self::MODE_KERNEL;
        }

        if ( $this->options->searchExtensionFiles )
        {
            $mode |= self::MODE_EXTENSION;
        }

        if ( $this->options->searchTestFiles )
        {
            $mode |= self::MODE_TESTS;
        }

        return $mode;
    }