for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the DigitalOceanV2 library.
*
* (c) Antoine Corcy <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DigitalOceanV2\Entity;
/**
* @author Jacob Holmes <[email protected]>
class ForwardingRule extends AbstractEntity
{
* @var string
public $entryProtocol;
* @var int
public $entryPort;
public $targetProtocol;
public $targetPort;
public $certificateId;
public $tlsPassthrough;
* @return $this
public function setStandardHttpRules()
$this->entryProtocol = 'http';
$this->targetProtocol = 'http';
$this->entryPort = 80;
$this->targetPort = 80;
return $this;
}
public function setStandardHttpsRules()
$this->entryProtocol = 'https';
$this->targetProtocol = 'https';
$this->entryPort = 443;
$this->targetPort = 443;
$this->tlsPassthrough = true;
$tlsPassthrough
string
true
boolean
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.
$answer = 42; $correct = false; $correct = (bool) $answer;
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.