| Conditions | 2 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function register() |
||
| 26 | { |
||
| 27 | $this->app['googletagmanager'] = $this->app->share(function ($app) { |
||
| 28 | $googleTagManager = new GoogleTagManager($app['config']->get('googletagmanager::id')); |
||
| 29 | |||
| 30 | if ($app['config']->get('googletagmanager::enabled') === false) { |
||
| 31 | $googleTagManager->disable(); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $googleTagManager; |
||
| 35 | }); |
||
| 36 | |||
| 37 | $this->app->bind('Spatie\GoogleTagManager\GoogleTagManager', 'googletagmanager'); |
||
|
|
|||
| 38 | } |
||
| 39 | |||
| 45 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.