Completed
Push — develop ( b4fba5...9773af )
by Kirill
12:38
created

CircleProgress   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 2
1
<?php
2
/**
3
 * This file is part of GitterBot package.
4
 *
5
 * @author Serafim <[email protected]>
6
 * @date 26.01.2016 5:21
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace App\Console;
12
13
/**
14
 * Class CircleProgress
15
 * @package App\Console
16
 */
17
class CircleProgress
18
{
19
    /**
20
     * @var int
21
     */
22
    protected $iterator = 0;
23
24
    /**
25
     * @var array
26
     */
27
    protected static $icons = ['|', '/', '−', '\\'];
28
29
    /**
30
     * @return mixed
31
     */
32
    public function get()
33
    {
34
        if ($this->iterator >= count(static::$icons)) {
35
            $this->iterator = 0;
36
        }
37
38
        return static::$icons[$this->iterator++];
39
    }
40
}
41