     /// refer to ``StartAdvertisingResult` documentation.
     ///
     /// There can be only one ongoing advertising (CoreBluetooth limit).
-    /// It will return `advertisingInProgress` error if this method will be called when
+    /// It will return `advertisingInProgress` error if this method is called when
     /// it is already advertising.
     ///
     /// Advertising is automatically stopped just after disposing of the subscription.
     ///
-    /// It can return `BluetoothError.advertisingStartFailed` error when start advertisement failed
+    /// It can return `BluetoothError.advertisingStartFailed` error, when start advertisement failed
     ///
     /// - parameter advertisementData: Services of peripherals to search for. Nil value will accept all peripherals.
     /// - returns: Infinite observable which emit `StartAdvertisingResult` when advertisement started.


    #if os(iOS) || os(tvOS) || os(watchOS)

    /// Starts publishing L2CAP channel on subscription. It create inifinite observable
    /// which emits only one next value, of `CBL2CAPPSM` type, just
    /// after L2CAP channel has been published.
    ///

import CoreBluetooth
import RxSwift

/// PeripheralManager is a class implementing ReactiveX API which wraps all the Core Bluetooth Peripheral's functions, that allow to
/// advertise, to publish L2CAP channels and more.
/// You can start using this class by adding services and starting advertising.
/// Before calling any public `PeripheralManager`'s functions you should make sure that Bluetooth is turned on and powered on. It can be done
/// by `observeState()`, observing it's value and then chaining it with `add(_:)` with `startAdvertising(_:)`:
/// ```
/// let disposable = centralManager.observeState
///     .startWith(centralManager.state)
