@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 8:27 |
|
| 7 | - * |
|
| 8 | - * For the full copyright and license information, please view the LICENSE |
|
| 9 | - * file that was distributed with this source code. |
|
| 10 | - */ |
|
| 3 | + * This file is part of GitterBot package. |
|
| 4 | + * |
|
| 5 | + * @author Serafim <[email protected]> |
|
| 6 | + * @date 11.10.2015 8:27 |
|
| 7 | + * |
|
| 8 | + * For the full copyright and license information, please view the LICENSE |
|
| 9 | + * file that was distributed with this source code. |
|
| 10 | + */ |
|
| 11 | 11 | namespace App\Gitter\Subscriber; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 8:26 |
|
| 7 | - * |
|
| 8 | - * For the full copyright and license information, please view the LICENSE |
|
| 9 | - * file that was distributed with this source code. |
|
| 10 | - */ |
|
| 3 | + * This file is part of GitterBot package. |
|
| 4 | + * |
|
| 5 | + * @author Serafim <[email protected]> |
|
| 6 | + * @date 11.10.2015 8:26 |
|
| 7 | + * |
|
| 8 | + * For the full copyright and license information, please view the LICENSE |
|
| 9 | + * file that was distributed with this source code. |
|
| 10 | + */ |
|
| 11 | 11 | namespace App\Gitter\Subscriber; |
| 12 | 12 | |
| 13 | 13 | use Illuminate\Contracts\Container\Container; |
@@ -41,14 +41,14 @@ |
||
| 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'); |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 6:09 |
|
| 7 | - * |
|
| 8 | - * For the full copyright and license information, please view the LICENSE |
|
| 9 | - * file that was distributed with this source code. |
|
| 10 | - */ |
|
| 3 | + * This file is part of GitterBot package. |
|
| 4 | + * |
|
| 5 | + * @author Serafim <[email protected]> |
|
| 6 | + * @date 11.10.2015 6:09 |
|
| 7 | + * |
|
| 8 | + * For the full copyright and license information, please view the LICENSE |
|
| 9 | + * file that was distributed with this source code. |
|
| 10 | + */ |
|
| 11 | 11 | namespace App\Gitter\Achieve; |
| 12 | 12 | |
| 13 | 13 | use App\User; |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 6:08 |
|
| 7 | - * |
|
| 8 | - * For the full copyright and license information, please view the LICENSE |
|
| 9 | - * file that was distributed with this source code. |
|
| 10 | - */ |
|
| 3 | + * This file is part of GitterBot package. |
|
| 4 | + * |
|
| 5 | + * @author Serafim <[email protected]> |
|
| 6 | + * @date 11.10.2015 6:08 |
|
| 7 | + * |
|
| 8 | + * For the full copyright and license information, please view the LICENSE |
|
| 9 | + * file that was distributed with this source code. |
|
| 10 | + */ |
|
| 11 | 11 | namespace App\Gitter\Achieve; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $this->headers['Connection'] = 'Keep-Alive'; |
| 87 | 87 | |
| 88 | - $this->buffer->subscribe(function ($message) { |
|
| 88 | + $this->buffer->subscribe(function($message) { |
|
| 89 | 89 | $message = trim($message); |
| 90 | 90 | |
| 91 | 91 | if ($message) { |
@@ -117,20 +117,20 @@ discard block |
||
| 117 | 117 | ->getHttpClient() |
| 118 | 118 | ->request($this->method, $this->url, $this->headers); |
| 119 | 119 | |
| 120 | - $request->on('response', function (Response $response) { |
|
| 121 | - $response->on('data', function ($data, Response $response) { |
|
| 120 | + $request->on('response', function(Response $response) { |
|
| 121 | + $response->on('data', function($data, Response $response) { |
|
| 122 | 122 | $data = (string)$data; |
| 123 | 123 | $this->events->fire(static::EVENT_CHUNK, [$this, $data, $response]); |
| 124 | 124 | $this->buffer->add($data); |
| 125 | 125 | }); |
| 126 | 126 | }); |
| 127 | 127 | |
| 128 | - $request->on('end', function () { |
|
| 128 | + $request->on('end', function() { |
|
| 129 | 129 | $this->buffer->clear(); |
| 130 | 130 | $this->events->fire(static::EVENT_END, [$this]); |
| 131 | 131 | }); |
| 132 | 132 | |
| 133 | - $request->on('error', function ($exception) { |
|
| 133 | + $request->on('error', function($exception) { |
|
| 134 | 134 | $this->events->fire(static::EVENT_ERROR, [$this, $exception]); |
| 135 | 135 | }); |
| 136 | 136 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 09.10.2015 16:56 |
|
| 7 | - * |
|
| 8 | - * For the full copyright and license information, please view the LICENSE |
|
| 9 | - * file that was distributed with this source code. |
|
| 10 | - */ |
|
| 3 | + * This file is part of GitterBot package. |
|
| 4 | + * |
|
| 5 | + * @author Serafim <[email protected]> |
|
| 6 | + * @date 09.10.2015 16:56 |
|
| 7 | + * |
|
| 8 | + * For the full copyright and license information, please view the LICENSE |
|
| 9 | + * file that was distributed with this source code. |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | namespace App\Mappers; |
| 13 | 13 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | $user = static::where('gitter_id', $values['gitter_id'])->first(); |
| 42 | 42 | if (!$user) { |
| 43 | - $user = static::unguarded(function () use ($values) { |
|
| 43 | + $user = static::unguarded(function() use ($values) { |
|
| 44 | 44 | return static::create($values); |
| 45 | 45 | }); |
| 46 | 46 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public function map(Router $router) |
| 39 | 39 | { |
| 40 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 40 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 41 | 41 | require app_path('Http/routes.php'); |
| 42 | 42 | }); |
| 43 | 43 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | parent::boot(); |
| 71 | 71 | |
| 72 | - static::creating(function (Achieve $achieve) { |
|
| 72 | + static::creating(function(Achieve $achieve) { |
|
| 73 | 73 | if (!$achieve->created_at) { |
| 74 | 74 | $achieve->created_at = $achieve->freshTimestamp(); |
| 75 | 75 | } |