@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function handle() |
41 | 41 | { |
42 | - Karma::created(function (Karma $karma) { |
|
42 | + Karma::created(function(Karma $karma) { |
|
43 | 43 | |
44 | 44 | $count = $karma->target->karma->count(); |
45 | 45 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | */ |
78 | 78 | public function handle() |
79 | 79 | { |
80 | - Achieve::created(function (Achieve $achieve) { |
|
80 | + Achieve::created(function(Achieve $achieve) { |
|
81 | 81 | $room = \App::make(Room::class); |
82 | 82 | |
83 | 83 | $room->write( |
@@ -84,7 +84,7 @@ |
||
84 | 84 | */ |
85 | 85 | protected function makePidFile() |
86 | 86 | { |
87 | - $this->pid = storage_path('pids/' . date('Y_m_d_tis_') . microtime(1) . '.pid'); |
|
87 | + $this->pid = storage_path('pids/'.date('Y_m_d_tis_').microtime(1).'.pid'); |
|
88 | 88 | file_put_contents($this->pid, getmypid()); |
89 | 89 | } |
90 | 90 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $this->stop(); |
78 | 78 | break; |
79 | 79 | default: |
80 | - throw new \InvalidArgumentException('Action ' . $action . ' not found'); |
|
80 | + throw new \InvalidArgumentException('Action '.$action.' not found'); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | protected function start() |
88 | 88 | { |
89 | 89 | foreach ($this->config->get('gitter.rooms') as $key => $id) { |
90 | - shell_exec('nohup php artisan gitter:listen ' . $key . ' > /dev/null 2>&1 &'); |
|
90 | + shell_exec('nohup php artisan gitter:listen '.$key.' > /dev/null 2>&1 &'); |
|
91 | 91 | |
92 | - $this->line('Starting ' . $key . ' => ' . $id . ' listener.'); |
|
92 | + $this->line('Starting '.$key.' => '.$id.' listener.'); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | foreach ($finder as $file) { |
107 | 107 | $pid = file_get_contents($file->getRealpath()); |
108 | - shell_exec('kill ' . $pid); |
|
108 | + shell_exec('kill '.$pid); |
|
109 | 109 | unlink($file->getRealpath()); |
110 | 110 | } |
111 | 111 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | } else { |
53 | - $this->answer($message, $message->text_without_special_chars . '?'); |
|
53 | + $this->answer($message, $message->text_without_special_chars.'?'); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | protected function answer(Message $message, $text) |
72 | 72 | { |
73 | 73 | $this->lastAnswer = $text; |
74 | - $message->italic(sprintf('@%s, ' . $text, $this->user->login)); |
|
74 | + $message->italic(sprintf('@%s, '.$text, $this->user->login)); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | \ No newline at end of file |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | public static function make($token, $roomId) |
42 | 42 | { |
43 | 43 | $client = new Client($token); |
44 | - App::singleton(Client::class, function () use ($client) { |
|
44 | + App::singleton(Client::class, function() use ($client) { |
|
45 | 45 | return $client; |
46 | 46 | }); |
47 | 47 | App::alias(Client::class, 'gitter'); |
48 | 48 | |
49 | 49 | |
50 | 50 | $room = new Room($roomId); |
51 | - App::singleton(Room::class, function () use ($room) { |
|
51 | + App::singleton(Room::class, function() use ($room) { |
|
52 | 52 | return $room; |
53 | 53 | }); |
54 | 54 | App::alias(Room::class, 'room'); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | return [ |
141 | 141 | 'Content-Type' => 'application/json', |
142 | 142 | 'Accept' => 'application/json', |
143 | - 'Authorization' => 'Bearer ' . $this->token, |
|
143 | + 'Authorization' => 'Bearer '.$this->token, |
|
144 | 144 | ]; |
145 | 145 | } |
146 | 146 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | // TODO Add support for non-latin domains |
93 | 93 | // Current RFC 1738 |
94 | 94 | $pattern = static::getPattern(); |
95 | - preg_match_all($pattern, $text . ' ', $matches, PREG_PATTERN_ORDER); |
|
95 | + preg_match_all($pattern, $text.' ', $matches, PREG_PATTERN_ORDER); |
|
96 | 96 | |
97 | 97 | return $matches[1]; |
98 | 98 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | { |
93 | 93 | $karma = $this->karma->count(); |
94 | 94 | |
95 | - return ($karma > 0 ? '+' : '') . $karma; |
|
95 | + return ($karma > 0 ? '+' : '').$karma; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | public function code($code, $lang = '') |
135 | 135 | { |
136 | 136 | return $this->answer( |
137 | - '```' . $lang . "\n" . $code . "\n" . '```' |
|
137 | + '```'.$lang."\n".$code."\n".'```' |
|
138 | 138 | ); |
139 | 139 | } |
140 | 140 | |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | $strings = explode("\n", $text); |
168 | 168 | foreach ($strings as $string) { |
169 | 169 | $result[] = |
170 | - $symbol . |
|
171 | - str_replace($symbol, '\\' . $symbol, trim($string)) . |
|
170 | + $symbol. |
|
171 | + str_replace($symbol, '\\'.$symbol, trim($string)). |
|
172 | 172 | $symbol; |
173 | 173 | } |
174 | 174 |