src/Route.php
public function conditions($conditions = null) {
        if ($this->conditions === null) {
            $this->conditions = [];
        }

        if (is_array($conditions)) {
            $conditions = array_change_key_case($conditions);

            $this->conditions = array_replace(
                $this->conditions,
                $conditions
            );
            return $this;
        }

        return $this->conditions;
    }
public function conditions($conditions = null) {
        if ($this->conditions === null) {
            $this->conditions = [];
        }

        if (is_array($conditions)) {
            $conditions = array_change_key_case($conditions);

            $this->conditions = array_replace(
                $this->conditions,
                $conditions
            );
            return $this;
        }

        return $this->conditions;
    }
Gets or sets the route's conditions.

@param array|null $conditions An array of conditions to set.
@return Route|array