Completed
Pull Request — final (#412)
by Georges
02:19
created

Api   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 52
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getVersion() 0 4 1
B getChangelog() 0 27 1
1
<?php
2
/**
3
 *
4
 * This file is part of phpFastCache.
5
 *
6
 * @license MIT License (MIT)
7
 *
8
 * For full copyright and license information, please see the docs/CREDITS.txt file.
9
 *
10
 * @author Khoa Bui (khoaofgod)  <[email protected]> http://www.phpfastcache.com
11
 * @author Georges.L (Geolim4)  <[email protected]>
12
 *
13
 */
14
15
namespace phpFastCache;
16
17
/**
18
 * Class Api
19
 * @package phpFastCache
20
 */
21
class Api
22
{
23
    protected static $version = '1.1.3';
24
25
    /**
26
     * This method will returns the current
27
     * API version, the API version will be
28
     * updated by following the semantic versioning
29
     * based on changes of:
30
     * - ExtendedCacheItemPoolInterface
31
     * - ExtendedCacheItemInterface
32
     *
33
     * @see  http://semver.org/
34
     * @return string
35
     */
36
    public static function getVersion()
37
    {
38
        return self::$version;
39
    }
40
41
    /**
42
     * Return the API changelog, as a string.
43
     * @return string
44
     */
45
    public static function getChangelog()
46
    {
47
        return <<<CHANGELOG
48
- 1.1.3
49
-- Added an additional CacheItemInterface method:
50
   ExtendedCacheItemInterface::getEncodedKey()
51
52
- 1.1.2
53
-- Implemented [de|a]ttaching methods to improve memory management
54
   ExtendedCacheItemPoolInterface::detachItem()
55
   ExtendedCacheItemPoolInterface::detachAllItems()
56
   ExtendedCacheItemPoolInterface::attachItem()
57
   ExtendedCacheItemPoolInterface::isAttached()
58
59
- 1.1.1
60
-- Implemented JsonSerializable interface to ExtendedCacheItemInterface
61
62
- 1.1.0
63
-- Implemented JSON methods such as:
64
   ExtendedCacheItemPoolInterface::getItemsAsJsonString()
65
   ExtendedCacheItemPoolInterface::getItemsByTagsAsJsonString()
66
   ExtendedCacheItemInterface::getDataAsJsonString()
67
68
- 1.0.0
69
-- First initial version
70
CHANGELOG;
71
    }
72
}