public function setDefault($theme) : Theme
    {
        if ($theme instanceof Theme) {
            $default = $theme;
        } elseif ($this->has($theme)) {
            $default = $this->get($theme);
        }

        if (!isset($default)) {
            throw new NullValueException("Cannot set default theme when theme does not exist");
        }

        if (!$default->verified()) {
            throw new \InvalidArgumentException("Cannot set default theme to an unverified theme");
        }

        return $this->default = $default;
    }
public function setDefault($theme) : Theme
    {
        if ($theme instanceof Theme) {
            $default = $theme;
        } elseif ($this->has($theme)) {
            $default = $this->get($theme);
        }

        if (!isset($default)) {
            throw new NullValueException("Cannot set default theme when theme does not exist");
        }

        if (!$default->verified()) {
            throw new \InvalidArgumentException("Cannot set default theme to an unverified theme");
        }

        return $this->default = $default;
    }
public function setDefault ( $ theme ) : Theme { if ( $ theme instanceof Theme ) { $ default = $ theme ; } elseif ( $ this -> has ( $ theme ) ) { $ default = $ this -> get ( $ theme ) ; } if ( ! isset ( $ default ) ) { throw new NullValueException ( "Cannot set default theme when theme does not exist" ) ; } if ( ! $ default -> verified ( ) ) { throw new \ InvalidArgumentException ( "Cannot set default theme to an unverified theme" ) ; } return $ this -> default = $ default ; }
Set default theme

@param string $theme
@return \Laranix\Themer\Theme
@throws \Laranix\Support\Exception\NullValueException
Set default theme