Skip to content

Commit b730b77

Browse files
committed
coding style: fixes in code
1 parent fabaead commit b730b77

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

src/Caching/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function save($key, $data, array $dependencies = null)
176176
$this->storage->remove($key);
177177
} else {
178178
$dependencies = $this->completeDependencies($dependencies);
179-
if (isset($dependencies[Cache::EXPIRATION]) && $dependencies[Cache::EXPIRATION] <= 0) {
179+
if (isset($dependencies[self::EXPIRATION]) && $dependencies[self::EXPIRATION] <= 0) {
180180
$this->storage->remove($key);
181181
} else {
182182
$this->storage->write($key, $data, $dependencies);

tests/Caching/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function clean(array $conditions): void
4141

4242
class BulkReadTestStorage extends TestStorage implements IBulkReader
4343
{
44-
function bulkRead(array $keys): array
44+
public function bulkRead(array $keys): array
4545
{
4646
$result = [];
4747
foreach ($keys as $key) {

tests/Storages/FileStorage.call.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Mock
1818
{
19-
function mockFunction($x, $y)
19+
public function mockFunction($x, $y)
2020
{
2121
$GLOBALS['called'] = true;
2222
return $x + $y;
2323
}
2424

2525

26-
function __sleep()
26+
public function __sleep()
2727
{
2828
throw new Exception;
2929
}

tests/Storages/FileStorage.tags.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ $cache->clean([
5757
0 => 'non-existent1',
5858
1 => 'non-existent2',
5959
3 => 'one',
60-
5 => 'non-existent3'
61-
]
60+
5 => 'non-existent3',
61+
],
6262
]);
6363

6464
Assert::null($cache->load('key1'));

tests/Storages/FileStorage.wrap.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function mockFunction($x, $y)
2323

2424
class Test
2525
{
26-
function mockMethod($x, $y)
26+
public function mockMethod($x, $y)
2727
{
2828
$GLOBALS['called'] = true;
2929
return $x + $y;

tests/Storages/IJournalTestCase.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ final public function testDifferentCleaning()
164164
final public function testSpecialChars()
165165
{
166166
$this->journal->write('ok_test7ščřžýáíé', [
167-
Cache::TAGS => ['čšřýýá', 'ýřžčýž']
167+
Cache::TAGS => ['čšřýýá', 'ýřžčýž'],
168168
]);
169169

170170
Assert::same([
@@ -176,10 +176,10 @@ final public function testSpecialChars()
176176
final public function testDuplicatedSameTags()
177177
{
178178
$this->journal->write('ok_test_a', [
179-
Cache::TAGS => ['homepage']
179+
Cache::TAGS => ['homepage'],
180180
]);
181181
$this->journal->write('ok_test_a', [
182-
Cache::TAGS => ['homepage']
182+
Cache::TAGS => ['homepage'],
183183
]);
184184
Assert::same([
185185
'ok_test_a',
@@ -190,11 +190,11 @@ final public function testDuplicatedSameTags()
190190
final public function testDuplicatedSamePriority()
191191
{
192192
$this->journal->write('ok_test_b', [
193-
Cache::PRIORITY => 12
193+
Cache::PRIORITY => 12,
194194
]);
195195

196196
$this->journal->write('ok_test_b', [
197-
Cache::PRIORITY => 12
197+
Cache::PRIORITY => 12,
198198
]);
199199

200200
Assert::same([
@@ -206,11 +206,11 @@ final public function testDuplicatedSamePriority()
206206
final public function testDuplicatedDifferentTags()
207207
{
208208
$this->journal->write('ok_test_ba', [
209-
Cache::TAGS => ['homepage']
209+
Cache::TAGS => ['homepage'],
210210
]);
211211

212212
$this->journal->write('ok_test_ba', [
213-
Cache::TAGS => ['homepage2']
213+
Cache::TAGS => ['homepage2'],
214214
]);
215215

216216
Assert::same([
@@ -225,11 +225,11 @@ final public function testDuplicatedDifferentTags()
225225
final public function testDuplicatedTwoDifferentTags()
226226
{
227227
$this->journal->write('ok_test_baa', [
228-
Cache::TAGS => ['homepage', 'aąa']
228+
Cache::TAGS => ['homepage', 'aąa'],
229229
]);
230230

231231
$this->journal->write('ok_test_baa', [
232-
Cache::TAGS => ['homepage2', 'aaa']
232+
Cache::TAGS => ['homepage2', 'aaa'],
233233
]);
234234

235235
Assert::same([
@@ -244,11 +244,11 @@ final public function testDuplicatedTwoDifferentTags()
244244
final public function testDuplicatedDifferentPriorities()
245245
{
246246
$this->journal->write('ok_test_bb', [
247-
Cache::PRIORITY => 10
247+
Cache::PRIORITY => 10,
248248
]);
249249

250250
$this->journal->write('ok_test_bb', [
251-
Cache::PRIORITY => 20
251+
Cache::PRIORITY => 20,
252252
]);
253253

254254
Assert::same([
@@ -263,7 +263,7 @@ final public function testDuplicatedDifferentPriorities()
263263
final public function testCleanAll()
264264
{
265265
$this->journal->write('ok_test_all_tags', [
266-
Cache::TAGS => ['test:all', 'test:all']
266+
Cache::TAGS => ['test:all', 'test:all'],
267267
]);
268268

269269
$this->journal->write('ok_test_all_priority', [

0 commit comments

Comments
 (0)