Test Setup Failed
Push — master ( 158e66...feb506 )
by Xu
04:19
created
src/notifications/channels/AliyunCloudPushChannel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
          */
56 56
         $message = $notification->exportFor('aliyunCloudPush');
57 57
         $appRecipient = $recipient->routeNotificationFor('aliyunCloudPush');
58
-        if($message->validate()){
58
+        if ($message->validate()) {
59 59
             $this->aliyun->getCloudPush()->pushNoticeToAndroid([
60 60
                 'AppKey' => $this->appKey,
61 61
                 'Target' => $appRecipient['target'],
62 62
                 'TargetValue' => $appRecipient['targetValue'],
63 63
                 'Title' => $message->title,
64 64
                 'Body' => $message->body,
65
-                'ExtParameters' => Json::encode($message->extParameters),//JSON
65
+                'ExtParameters' => Json::encode($message->extParameters), //JSON
66 66
             ]);
67 67
         } else {
68 68
             print_r($message->getErrors());
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             'ApnsEnv' => YII_ENV_DEV ? 'DEV' : 'PRODUCT',
76 76
             'Title' => $message->title,
77 77
             'Body' => $message->body,
78
-            'ExtParameters' => Json::encode($message->extParameters),//JSON
78
+            'ExtParameters' => Json::encode($message->extParameters), //JSON
79 79
         ]);
80 80
 
81 81
         $this->aliyun->getCloudPush()->push([
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
             'TargetValue' => $appRecipient['targetValue'],
85 85
             'DeviceType' => 'ALL',
86 86
             'Title' => $message->title,
87
-            'PushType' => 'NOTICE',//表示通知
87
+            'PushType' => 'NOTICE', //表示通知
88 88
             'Body' => $message->body,
89 89
             'StoreOffline' => 'true',
90 90
             //'ExpireTime' => 'YYYY-MM-DDThh:mm:ssZ',
91
-            'ExtParameters' => Json::encode($message->extParameters),//JSON
91
+            'ExtParameters' => Json::encode($message->extParameters), //JSON
92 92
         ]);
93 93
     }
94 94
 }
95 95
\ No newline at end of file
Please login to merge, or discard this patch.