Pixeler   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A image() 0 3 1
A dots() 0 3 1
A hide_cursor() 0 3 1
A show_cursor() 0 3 1
1
<?php
2
3
/**
4
 * Pixeler
5
 *
6
 * UTF-8 Dot matrix renderer.
7
 *
8
 * @package pixeler
9
 * @author [email protected]
10
 * @version 1.0
11
 * @copyright Stefano Azzolini - 2014 - http://dreamnoctis.com
12
 */
13
14
namespace Pixeler;
15
16
class Pixeler {
17
18
  public static function image($image_url, $resize_factor = 1.0, $invert = false, $weight = 0.5, $mode = Image::DITHER_ERROR){
19
    return new Image($image_url, $resize_factor, $invert, $weight, $mode);
20
  }
21
22
  public static function dots($width, $height){
23
    return new Matrix($width, $height);
24
  }
25
26
  public static function hide_cursor(){
27
      echo chr(27).'[?25l';
28
  }
29
  
30
  public static function show_cursor(){
31
      echo chr(27).'[?25h';
32
  }
33
34
}