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 ( bcd62e...b3fd6e )
by Christian
41:18
created
src/classes/SelimConfig.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
      * @param string $name
126 126
      * @param string $path
127 127
      *
128
-     * @return boolean
128
+     * @return boolean|null
129 129
      */
130 130
     public function addSite($name, $path)
131 131
     {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
     }
22 22
 
23 23
     public function sitePathExists($path) {
24
-        foreach($this->sites as $site){
25
-            if(dirname($path) === dirname($site->path)){
24
+        foreach ($this->sites as $site) {
25
+            if (dirname($path) === dirname($site->path)) {
26 26
                 return true;
27 27
             }
28 28
         }
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
         $request = Request::createFromGlobals();
39 39
         $server = $request->server;
40 40
         $selim_foldername = "/.selim/";
41
-        if($server->get("HOME")){
41
+        if ($server->get("HOME")) {
42 42
             $conf_dir = $server->get("HOME").$selim_foldername;
43
-        }else if($server->get("HOMEDRIVE")){
43
+        } else if ($server->get("HOMEDRIVE")) {
44 44
             $conf_dir = "{$server->get("HOMEDRIVE")}{$server->get("HOMEPATH")}{$selim_foldername}";
45
-        }else{
45
+        } else {
46 46
             Util::reportError("Can't find Homedir. Aborting...");
47 47
             return;
48 48
         }
49 49
 
50
-        if(!file_exists($conf_dir)){
50
+        if (!file_exists($conf_dir)) {
51 51
             mkdir($conf_dir);
52 52
         }
53 53
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function removeSite($name)
136 136
     {
137 137
         $size = count($this->sites);
138
-        for ($i = 0; $i < $size;$i++) {
138
+        for ($i = 0; $i < $size; $i++) {
139 139
             $s = $this->sites[$i];
140 140
             if ($s->name === $name) {
141 141
                 array_splice($this->sites, $i, 1);
@@ -144,21 +144,21 @@  discard block
 block discarded – undo
144 144
         }
145 145
     }
146 146
 
147
-    public function setPath($config_path = "",$is_cli = true) {
147
+    public function setPath($config_path = "", $is_cli = true) {
148 148
         $dir = dirname($config_path);
149
-        if(file_exists($dir)) {
150
-            if(!file_exists($config_path) && $is_cli){
149
+        if (file_exists($dir)) {
150
+            if (!file_exists($config_path) && $is_cli) {
151 151
                 echo "The file $config_path doesn't exist. Do you want to create it? yes/[no]";
152 152
                 $line = fgets(STDIN);
153
-                if(preg_match("/^y|yes/", $line)) {
153
+                if (preg_match("/^y|yes/", $line)) {
154 154
                     file_put_contents($config_path, '{"sites":{}}');
155
-                }else{
155
+                } else {
156 156
                     Util::reportError("Aborting...");
157 157
                 }
158 158
             }
159 159
             $this->path_config = $config_path;
160 160
             $this->load();
161
-        }else{
161
+        } else {
162 162
             Util::reportError("The directory \"$dir\" doesnt exist.");
163 163
         }
164 164
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
         $selim_foldername = "/.selim/";
41 41
         if($server->get("HOME")){
42 42
             $conf_dir = $server->get("HOME").$selim_foldername;
43
-        }else if($server->get("HOMEDRIVE")){
43
+        } else if($server->get("HOMEDRIVE")){
44 44
             $conf_dir = "{$server->get("HOMEDRIVE")}{$server->get("HOMEPATH")}{$selim_foldername}";
45
-        }else{
45
+        } else{
46 46
             Util::reportError("Can't find Homedir. Aborting...");
47 47
             return;
48 48
         }
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
                 $line = fgets(STDIN);
153 153
                 if(preg_match("/^y|yes/", $line)) {
154 154
                     file_put_contents($config_path, '{"sites":{}}');
155
-                }else{
155
+                } else{
156 156
                     Util::reportError("Aborting...");
157 157
                 }
158 158
             }
159 159
             $this->path_config = $config_path;
160 160
             $this->load();
161
-        }else{
161
+        } else{
162 162
             Util::reportError("The directory \"$dir\" doesnt exist.");
163 163
         }
164 164
     }
Please login to merge, or discard this patch.
src/classes/SilverstripePage.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      *
40 40
      * @param string $path
41 41
      *
42
-     * @return boolean
42
+     * @return boolean|null
43 43
      */
44 44
     public function setupPaths($path)
45 45
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Selim;
4 4
 
5
-use Exception;
6
-use Symfony\Component\Yaml\Exception\ParseException;
5
+use Exception;
6
+use Symfony\Component\Yaml\Exception\ParseException;
7 7
 use Symfony\Component\Yaml\Yaml;
8 8
 
9 9
 class SilverstripePage
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
                     echo $e->getMessage().PHP_EOL;
128 128
                 }
129 129
             }
130
-        }else{
130
+        } else {
131 131
             $this->envtype = "live";
132 132
         }
133 133
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
                     echo $e->getMessage().PHP_EOL;
128 128
                 }
129 129
             }
130
-        }else{
130
+        } else{
131 131
             $this->envtype = "live";
132 132
         }
133 133
     }
Please login to merge, or discard this patch.
src/classes/SelimApplication.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 use Symfony\Component\Console\Input\InputInterface;
7 7
 
8 8
 class SelimApplication extends Application {
9
-    public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN'){
10
-        parent::__construct($name,$version);
9
+    public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') {
10
+        parent::__construct($name, $version);
11 11
         $this->selim_config = SelimConfig::getInstance();
12 12
     }
13 13
 
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
      * @param InputInterface $input
16 16
      * @return SelimConfig
17 17
      */
18
-    public function getSelimConfig(InputInterface $input){
18
+    public function getSelimConfig(InputInterface $input) {
19 19
         $config_path = $input->getOption('config');
20
-        if($config_path) {
20
+        if ($config_path) {
21 21
             $this->selim_config->setPath($config_path);
22 22
         }
23 23
         return $this->selim_config;
Please login to merge, or discard this patch.
src/classes/Commands/SecurityCommand.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use Symfony\Component\Console\Input\InputInterface;
10 10
 use Symfony\Component\Console\Output\OutputInterface;
11 11
 
12
-class SecurityCommand extends SelimCommand{
12
+class SecurityCommand extends SelimCommand {
13 13
     protected function configure()
14 14
     {
15 15
         parent::configure();
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
             $sc = SecurityChecker::getInstance();
35 35
             $issues = $sc->findIssues(new SilverstripePage($site), true);
36 36
 
37
-            if(count($issues)) {
37
+            if (count($issues)) {
38 38
                 foreach ($issues as $iss) {
39 39
                     echo $iss;
40 40
                 }
41
-            }else{
41
+            } else {
42 42
                 echo "No security issues found.";
43 43
             }
44 44
         } else {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
                 foreach ($issues as $iss) {
39 39
                     echo $iss;
40 40
                 }
41
-            }else{
41
+            } else{
42 42
                 echo "No security issues found.";
43 43
             }
44 44
         } else {
Please login to merge, or discard this patch.
src/classes/Commands/RemoveSiteCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 use Symfony\Component\Console\Input\InputInterface;
8 8
 use Symfony\Component\Console\Output\OutputInterface;
9 9
 
10
-class RemoveSiteCommand extends SelimCommand{
10
+class RemoveSiteCommand extends SelimCommand {
11 11
     protected function configure()
12 12
     {
13 13
         parent::configure();
Please login to merge, or discard this patch.
src/classes/Commands/DefaultCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 use Symfony\Component\Console\Input\InputOption;
12 12
 use Symfony\Component\Console\Output\OutputInterface;
13 13
 
14
-class DefaultCommand extends SelimCommand{
14
+class DefaultCommand extends SelimCommand {
15 15
     protected function configure()
16 16
     {
17 17
         parent::configure();
Please login to merge, or discard this patch.
src/classes/Commands/FindSitesCommand.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 use Symfony\Component\Console\Output\OutputInterface;
11 11
 use Symfony\Component\Console\Question\Question;
12 12
 
13
-class FindSitesCommand extends SelimCommand{
13
+class FindSitesCommand extends SelimCommand {
14 14
     protected function configure()
15 15
     {
16 16
         parent::configure();
@@ -35,40 +35,40 @@  discard block
 block discarded – undo
35 35
         $skippaths = $input->getOption("skip-known-paths") ? true : false;
36 36
         $path = realpath($input->getArgument("path"));
37 37
         $projects = array();
38
-        $question_helper =  $this->getHelper("question");
38
+        $question_helper = $this->getHelper("question");
39 39
 
40 40
         $output->write("Start searching _config.php files...");
41 41
         $fact = new File_Iterator_Factory();
42
-        $iterator = $fact->getFileIterator($path,"php","_config");
42
+        $iterator = $fact->getFileIterator($path, "php", "_config");
43 43
         $output->writeln("OK");
44 44
 
45 45
         $output->write("Filter for project paths...");
46
-        while($file = $iterator->current()){
46
+        while ($file = $iterator->current()) {
47 47
             $content = Util::stripPhpComments(file_get_contents($file));
48
-            if(preg_match("/\\\$project\\s=/",$content)){
49
-                array_push($projects,dirname($file));
48
+            if (preg_match("/\\\$project\\s=/", $content)) {
49
+                array_push($projects, dirname($file));
50 50
             }
51 51
             $iterator->next();
52 52
         }
53 53
         $output->writeln("OK");
54 54
 
55
-        if(count($projects)){
55
+        if (count($projects)) {
56 56
             $sites_added = false;
57 57
             $output->writeln("found ".count($projects)." possible sites");
58
-            foreach($projects as $p){
59
-                if($skippaths && $cfg->sitePathExists($p)) continue;
58
+            foreach ($projects as $p) {
59
+                if ($skippaths && $cfg->sitePathExists($p)) continue;
60 60
 
61 61
                 $question = new Question("Please enter name for '$p' (leave empty to skip)");
62 62
                 do {
63 63
                     $name = $question_helper->ask($input, $output, $question);
64
-                }while($cfg->siteExists($name));
64
+                }while ($cfg->siteExists($name));
65 65
 
66
-                if($name){
66
+                if ($name) {
67 67
                     $sites_added = true;
68
-                    $cfg->addSite($name,$p);
68
+                    $cfg->addSite($name, $p);
69 69
                 }
70 70
             }
71
-            if($sites_added) {
71
+            if ($sites_added) {
72 72
                 $output->write("Writing config.json ...");
73 73
                 $cfg->write();
74 74
                 $output->writeln("OK");
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,9 @@
 block discarded – undo
56 56
             $sites_added = false;
57 57
             $output->writeln("found ".count($projects)." possible sites");
58 58
             foreach($projects as $p){
59
-                if($skippaths && $cfg->sitePathExists($p)) continue;
59
+                if($skippaths && $cfg->sitePathExists($p)) {
60
+                    continue;
61
+                }
60 62
 
61 63
                 $question = new Question("Please enter name for '$p' (leave empty to skip)");
62 64
                 do {
Please login to merge, or discard this patch.
src/classes/Commands/AddSiteCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Symfony\Component\Console\Input\InputInterface;
7 7
 use Symfony\Component\Console\Output\OutputInterface;
8 8
 
9
-class AddSiteCommand extends SelimCommand{
9
+class AddSiteCommand extends SelimCommand {
10 10
     protected function configure()
11 11
     {
12 12
         parent::configure();
Please login to merge, or discard this patch.
src/classes/Commands/SelimCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@
 block discarded – undo
7 7
 use Symfony\Component\Console\Command\Command;
8 8
 use Symfony\Component\Console\Input\InputInterface;
9 9
 
10
-abstract class SelimCommand extends Command{
10
+abstract class SelimCommand extends Command {
11 11
 
12 12
     /**
13 13
      * @param InputInterface $input
14 14
      * @return SelimConfig
15 15
      */
16
-    protected function getSelimConfig(InputInterface $input){
16
+    protected function getSelimConfig(InputInterface $input) {
17 17
         return $this->getApplication()->getSelimConfig($input);
18 18
     }
19 19
 
20 20
     /**
21 21
      * @return SelimApplication
22 22
      */
23
-    public function getApplication(){
23
+    public function getApplication() {
24 24
         return parent::getApplication();
25 25
     }
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.