Test Failed
Push — features/47-laravelmethods ( eb62da...02a3bd )
by Luke
02:43
created

Stack::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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\Collection;
11
12
use BadMethodCallException;
13
14
use Countable;
15
use Traversable;
16
use SplFixedArray;
17
18
use Noz\Contracts\Structure\Listable;
19
use Noz\Contracts\Immutable;
20
use Noz\Contracts\Arrayable;
21
use Noz\Contracts\Invokable;
22
23
use Noz\Traits\IsImmutable;
24
25
use function Noz\to_array;
26
use function Noz\is_traversable;
27
28
/**
29
 * Stack Collection.
30
 *
31
 * A stack is a Linked List in LIFO (last-in, first-out) configuration.
32
 */
33
class Stack extends LList implements
34
    Listable,
35
    Immutable,
36
    Countable,
37
    Arrayable,
38
    Invokable
39
{
40
    use IsImmutable;
41
42
    /**
43
     * To array.
44
     *
45
     * @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...
46
     */
47
    public function toArray()
48
    {
49
        // TODO: Implement toArray() method.
50
    }
51
52
    /**
53
     * Invoke set.
54
     *
55
     * @return mixed
56
     */
57
    public function __invoke()
58
    {
59
        // TODO: Implement __invoke() method.
60
    }
61
62
    /**
63
     * Count elements of an object
64
     * @link  http://php.net/manual/en/countable.count.php
65
     * @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...
66
     * </p>
67
     * <p>
68
     * The return value is cast to an integer.
69
     * @since 5.1.0
70
     */
71
    public function count()
72
    {
73
        // TODO: Implement count() method.
74
    }
75
76
}
77