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 ( e373d4...d797ae )
by Dmitry
02:21
created
src/Junker/Silex/Config.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@
 block discarded – undo
6 6
 
7 7
 class Config
8 8
 {
9
-    public $data;
10
-    private $resources = array();
11
-
12
-    public function __construct(array $data)
13
-    {
14
-        $this->data = $data;
15
-    }
16
-
17
-    public function addResource(ResourceInterface $resource)
18
-    {
19
-        $this->resources[] = $resource;
20
-    }
21
-
22
-    public function getResources()
23
-    {
24
-        return array_unique($this->resources);
25
-    }
26
-
27
-    public function addConfig(Config $config)
28
-    {
29
-        $this->data = array_replace_recursive($this->data, $config->data);
30
-
31
-        $this->resources = array_merge($this->resources, $config->getResources());
32
-    }
9
+	public $data;
10
+	private $resources = array();
11
+
12
+	public function __construct(array $data)
13
+	{
14
+		$this->data = $data;
15
+	}
16
+
17
+	public function addResource(ResourceInterface $resource)
18
+	{
19
+		$this->resources[] = $resource;
20
+	}
21
+
22
+	public function getResources()
23
+	{
24
+		return array_unique($this->resources);
25
+	}
26
+
27
+	public function addConfig(Config $config)
28
+	{
29
+		$this->data = array_replace_recursive($this->data, $config->data);
30
+
31
+		$this->resources = array_merge($this->resources, $config->getResources());
32
+	}
33 33
 }
Please login to merge, or discard this patch.
src/Junker/Silex/Provider/YamlConfigurationServiceProvider.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
 
33 33
     public function register(Application $app)
34 34
     {
35
-        $app['config'] = $app->share(function () {
35
+        $app['config'] = $app->share(function() {
36 36
             if ($this->cacheDirPath) {
37 37
                 $cache = $this->getConfigCacheFactory($this->debug)->cache($this->cacheDirPath.'/config.cache.php',
38
-                    function (ConfigCacheInterface $cache) {
38
+                    function(ConfigCacheInterface $cache) {
39 39
                         $config = $this->loadConfig();
40 40
 
41 41
                         $content = sprintf('<?php use Junker\Silex\Config; $c = new Config(%s);', var_export($config->data, true)).PHP_EOL;
Please login to merge, or discard this patch.
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -11,64 +11,64 @@
 block discarded – undo
11 11
 
12 12
 class YamlConfigurationServiceProvider implements ServiceProviderInterface
13 13
 {
14
-    protected $cacheDirPath;
15
-    protected $configFilePath;
16
-    protected $configCacheFactory;
17
-
18
-    public function __construct($configFilePath, $options = null)
19
-    {
20
-        if (is_array($options)) {
21
-            if (isset($options['cache_dir'])) {
22
-                $this->cacheDirPath = $options['cache_dir'];
23
-            }
24
-        }
25
-
26
-        $this->configFilePath = $configFilePath;
27
-    }
28
-
29
-    public function register(Application $app)
30
-    {
31
-        $app['config'] = $app->share(function () {
32
-            if ($this->cacheDirPath) {
33
-                $cache = $this->getConfigCacheFactory($app['debug'])->cache($this->cacheDirPath.'/config.cache.php',
34
-                    function (ConfigCacheInterface $cache) {
35
-                        $config = $this->loadConfig();
36
-
37
-                        $content = sprintf('<?php use Junker\Silex\Config; $c = new Config(%s);', var_export($config->data, true)).PHP_EOL;
38
-                        $content .= 'return $c;';
39
-
40
-                        $cache->write($content, $config->getResources());
41
-                    }
42
-                );
43
-
44
-                $config = include $cache->getPath();
45
-            } else {
46
-                $config = $this->loadConfig();
47
-            }
48
-
49
-            return $config->data;
50
-        });
51
-    }
52
-
53
-    public function boot(Application $app)
54
-    {
55
-    }
56
-
57
-    private function getConfigCacheFactory($debug = false)
58
-    {
59
-        if ($this->configCacheFactory === null) {
60
-            $this->configCacheFactory = new ConfigCacheFactory($debug);
61
-        }
62
-
63
-        return $this->configCacheFactory;
64
-    }
65
-
66
-    protected function loadConfig()
67
-    {
68
-        $loader = new YamlFileLoader(new FileLocator(dirname($this->configFilePath)));
69
-
70
-        $config = $loader->load($this->configFilePath);
71
-
72
-        return $config;
73
-    }
14
+	protected $cacheDirPath;
15
+	protected $configFilePath;
16
+	protected $configCacheFactory;
17
+
18
+	public function __construct($configFilePath, $options = null)
19
+	{
20
+		if (is_array($options)) {
21
+			if (isset($options['cache_dir'])) {
22
+				$this->cacheDirPath = $options['cache_dir'];
23
+			}
24
+		}
25
+
26
+		$this->configFilePath = $configFilePath;
27
+	}
28
+
29
+	public function register(Application $app)
30
+	{
31
+		$app['config'] = $app->share(function () {
32
+			if ($this->cacheDirPath) {
33
+				$cache = $this->getConfigCacheFactory($app['debug'])->cache($this->cacheDirPath.'/config.cache.php',
34
+					function (ConfigCacheInterface $cache) {
35
+						$config = $this->loadConfig();
36
+
37
+						$content = sprintf('<?php use Junker\Silex\Config; $c = new Config(%s);', var_export($config->data, true)).PHP_EOL;
38
+						$content .= 'return $c;';
39
+
40
+						$cache->write($content, $config->getResources());
41
+					}
42
+				);
43
+
44
+				$config = include $cache->getPath();
45
+			} else {
46
+				$config = $this->loadConfig();
47
+			}
48
+
49
+			return $config->data;
50
+		});
51
+	}
52
+
53
+	public function boot(Application $app)
54
+	{
55
+	}
56
+
57
+	private function getConfigCacheFactory($debug = false)
58
+	{
59
+		if ($this->configCacheFactory === null) {
60
+			$this->configCacheFactory = new ConfigCacheFactory($debug);
61
+		}
62
+
63
+		return $this->configCacheFactory;
64
+	}
65
+
66
+	protected function loadConfig()
67
+	{
68
+		$loader = new YamlFileLoader(new FileLocator(dirname($this->configFilePath)));
69
+
70
+		$config = $loader->load($this->configFilePath);
71
+
72
+		return $config;
73
+	}
74 74
 }
Please login to merge, or discard this patch.
src/Junker/Silex/YamlFileLoader.php 2 patches
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -12,87 +12,87 @@
 block discarded – undo
12 12
 
13 13
 class YamlFileLoader extends FileLoader
14 14
 {
15
-    private $yamlParser;
15
+	private $yamlParser;
16 16
 
17
-    public function load($file, $type = null)
18
-    {
19
-        $path = $this->locator->locate($file);
17
+	public function load($file, $type = null)
18
+	{
19
+		$path = $this->locator->locate($file);
20 20
 
21
-        $data = $this->loadFile($path);
21
+		$data = $this->loadFile($path);
22 22
 
23
-        // empty file
24
-        if ($data === null) {
25
-            $data = array();
26
-        }
23
+		// empty file
24
+		if ($data === null) {
25
+			$data = array();
26
+		}
27 27
 
28
-        // not an array
29
-        if (!is_array($data)) {
30
-            throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $file));
31
-        }
28
+		// not an array
29
+		if (!is_array($data)) {
30
+			throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $file));
31
+		}
32 32
 
33
-        $config = new Config($data);
34
-        $config->addResource(new FileResource($path));
33
+		$config = new Config($data);
34
+		$config->addResource(new FileResource($path));
35 35
 
36
-        // imports
37
-        $this->parseImports($config, $path);
36
+		// imports
37
+		$this->parseImports($config, $path);
38 38
 
39
-        return $config;
40
-    }
39
+		return $config;
40
+	}
41 41
 
42
-    protected function loadFile($file)
43
-    {
44
-        if (!class_exists('Symfony\Component\Yaml\Parser')) {
45
-            throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.');
46
-        }
42
+	protected function loadFile($file)
43
+	{
44
+		if (!class_exists('Symfony\Component\Yaml\Parser')) {
45
+			throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.');
46
+		}
47 47
 
48
-        if (!stream_is_local($file)) {
49
-            throw new InvalidArgumentException(sprintf('This is not a local file "%s".', $file));
50
-        }
48
+		if (!stream_is_local($file)) {
49
+			throw new InvalidArgumentException(sprintf('This is not a local file "%s".', $file));
50
+		}
51 51
 
52
-        if (!file_exists($file)) {
53
-            throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
54
-        }
52
+		if (!file_exists($file)) {
53
+			throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
54
+		}
55 55
 
56
-        if ($this->yamlParser === null) {
57
-            $this->yamlParser = new YamlParser();
58
-        }
56
+		if ($this->yamlParser === null) {
57
+			$this->yamlParser = new YamlParser();
58
+		}
59 59
 
60
-        try {
61
-            $data = $this->yamlParser->parse(file_get_contents($file));
62
-        } catch (ParseException $e) {
63
-            throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e);
64
-        }
60
+		try {
61
+			$data = $this->yamlParser->parse(file_get_contents($file));
62
+		} catch (ParseException $e) {
63
+			throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e);
64
+		}
65 65
 
66
-        return $data;
67
-    }
66
+		return $data;
67
+	}
68 68
 
69
-    private function parseImports(Config &$config, $file)
70
-    {
71
-        if (!isset($config->data['imports'])) {
72
-            return;
73
-        }
74
-        if (!is_array($config->data['imports'])) {
75
-            throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file));
76
-        }
69
+	private function parseImports(Config &$config, $file)
70
+	{
71
+		if (!isset($config->data['imports'])) {
72
+			return;
73
+		}
74
+		if (!is_array($config->data['imports'])) {
75
+			throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file));
76
+		}
77 77
 
78
-        $defaultDirectory = dirname($file);
78
+		$defaultDirectory = dirname($file);
79 79
 
80
-        foreach ($config->data['imports'] as $import) {
81
-            if (!is_array($import)) {
82
-                throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $file));
83
-            }
80
+		foreach ($config->data['imports'] as $import) {
81
+			if (!is_array($import)) {
82
+				throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $file));
83
+			}
84 84
 
85
-            $this->setCurrentDir($defaultDirectory);
86
-            $sub_config = $this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
85
+			$this->setCurrentDir($defaultDirectory);
86
+			$sub_config = $this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
87 87
 
88
-            $config->addConfig($sub_config);
88
+			$config->addConfig($sub_config);
89 89
 
90
-            unset($config->data['imports']);
91
-        }
92
-    }
90
+			unset($config->data['imports']);
91
+		}
92
+	}
93 93
 
94
-    public function supports($resource, $type = null)
95
-    {
96
-        return is_string($resource) && 'yml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'yaml' === $type);
97
-    }
94
+	public function supports($resource, $type = null)
95
+	{
96
+		return is_string($resource) && 'yml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'yaml' === $type);
97
+	}
98 98
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         return $data;
67 67
     }
68 68
 
69
-    private function parseImports(Config &$config, $file)
69
+    private function parseImports(Config&$config, $file)
70 70
     {
71 71
         if (!isset($config->data['imports'])) {
72 72
             return;
Please login to merge, or discard this patch.