for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of GitterBot package.
*
* @author Serafim <[email protected]>
* @date 09.04.2016 3:09
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Core\Providers;
use Gitter\Client;
use Illuminate\Config\Repository;
use Illuminate\Container\Container;
use Illuminate\Support\ServiceProvider;
* Class GitterClientServiceProvider
* @package Core\Providers
class GitterClientServiceProvider extends ServiceProvider
{
public function register()
/** @var Repository $config */
$config = $this->app->make(Repository::class);
$this->app->singleton(Client::class, function (Container $app) use ($config) {
$app
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return new Client($config->get('gitter.token'));
});
$this->app->singleton('bot', function (Container $app) {
/** @var Client $client */
$client = $app->make(Client::class);
return $client->http->getCurrentUser()->wait();
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.