@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * |
37 | 37 | */ |
38 | - public function setAccessToken(){ |
|
38 | + public function setAccessToken() { |
|
39 | 39 | $this->accessToken = $this->config['token']; |
40 | 40 | } |
41 | 41 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * @return string |
57 | 57 | */ |
58 | - public function getRobotUrl(){ |
|
58 | + public function getRobotUrl() { |
|
59 | 59 | return $this->hookUrl . "?access_token={$this->accessToken}"; |
60 | 60 | } |
61 | 61 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @param $config |
26 | 26 | * @param SendClient $client |
27 | 27 | */ |
28 | - public function __construct($config,$client = null) |
|
28 | + public function __construct($config, $client = null) |
|
29 | 29 | { |
30 | 30 | $this->config = $config; |
31 | 31 | $this->client = $client; |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | * @param string $robot |
37 | 37 | * @return $this |
38 | 38 | */ |
39 | - public function with($robot = 'default'){ |
|
39 | + public function with($robot = 'default') { |
|
40 | 40 | $this->robot = $robot; |
41 | - $this->dingTalkService = new DingTalkService($this->config[$robot],$this->client); |
|
41 | + $this->dingTalkService = new DingTalkService($this->config[$robot], $this->client); |
|
42 | 42 | return $this; |
43 | 43 | } |
44 | 44 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @param string $content |
48 | 48 | * @return mixed |
49 | 49 | */ |
50 | - public function text($content = ''){ |
|
50 | + public function text($content = '') { |
|
51 | 51 | return $this->dingTalkService |
52 | 52 | ->setTextMessage($content) |
53 | 53 | ->send(); |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | * @param $text |
59 | 59 | * @return mixed |
60 | 60 | */ |
61 | - public function action($title, $text){ |
|
61 | + public function action($title, $text) { |
|
62 | 62 | return $this->dingTalkService |
63 | - ->setActionCardMessage($title,$text); |
|
63 | + ->setActionCardMessage($title, $text); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | * @param bool $atAll |
69 | 69 | * @return $this |
70 | 70 | */ |
71 | - public function at($mobiles = [], $atAll = false){ |
|
71 | + public function at($mobiles = [], $atAll = false) { |
|
72 | 72 | $this->dingTalkService |
73 | - ->setAt($mobiles,$atAll); |
|
73 | + ->setAt($mobiles, $atAll); |
|
74 | 74 | return $this; |
75 | 75 | } |
76 | 76 | |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | * @param string $picUrl |
82 | 82 | * @return mixed |
83 | 83 | */ |
84 | - public function link($title, $text, $url, $picUrl = ''){ |
|
84 | + public function link($title, $text, $url, $picUrl = '') { |
|
85 | 85 | return $this->dingTalkService |
86 | - ->setLinkMessage($title,$text,$url,$picUrl) |
|
86 | + ->setLinkMessage($title, $text, $url, $picUrl) |
|
87 | 87 | ->send(); |
88 | 88 | } |
89 | 89 | |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | * @param $markdown |
93 | 93 | * @return mixed |
94 | 94 | */ |
95 | - public function markdown($title, $markdown){ |
|
95 | + public function markdown($title, $markdown) { |
|
96 | 96 | return $this->dingTalkService |
97 | - ->setMarkdownMessage($title,$markdown) |
|
97 | + ->setMarkdownMessage($title, $markdown) |
|
98 | 98 | ->send(); |
99 | 99 | } |
100 | 100 | |
@@ -105,15 +105,15 @@ discard block |
||
105 | 105 | * @param int $btnOrientation |
106 | 106 | * @return mixed |
107 | 107 | */ |
108 | - public function actionCard($title, $markdown, $hideAvatar = 0, $btnOrientation = 0){ |
|
108 | + public function actionCard($title, $markdown, $hideAvatar = 0, $btnOrientation = 0) { |
|
109 | 109 | return $this->dingTalkService |
110 | - ->setActionCardMessage($title,$markdown,$hideAvatar,$btnOrientation); |
|
110 | + ->setActionCardMessage($title, $markdown, $hideAvatar, $btnOrientation); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
114 | 114 | * @return mixed |
115 | 115 | */ |
116 | - public function feed(){ |
|
116 | + public function feed() { |
|
117 | 117 | return $this->dingTalkService |
118 | 118 | ->setFeedCardMessage(); |
119 | 119 | } |