mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
Merge pull request #1101 from PrivateBin/fix-styleci
apply StyleCI patch, fixes #1084
This commit is contained in:
commit
73e000fc75
@ -229,11 +229,10 @@ class Filesystem extends AbstractData
|
|||||||
|
|
||||||
// Store in array
|
// Store in array
|
||||||
$key = $this->getOpenSlot(
|
$key = $this->getOpenSlot(
|
||||||
$comments, (
|
$comments,
|
||||||
(int) array_key_exists('created', $comment['meta']) ?
|
(int) array_key_exists('created', $comment['meta']) ?
|
||||||
$comment['meta']['created'] : // v2 comments
|
$comment['meta']['created'] : // v2 comments
|
||||||
$comment['meta']['postdate'] // v1 comments
|
$comment['meta']['postdate'] // v1 comments
|
||||||
)
|
|
||||||
);
|
);
|
||||||
$comments[$key] = $comment;
|
$comments[$key] = $comment;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,6 @@ class Filter
|
|||||||
$size = $size / 1024;
|
$size = $size / 1024;
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
return number_format($size, ($i ? 2 : 0), '.', ' ') . ' ' . I18n::_($iec[$i]);
|
return number_format($size, $i ? 2 : 0, '.', ' ') . ' ' . I18n::_($iec[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,8 +339,8 @@ class I18n
|
|||||||
return $n % 10 === 1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
return $n % 10 === 1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
||||||
case 'sl':
|
case 'sl':
|
||||||
return $n % 100 === 1 ? 1 : ($n % 100 === 2 ? 2 : ($n % 100 === 3 || $n % 100 === 4 ? 3 : 0));
|
return $n % 100 === 1 ? 1 : ($n % 100 === 2 ? 2 : ($n % 100 === 3 || $n % 100 === 4 ? 3 : 0));
|
||||||
// bg, ca, de, el, en, es, et, fi, hu, it, nl, no, pt
|
|
||||||
default:
|
default:
|
||||||
|
// bg, ca, de, el, en, es, et, fi, hu, it, nl, no, pt
|
||||||
return $n !== 1 ? 1 : 0;
|
return $n !== 1 ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ class Request
|
|||||||
return array_key_exists('REQUEST_URI', $_SERVER) ?
|
return array_key_exists('REQUEST_URI', $_SERVER) ?
|
||||||
htmlspecialchars(
|
htmlspecialchars(
|
||||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||||
) : '/';
|
) : '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -185,9 +185,9 @@ class Vizhash16x16
|
|||||||
$sizeinv = imagesx($img);
|
$sizeinv = imagesx($img);
|
||||||
}
|
}
|
||||||
$diffs = array(
|
$diffs = array(
|
||||||
(($color2[0] - $color1[0]) / $size),
|
($color2[0] - $color1[0]) / $size,
|
||||||
(($color2[1] - $color1[1]) / $size),
|
($color2[1] - $color1[1]) / $size,
|
||||||
(($color2[2] - $color1[2]) / $size),
|
($color2[2] - $color1[2]) / $size,
|
||||||
);
|
);
|
||||||
for ($i = 0; $i < $size; ++$i) {
|
for ($i = 0; $i < $size; ++$i) {
|
||||||
$r = $color1[0] + ($diffs[0] * $i);
|
$r = $color1[0] + ($diffs[0] * $i);
|
||||||
|
@ -196,10 +196,10 @@ class BucketStub extends Bucket
|
|||||||
$prefix = key_exists('prefix', $options) ? $options['prefix'] : '';
|
$prefix = key_exists('prefix', $options) ? $options['prefix'] : '';
|
||||||
|
|
||||||
return new CallbackFilterIterator(
|
return new CallbackFilterIterator(
|
||||||
new ArrayIterator($this->_objects),
|
new ArrayIterator($this->_objects),
|
||||||
function ($current, $key, $iterator) use ($prefix) {
|
function ($current, $key, $iterator) use ($prefix) {
|
||||||
return substr($key, 0, strlen($prefix)) == $prefix;
|
return substr($key, 0, strlen($prefix)) == $prefix;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,10 +195,10 @@ class JsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
'/?jsonld=',
|
'/?jsonld=',
|
||||||
file_get_contents(PUBLIC_PATH . '/js/paste.jsonld')
|
file_get_contents(PUBLIC_PATH . '/js/paste.jsonld')
|
||||||
), $content, 'outputs data correctly');
|
), $content, 'outputs data correctly');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -212,10 +212,10 @@ class JsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
'/?jsonld=',
|
'/?jsonld=',
|
||||||
file_get_contents(PUBLIC_PATH . '/js/comment.jsonld')
|
file_get_contents(PUBLIC_PATH . '/js/comment.jsonld')
|
||||||
), $content, 'outputs data correctly');
|
), $content, 'outputs data correctly');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -229,10 +229,10 @@ class JsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
'/?jsonld=',
|
'/?jsonld=',
|
||||||
file_get_contents(PUBLIC_PATH . '/js/pastemeta.jsonld')
|
file_get_contents(PUBLIC_PATH . '/js/pastemeta.jsonld')
|
||||||
), $content, 'outputs data correctly');
|
), $content, 'outputs data correctly');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -246,10 +246,10 @@ class JsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
'/?jsonld=',
|
'/?jsonld=',
|
||||||
file_get_contents(PUBLIC_PATH . '/js/commentmeta.jsonld')
|
file_get_contents(PUBLIC_PATH . '/js/commentmeta.jsonld')
|
||||||
), $content, 'outputs data correctly');
|
), $content, 'outputs data correctly');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -263,10 +263,10 @@ class JsonApiTest extends PHPUnit_Framework_TestCase
|
|||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertEquals(str_replace(
|
$this->assertEquals(str_replace(
|
||||||
'?jsonld=',
|
'?jsonld=',
|
||||||
'/?jsonld=',
|
'/?jsonld=',
|
||||||
file_get_contents(PUBLIC_PATH . '/js/types.jsonld')
|
file_get_contents(PUBLIC_PATH . '/js/types.jsonld')
|
||||||
), $content, 'outputs data correctly');
|
), $content, 'outputs data correctly');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user