CacheInterface
last analyzed

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 33

3 Methods

Rating   Name   Duplication   Size   Complexity  
get() 0 1 ?
set() 0 1 ?
expires() 0 1 ?
1
<?php
2
3
namespace Phloppy\Cache;
4
5
interface CacheInterface
6
{
7
    /**
8
     * Retrieve the nodes under the given key.
9
     *
10
     * @param string $key
11
     *
12
     * @return string[]
13
     */
14
    public function get($key);
15
16
17
    /**
18
     * Cache the given Nodes.
19
     *
20
     * @param string   $key
21
     * @param string[] $nodes
22
     * @param int      $ttl TTL in seconds.
23
     *
24
     * @return bool
25
     */
26
    public function set($key, array $nodes, $ttl);
0 ignored issues
show
Coding Style introduced by
function set() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
27
28
29
    /**
30
     * Return seconds left until the key expires.
31
     *
32
     * @param string $key
33
     *
34
     * @return int The number of seconds the key is valid. 0 if expired or unknown.
35
     */
36
    public function expires($key);
37
}