Completed
Push — v5 ( 954df3...2bb146 )
by Georges
03:29
created
examples/files.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 // Setup File Path on your config files
18 18
 CacheManager::setup([
19
-  "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
19
+    "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
20 20
 ]);
21 21
 
22 22
 // In your class, function, you can call the Cache
Please login to merge, or discard this patch.
examples/mongodb.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 require __DIR__ . '/../vendor/autoload.php';
12 12
 
13 13
 $InstanceCache = CacheManager::getInstance('mongodb', [
14
-  'host' => '127.0.0.1',
15
-  'port' => '27017',
16
-  'username' => '',
17
-  'password' => '',
18
-  'timeout' => '1',
14
+    'host' => '127.0.0.1',
15
+    'port' => '27017',
16
+    'username' => '',
17
+    'password' => '',
18
+    'timeout' => '1',
19 19
 ]);
20 20
 
21 21
 
Please login to merge, or discard this patch.
examples/couchbase.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
 require __DIR__ . '/../vendor/autoload.php';
12 12
 
13 13
 $InstanceCache = CacheManager::getInstance('couchbase', [
14
-  'host' => 'your-couchbase-host',
15
-  'port' => '11211',
16
-  'username' => 'your-couchbase-username',
17
-  'password' => 'your-couchbase-password',
18
-  'timeout' => '1',
19
-  'buckets' => [
14
+    'host' => 'your-couchbase-host',
15
+    'port' => '11211',
16
+    'username' => 'your-couchbase-username',
17
+    'password' => 'your-couchbase-password',
18
+    'timeout' => '1',
19
+    'buckets' => [
20 20
     [
21
-      'default' => 'Cache',// The bucket name, generally "default" by default
22
-      'password' => ''// The bucket password if there is
21
+        'default' => 'Cache',// The bucket name, generally "default" by default
22
+        'password' => ''// The bucket password if there is
23
+    ],
23 24
     ],
24
-  ],
25 25
 ]);
26 26
 
27 27
 /**
Please login to merge, or discard this patch.
examples/increment.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 // Setup File Path on your config files
18 18
 CacheManager::setup([
19
-  "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
19
+    "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
20 20
 ]);
21 21
 
22 22
 // In your class, function, you can call the Cache
Please login to merge, or discard this patch.
examples/decrement.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 // Setup File Path on your config files
18 18
 CacheManager::setup([
19
-  "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
19
+    "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
20 20
 ]);
21 21
 
22 22
 // In your class, function, you can call the Cache
Please login to merge, or discard this patch.
examples/sqlite.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 // Setup File Path on your config files
18 18
 CacheManager::setup([
19
-  "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
19
+    "path" => '/var/www/phpfastcache.dev.geolim4.com/geolim4/tmp', // or in windows "C:/tmp/"
20 20
 ]);
21 21
 
22 22
 // In your class, function, you can call the Cache
Please login to merge, or discard this patch.
examples/tagsMethods.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@
 block discarded – undo
24 24
 if (is_null($CachedString->get()) || is_null($CachedString2->get())) {
25 25
     // Write products to Cache in 10 minutes with same keyword
26 26
     $CachedString->set("My beautifull Ios product")
27
-      ->expiresAfter(600)
28
-      ->addTag('Mobile')
29
-      ->addTag('Ios');
27
+        ->expiresAfter(600)
28
+        ->addTag('Mobile')
29
+        ->addTag('Ios');
30 30
 
31 31
     $CachedString2->set("My beautifull Android product")
32
-      ->expiresAfter(600)
33
-      ->addTag('Mobile')
34
-      ->addTag('Android');
32
+        ->expiresAfter(600)
33
+        ->addTag('Mobile')
34
+        ->addTag('Android');
35 35
 
36 36
     $InstanceCache->save($CachedString);
37 37
     $InstanceCache->save($CachedString2);
Please login to merge, or discard this patch.
bin/stubs/leveldb/stub.php 1 patch
Indentation   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -14,148 +14,148 @@
 block discarded – undo
14 14
 
15 15
 class LevelDB{
16 16
 
17
-	/**
18
-	 * @param string $name Path to database
19
-	 * @param array  $options
20
-	 * @param array  $read_options
21
-	 * @param array  $write_options
22
-	 */
23
-	public function __construct($name, array $options = [
24
-		'create_if_missing' => true, // if the specified database does not exist will create a new one
25
-		'error_if_exists'   => false, // if the opened database exists will throw exception
26
-		'paranoid_checks'   => false,
27
-		'block_cache_size'  => 8 * (2 << 20),
28
-		'write_buffer_size' => 4<<20,
29
-		'block_size'        => 4096,
30
-		'max_open_files'    => 1000,
31
-		'block_restart_interval' => 16,
32
-		'compression'       => LEVELDB_SNAPPY_COMPRESSION,
33
-		'comparator'        => NULL, // any callable parameter return 0, -1, 1
34
-	], array $read_options = [
35
-		'verify_check_sum'  => false, //may be set to true to force checksum verification of all data that is read from the file system on behalf of a particular read. By default, no such verification is done.
36
-		'fill_cache'        => true, //When performing a bulk read, the application may set this to false to disable the caching so that the data processed by the bulk read does not end up displacing most of the cached contents.
37
-	], array $write_options = [
38
-		//Only one element named sync in the write option array. By default, each write to leveldb is asynchronous.
39
-		'sync' => false
40
-	]){}
41
-
42
-	/**
43
-	 * @param string $key
44
-	 * @param array  $read_options
45
-	 *
46
-	 * @return string|bool
47
-	 */
48
-	public function get($key, array $read_options = []){}
49
-
50
-	/**
51
-	 * Alias of LevelDB::put()
52
-	 *
53
-	 * @param string $key
54
-	 * @param string $value
55
-	 * @param array  $write_options
56
-	 */
57
-	public function set($key, $value, array $write_options = []){}
58
-
59
-	/**
60
-	 * @param string $key
61
-	 * @param string $value
62
-	 * @param array  $write_options
63
-	 */
64
-	public function put($key, $value, array $write_options = []){}
65
-
66
-	/**
67
-	 * @param string $key
68
-	 * @param array  $write_options
69
-	 *
70
-	 * @return bool
71
-	 */
72
-	public function delete($key, array $write_options = []){}
73
-
74
-	/**
75
-	 * Executes all of the operations added in the write batch.
76
-	 *
77
-	 * @param LevelDBWriteBatch $batch
78
-	 * @param array             $write_options
79
-	 */
80
-	public function write(LevelDBWriteBatch $batch, array $write_options = []){}
81
-
82
-	/**
83
-	 * Valid properties:
84
-	 * - leveldb.stats: returns the status of the entire db
85
-	 * - leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level.
86
-	 * - leveldb.sstables: returns current status of sstables
87
-	 *
88
-	 * @param string $name
89
-	 *
90
-	 * @return mixed
91
-	 */
92
-	public function getProperty($name){}
93
-
94
-	public function getApproximateSizes($start, $limit){}
95
-
96
-	public function compactRange($start, $limit){}
97
-
98
-	public function close(){}
99
-
100
-	/**
101
-	 * @param array $options
102
-	 *
103
-	 * @return LevelDBIterator
104
-	 */
105
-	public function getIterator(array $options = []){}
106
-
107
-	/**
108
-	 * @return LevelDBSnapshot
109
-	 */
110
-	public function getSnapshot(){}
111
-
112
-	static public function destroy($name, array $options = []){}
113
-
114
-	static public function repair($name, array $options = []){}
17
+    /**
18
+     * @param string $name Path to database
19
+     * @param array  $options
20
+     * @param array  $read_options
21
+     * @param array  $write_options
22
+     */
23
+    public function __construct($name, array $options = [
24
+        'create_if_missing' => true, // if the specified database does not exist will create a new one
25
+        'error_if_exists'   => false, // if the opened database exists will throw exception
26
+        'paranoid_checks'   => false,
27
+        'block_cache_size'  => 8 * (2 << 20),
28
+        'write_buffer_size' => 4<<20,
29
+        'block_size'        => 4096,
30
+        'max_open_files'    => 1000,
31
+        'block_restart_interval' => 16,
32
+        'compression'       => LEVELDB_SNAPPY_COMPRESSION,
33
+        'comparator'        => NULL, // any callable parameter return 0, -1, 1
34
+    ], array $read_options = [
35
+        'verify_check_sum'  => false, //may be set to true to force checksum verification of all data that is read from the file system on behalf of a particular read. By default, no such verification is done.
36
+        'fill_cache'        => true, //When performing a bulk read, the application may set this to false to disable the caching so that the data processed by the bulk read does not end up displacing most of the cached contents.
37
+    ], array $write_options = [
38
+        //Only one element named sync in the write option array. By default, each write to leveldb is asynchronous.
39
+        'sync' => false
40
+    ]){}
41
+
42
+    /**
43
+     * @param string $key
44
+     * @param array  $read_options
45
+     *
46
+     * @return string|bool
47
+     */
48
+    public function get($key, array $read_options = []){}
49
+
50
+    /**
51
+     * Alias of LevelDB::put()
52
+     *
53
+     * @param string $key
54
+     * @param string $value
55
+     * @param array  $write_options
56
+     */
57
+    public function set($key, $value, array $write_options = []){}
58
+
59
+    /**
60
+     * @param string $key
61
+     * @param string $value
62
+     * @param array  $write_options
63
+     */
64
+    public function put($key, $value, array $write_options = []){}
65
+
66
+    /**
67
+     * @param string $key
68
+     * @param array  $write_options
69
+     *
70
+     * @return bool
71
+     */
72
+    public function delete($key, array $write_options = []){}
73
+
74
+    /**
75
+     * Executes all of the operations added in the write batch.
76
+     *
77
+     * @param LevelDBWriteBatch $batch
78
+     * @param array             $write_options
79
+     */
80
+    public function write(LevelDBWriteBatch $batch, array $write_options = []){}
81
+
82
+    /**
83
+     * Valid properties:
84
+     * - leveldb.stats: returns the status of the entire db
85
+     * - leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level.
86
+     * - leveldb.sstables: returns current status of sstables
87
+     *
88
+     * @param string $name
89
+     *
90
+     * @return mixed
91
+     */
92
+    public function getProperty($name){}
93
+
94
+    public function getApproximateSizes($start, $limit){}
95
+
96
+    public function compactRange($start, $limit){}
97
+
98
+    public function close(){}
99
+
100
+    /**
101
+     * @param array $options
102
+     *
103
+     * @return LevelDBIterator
104
+     */
105
+    public function getIterator(array $options = []){}
106
+
107
+    /**
108
+     * @return LevelDBSnapshot
109
+     */
110
+    public function getSnapshot(){}
111
+
112
+    static public function destroy($name, array $options = []){}
113
+
114
+    static public function repair($name, array $options = []){}
115 115
 }
116 116
 
117 117
 class LevelDBIterator implements Iterator{
118 118
 
119
-	public function __construct(LevelDB $db, array $read_options = []){}
119
+    public function __construct(LevelDB $db, array $read_options = []){}
120 120
 
121
-	public function valid(){}
121
+    public function valid(){}
122 122
 
123
-	public function rewind(){}
123
+    public function rewind(){}
124 124
 
125
-	public function last(){}
125
+    public function last(){}
126 126
 
127
-	public function seek($key){}
127
+    public function seek($key){}
128 128
 
129
-	public function next(){}
129
+    public function next(){}
130 130
 
131
-	public function prev(){}
131
+    public function prev(){}
132 132
 
133
-	public function key(){}
133
+    public function key(){}
134 134
 
135
-	public function current(){}
135
+    public function current(){}
136 136
 
137
-	public function getError(){}
137
+    public function getError(){}
138 138
 
139
-	public function destroy(){}
139
+    public function destroy(){}
140 140
 
141 141
 }
142 142
 
143 143
 class LevelDBWriteBatch{
144
-	public function __construct($name, array $options = [], array $read_options = [], array $write_options = []){}
144
+    public function __construct($name, array $options = [], array $read_options = [], array $write_options = []){}
145 145
 
146
-	public function set($key, $value, array $write_options = []){}
146
+    public function set($key, $value, array $write_options = []){}
147 147
 
148
-	public function put($key, $value, array $write_options = []){}
148
+    public function put($key, $value, array $write_options = []){}
149 149
 
150
-	public function delete($key, array $write_options = []){}
150
+    public function delete($key, array $write_options = []){}
151 151
 
152
-	public function clear(){}
152
+    public function clear(){}
153 153
 }
154 154
 
155 155
 class LevelDBSnapshot{
156
-	public function __construct(LevelDB $db){}
156
+    public function __construct(LevelDB $db){}
157 157
 
158
-	public function release(){}
158
+    public function release(){}
159 159
 
160 160
 }
161 161
 
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         return;
28 28
     } else if (strpos($entity, 'Psr\Cache') === 0) {
29 29
         trigger_error('If you cannot use <b>composer</b>, you have to include manually the Psr\\Cache interfaces.<br />See: https://github.com/php-fig/cache/tree/master/src<br /> Called ' . $entity,
30
-          E_USER_ERROR);
30
+            E_USER_ERROR);
31 31
 
32 32
         return;
33 33
     }
@@ -42,5 +42,5 @@  discard block
 block discarded – undo
42 42
 
43 43
 if (class_exists('Composer\Autoload\ClassLoader')) {
44 44
     trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
45
-      E_USER_WARNING);
45
+        E_USER_WARNING);
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.