GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( d0cd46...a518ec )
by Regan
10s
created

src/SlackServiceProviderLaravel4.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Maknz\Slack;
4
5
use Illuminate\Support\ServiceProvider;
6
use GuzzleHttp\Client as Guzzle;
7
8
class SlackServiceProviderLaravel4 extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application events.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->package('maknz/slack', null, __DIR__);
18
    }
19
20
    /**
21
     * Register the service provider.
22
     *
23
     * @return void
24
     */
25
    public function register()
26
    {
27
        $this->app['maknz.slack'] = $this->app->share(function ($app) {
28
            $allow_markdown = $app['config']->get('slack::allow_markdown');
29
30
            $markdown_in_attachments = $app['config']->get('slack::markdown_in_attachments');
31
32
            $unfurl_media = $app['config']->get('slack::unfurl_media');
33
34
            return new Client(
35
                $app['config']->get('slack::endpoint'),
36
                [
37
                    'channel' => $app['config']->get('slack::channel'),
38
                    'username' => $app['config']->get('slack::username'),
39
                    'icon' => $app['config']->get('slack::icon'),
40
                    'link_names' => $app['config']->get('slack::link_names'),
41
                    'unfurl_links' => $app['config']->get('slack::unfurl_links'),
42
                    'unfurl_media' => is_bool($unfurl_media) ? $unfurl_media : true,
43
                    'allow_markdown' => is_bool($allow_markdown) ? $allow_markdown : true,
44
                    'markdown_in_attachments' => is_array($markdown_in_attachments) ? $markdown_in_attachments : [],
45
                ],
46
                new Guzzle
47
            );
48
        });
49
50
        $this->app->bind('Maknz\Slack\Client', 'maknz.slack');
0 ignored issues
show
The method bind cannot be called on $this->app (of type array<string,?,{"maknz.slack":"?"}>).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
51
    }
52
}
53