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 ( 204442...383a2e )
by Christian
03:07
created

src/Node.php (3 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * See class comment
4
 *
5
 * PHP Version 5
6
 *
7
 * @category Netresearch
8
 * @package  Netresearch\Kite
9
 * @author   Christian Opitz <[email protected]>
10
 * @license  http://www.netresearch.de Netresearch Copyright
11
 * @link     http://www.netresearch.de
12
 */
13
14
namespace Netresearch\Kite;
15
16
/**
17
 * Node - node (and nodes) is a special variable name, which is casted to this class
18
 *
19
 * @category Netresearch
20
 * @package  Netresearch\Kite
21
 * @author   Christian Opitz <[email protected]>
22
 * @license  http://www.netresearch.de Netresearch Copyright
23
 * @link     http://www.netresearch.de
24
 */
25
class Node extends Variables
26
{
27
    /**
28
     * Node constructor.
29
     *
30
     * @param Variables $parent Parent object (Task/Job/Workflow)
31
     */
32
    public function __construct(Variables $parent)
33
    {
34
        parent::__construct(
35
            $parent,
36
            array(
37
                'user' => '',
38
                'pass' => '',
39
                'port' => '',
40
                // SCP/SSH URL
41
                'url' => '{(this.user ? this.user ~ "@" : "") ~ this.host}',
42
                'sshOptions' => ' -A{this.port ? " -p " ~ this.port : ""}{this.pass ? " -o PubkeyAuthentication=no" : ""}',
43
                'scpOptions' => '{this.port ? " -P " ~ this.port : ""}{this.pass ? " -o PubkeyAuthentication=no" : ""}',
44
                'php' => 'php', // PHP executable
45
                'webRoot' => '{this.deployPath}/current',
46
                // commented out to trigger exceptions when those are empty:
47
                // 'webUrl' => 'http://example.com',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
48
                // 'host' => 'example.com',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
49
                // 'deployPath' => '/var/www'
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
50
            )
51
        );
52
    }
53
54
    /**
55
     * Cast this to string - returns the url
56
     *
57
     * @return string
58
     */
59
    public function __toString()
60
    {
61
        return (string) $this->get('url');
62
    }
63
}
64
?>
65