Issues (34)

src/Util/StringSupplier.php (1 issue)

1
<?php
2
3
namespace Graphp\Util;
4
5
/**
6
 * Class StringSupplier
7
 *
8
 * @package Graphp\Util
9
 */
10
class StringSupplier implements SupplierInterface
11
{
12
    /**
13
     * Supplier value
14
     *
15
     * @var int
16
     */
17
    private static $i = 0;
18
19
    /**
20
     * Construct supplier value
21
     *
22
     * @param int $start - starting value
23
     */
24 1
    public function __construct(int $start)
25
    {
26 1
        self::$i = $start;
27 1
    }
28
29
    /**
30
     * Get supplier value
31
     *
32
     * @return int
33
     */
34 1
    public function get(): string
35
    {
36 1
        return (string) self::$i++;
0 ignored issues
show
Bug Best Practice introduced by
The expression return (string)PostIncNode returns the type string which is incompatible with the documented return type integer.
Loading history...
37
    }
38
}
39