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 ( 02dba5...ee04e4 )
by Axel
03:09
created
src/Manager/ChangelogManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     
11 11
     /**
12 12
      * @param string $storagePath
13
-     * @return \ChangelogParser\Driver\Driver
13
+     * @return ChangelogManager
14 14
      */
15 15
     public function setStoragePath($storagePath) {
16 16
         $this->storagePath = $storagePath;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getLastVersion($filepath, $format = 'json') {
40 40
         $cacheFile = "last-version-$format";
41
-        if(($cache = $this->cacheManager->getCache($filepath, $cacheFile)) !== false) {
41
+        if (($cache = $this->cacheManager->getCache($filepath, $cacheFile)) !== false) {
42 42
             return $cache;
43 43
         }
44 44
         $this->initializeDriver($format);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getAllVersions($filepath, $format = 'json') {
57 57
         $cacheFile = "all-versions-$format";
58
-        if(($cache = $this->cacheManager->getCache($filepath, $cacheFile)) !== false) {
58
+        if (($cache = $this->cacheManager->getCache($filepath, $cacheFile)) !== false) {
59 59
             return $cache;
60 60
         }
61 61
         $this->initializeDriver($format);
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
     public function initializeDriver($format) {
73 73
         $driverClass = 'ChangelogParser\\Driver\\' . ucfirst($format) . 'Driver';
74 74
         
75
-        if(!class_exists($driverClass)) {
75
+        if (!class_exists($driverClass)) {
76 76
             throw new \InvalidArgumentException('The requested format is not supported');
77 77
         }
78 78
         
79 79
         $this->driver = new $driverClass();
80
-        if($this->storagePath !== null) {
80
+        if ($this->storagePath !== null) {
81 81
             $this->driver->setStoragePath($this->storagePath);
82 82
         }
83 83
     }
Please login to merge, or discard this patch.
src/Parser/Parser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @return array
16 16
      */
17 17
     public function parse($filepath) {
18
-        foreach($this->parseFile($filepath) as $line) {
18
+        foreach ($this->parseFile($filepath) as $line) {
19 19
             $this->parseLine($line);
20 20
         }
21 21
         return $this->releases;
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
      * @throws \RuntimeException
27 27
      */
28 28
     private function parseFile($filepath) {
29
-        if(($file = fopen($filepath, 'r')) === false) {
29
+        if (($file = fopen($filepath, 'r')) === false) {
30 30
             throw new \RuntimeException("The file $filepath does not exist");
31 31
         }
32 32
         
33
-        while($line = fgets($file)) {
33
+        while ($line = fgets($file)) {
34 34
             yield $line;
35 35
         }
36 36
         fclose($file);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @param string $line
41 41
      */
42 42
     private function parseLine($line) {
43
-        switch($line{0}) {
43
+        switch ($line{0}) {
44 44
             case '#':
45 45
                 $this->parseTitle($line);
46 46
                 break;
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
      * @param string $line
55 55
      */
56 56
     private function parseTitle($line) {
57
-        for($i = 0; $i < 3; ++$i) {
58
-            if($line{$i} !== '#') {
57
+        for ($i = 0; $i < 3; ++$i) {
58
+            if ($line{$i} !== '#') {
59 59
                 break;
60 60
             }
61 61
         }
62
-        switch($i) {
62
+        switch ($i) {
63 63
             case 2:
64 64
                 $parts = explode('-', $line);
65
-                if(count($parts) === 1) {
65
+                if (count($parts) === 1) {
66 66
                     $this->currentRelease = $this->formatReleaseVersion($line);
67 67
                     break;
68 68
                 }
@@ -89,6 +89,6 @@  discard block
 block discarded – undo
89 89
      * @param string $line
90 90
      */
91 91
     private function parseItem($line) {
92
-        $this->releases[$this->currentRelease]['items'][$this->currentReleasePart][] = trim(substr($line,1));
92
+        $this->releases[$this->currentRelease]['items'][$this->currentReleasePart][] = trim(substr($line, 1));
93 93
     }
94 94
 }
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
src/Driver/JsonDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     public final function getLastVersion() {
22 22
         $data = json_decode($this->getAllVersions(), true);
23 23
         
24
-        foreach($data as $version => $changelog) {
25
-            if($version === 'unreleased') {
24
+        foreach ($data as $version => $changelog) {
25
+            if ($version === 'unreleased') {
26 26
                 continue;
27 27
             }
28 28
             return json_encode([$version => $changelog]);
Please login to merge, or discard this patch.
src/Driver/Driver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      * @param mixed $data
60 60
      */
61 61
     protected function storeResults($data) {
62
-        if(is_file($this->storagePath)) {
62
+        if (is_file($this->storagePath)) {
63 63
             unlink($this->storagePath);
64 64
         }
65 65
         file_put_contents($this->storagePath, $data);
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
     abstract protected function formatData($data);
39 39
     
40 40
     /**
41
-     * @return mixed
41
+     * @return string
42 42
      */
43 43
     abstract protected function getLastVersion();
44 44
     
45 45
     /**
46
-     * @return mixed
46
+     * @return string
47 47
      */
48 48
     abstract protected function getAllVersions();
49 49
     
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     }
57 57
     
58 58
     /**
59
-     * @param mixed $data
59
+     * @param string $data
60 60
      */
61 61
     protected function storeResults($data) {
62 62
         if(is_file($this->storagePath)) {
Please login to merge, or discard this patch.
example/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 
7 7
 $manager = new ChangelogManager();
8 8
 // Set the cache validity time to one day
9
-$manager->getCacheManager()->setCacheTime(60*60*24);
9
+$manager->getCacheManager()->setCacheTime(60 * 60 * 24);
10 10
 echo $manager->getLastVersion(__DIR__ . '/EXAMPLE_CHANGELOG.md') . "\n";
11 11
 echo $manager->getAllVersions(__DIR__ . '/EXAMPLE_CHANGELOG.md') . "\n";
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
src/Manager/CacheManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,6 +55,6 @@
 block discarded – undo
55 55
     private function generateCachePath($changelogFile, $cacheFile) {
56 56
         $changelogSignature = str_replace([':', ' ', '/', '\\'], '-', strtolower(basename(dirname($changelogFile)) . '-' . basename($changelogFile, '.md')));
57 57
         
58
-        return realpath(__DIR__ . "/../../data/cache"). '/' . $changelogSignature . "-$cacheFile.cache";
58
+        return realpath(__DIR__ . "/../../data/cache") . '/' . $changelogSignature . "-$cacheFile.cache";
59 59
     }
60 60
 }
61 61
\ No newline at end of file
Please login to merge, or discard this patch.