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.

ZbarQrdecoderServiceProviderLaravel4::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 5
loc 5
rs 9.4285
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace RobbieP\ZbarQrdecoder;
2
3
use Illuminate\Foundation\AliasLoader;
4
use Illuminate\Support\ServiceProvider;
5
use Symfony\Component\Process\ProcessBuilder;
6
7 View Code Duplication
class ZbarQrdecoderServiceProviderLaravel4 extends ServiceProvider {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
9
	/**
10
	 * Bootstrap the application events.
11
	 *
12
	 * @return void
13
	 */
14
	public function boot()
15
	{
16
17
		$this->package('robbiep/zbar-qrdecoder');
18
	}
19
20
	/**
21
	 * Register the service provider.
22
	 *
23
	 * @return void
24
	 */
25
	public function register()
26
	{
27
		$this->app['zbardecoder'] = $this->app->share(function($app)
28
		{
29
			$processBuilder = new ProcessBuilder();
30
			$config = $app['config']->get('zbar-qrdecoder::config');
31
			return new ZbarDecoder($config, $processBuilder);
32
		});
33
34
		$this->app->booting(function()
0 ignored issues
show
Bug introduced by
The method booting cannot be called on $this->app (of type array<string,?,{"zbardecoder":"?"}>).

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...
35
		{
36
			$loader = AliasLoader::getInstance();
37
			$loader->alias('ZbarDecoder', 'RobbieP\ZbarQrdecoder\Facades\ZbarDecoder');
38
		});
39
	}
40
41
}
42