Completed
Pull Request — master (#76)
by Luke
02:26
created

Dict   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 44
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 4 1
A __invoke() 0 4 1
A count() 0 4 1
1
<?php
2
/**
3
 * Nozavroni/Collections
4
 * Just another collections library for PHP5.6+.
5
 * @version   {version}
6
 * @copyright Copyright (c) 2017 Luke Visinoni <[email protected]>
7
 * @author    Luke Visinoni <[email protected]>
8
 * @license   https://github.com/deni-zen/csvelte/blob/master/LICENSE The MIT License (MIT)
9
 */
10
namespace Noz\Immutable;
11
12
use BadMethodCallException;
13
14
use Countable;
15
use Noz\Contracts\Structure\Dictable;
16
use Traversable;
17
use SplFixedArray;
18
19
use Noz\Contracts\Structure\Sequenceable;
20
use Noz\Contracts\Immutable;
21
use Noz\Contracts\Arrayable;
22
use Noz\Contracts\Invokable;
23
24
use Noz\Traits\IsImmutable;
25
26
use function Noz\to_array;
27
use function Noz\is_traversable;
28
29
class Dict implements
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: contains, every, fold, isEmpty, none, pipe
Loading history...
30
    Dictable,
31
    Immutable,
32
    Countable,
33
    Arrayable,
34
    Invokable
35
{
36
    use IsImmutable;
37
38
    /**
39
     * To array.
40
     *
41
     * @return array
0 ignored issues
show
Documentation introduced by
Should the return type not be array|null? Also, consider making the array more specific, something like array<String>, or String[].

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

If the return type contains the type array, this check recommends the use of a more specific type like String[] or array<String>.

Loading history...
42
     */
43
    public function toArray()
44
    {
45
        // TODO: Implement toArray() method.
46
    }
47
48
    /**
49
     * Invoke set.
50
     *
51
     * @return mixed
52
     */
53
    public function __invoke()
54
    {
55
        // TODO: Implement __invoke() method.
56
    }
57
58
    /**
59
     * Count elements of an object
60
     * @link  http://php.net/manual/en/countable.count.php
61
     * @return int The custom count as an integer.
0 ignored issues
show
Documentation introduced by
Should the return type not be integer|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
62
     * </p>
63
     * <p>
64
     * The return value is cast to an integer.
65
     * @since 5.1.0
66
     */
67
    public function count()
68
    {
69
        // TODO: Implement count() method.
70
    }
71
72
}
73