protected function get_style( $style, $expected_class, callable $get_style, $description ) {
		if ( $style instanceof $expected_class ) {
			$object = $style;
		} else {
			$object = $get_style( $style, $this );
		}

		if ( ! \is_object( $object ) || ! $object instanceof $expected_class ) {
			throw new \DomainException( "Invalid $description style $style." );
		}

		return $object;
	}