for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class Requests_Exception_Transport_cURL extends Requests_Exception_Transport {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes DatabaseProvider.
DatabaseProvider
const EASY = 'cURLEasy';
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
$a = "a"; $ab = "ab"; $abc = "abc";
will produce issues in the first and second line, while this second example
will produce no issues.
const MULTI = 'cURLMulti';
const SHARE = 'cURLShare';
/**
* cURL error code
*
* @var integer
*/
protected $code = -1;
* Which type of cURL error
* EASY|MULTI|SHARE
* @var string
protected $type = 'Unknown';
* Clear text error message
protected $reason = 'Unknown';
public function __construct($message, $type, $data = null, $code = 0) {
if ($type !== null) {
$this->type = $type;
}
if ($code !== null) {
$this->code = $code;
if ($message !== null) {
$this->reason = $message;
$message = sprintf('%d %s', $this->code, $this->reason);
$message
parent::__construct($message, $this->type, $data, $this->code);
* Get the error message
public function getReason() {
return $this->reason;
This check marks files that end in a newline character, i.e. an empy line.
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.