for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Pixeler
*
* UTF-8 Dot matrix renderer.
* @package pixeler
* @author [email protected]
* @version 1.0
* @copyright Stefano Azzolini - 2014 - http://dreamnoctis.com
*/
namespace Pixeler;
class Canvas {
protected $screen;
protected $width;
protected $height;
protected $charHeight;
public function __construct($w,$h){
$this->screen = new Matrix($this->width=$w,$this->height=$h);
$this->charHeight = ceil($h/4);
}
public function clear($clear=true){
$clear
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
static $ESC;
$ESC or $ESC = chr(27);
$this->screen->clear();
$h = $this->charHeight +1;
echo $ESC,'[',$h,'A';
public function setPixel($x,$y,$c=1){
$this->screen->setPixel($x,$y,$c);
$c
integer
boolean
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
public function width(){
return $this->width;
public function height(){
return $this->height;
public function __toString(){
return $this->screen->render();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.