protected function buildData($topic, $message, $isCondition)
    {
        $condition = $isCondition ? ['condition' => $topic] : ['to' => '/topics/' . $topic];

        return array_merge($condition, $this->buildMessage($message));
    }
protected function buildData($topic, $message, $isCondition)
    {
        $condition = $isCondition ? ['condition' => $topic] : ['to' => '/topics/' . $topic];

        return array_merge($condition, $this->buildMessage($message));
    }
protected function buildData ( $ topic , $ message , $ isCondition ) { $ condition = $ isCondition ? [ 'condition' => $ topic ] : [ 'to' => '/topics/' . $ topic ] ; return array_merge ( $ condition , $ this -> buildMessage ( $ message ) ) ; }
Prepare the data to be sent

@param $topic
@param $message
@param $isCondition
@return array
Prepare the data to be sent