mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 17:49:19 +02:00
apply StyleCI recommendation
This commit is contained in:
parent
8ad6300c1c
commit
46c49e5455
3 changed files with 5 additions and 5 deletions
|
@ -186,7 +186,7 @@ class I18n
|
||||||
if ($match == 'en') {
|
if ($match == 'en') {
|
||||||
self::$_translations = array();
|
self::$_translations = array();
|
||||||
} else {
|
} else {
|
||||||
$data = file_get_contents(self::_getPath($match . '.json'));
|
$data = file_get_contents(self::_getPath($match . '.json'));
|
||||||
self::$_translations = Json::decode($data);
|
self::$_translations = Json::decode($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ class I18n
|
||||||
{
|
{
|
||||||
$file = self::_getPath('languages.json');
|
$file = self::_getPath('languages.json');
|
||||||
if (count(self::$_languageLabels) == 0 && is_readable($file)) {
|
if (count(self::$_languageLabels) == 0 && is_readable($file)) {
|
||||||
$data = file_get_contents($file);
|
$data = file_get_contents($file);
|
||||||
self::$_languageLabels = Json::decode($data);
|
self::$_languageLabels = Json::decode($data);
|
||||||
}
|
}
|
||||||
if (count($languages) == 0) {
|
if (count($languages) == 0) {
|
||||||
|
|
|
@ -111,7 +111,7 @@ class Request
|
||||||
// it might be a creation or a deletion, the latter is detected below
|
// it might be a creation or a deletion, the latter is detected below
|
||||||
$this->_operation = 'create';
|
$this->_operation = 'create';
|
||||||
try {
|
try {
|
||||||
$data = file_get_contents(self::$_inputStream);
|
$data = file_get_contents(self::$_inputStream);
|
||||||
$this->_params = Json::decode($data);
|
$this->_params = Json::decode($data);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// ignore error, $this->_params will remain empty
|
// ignore error, $this->_params will remain empty
|
||||||
|
|
|
@ -524,7 +524,7 @@ class ControllerTest extends TestCase
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$paste = Helper::getPaste();
|
$paste = Helper::getPaste();
|
||||||
$this->_data->create(Helper::getPasteId(), $paste);
|
$this->_data->create(Helper::getPasteId(), $paste);
|
||||||
ob_start();
|
ob_start();
|
||||||
new Controller;
|
new Controller;
|
||||||
|
@ -551,7 +551,7 @@ class ControllerTest extends TestCase
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
$paste = Helper::getPaste();
|
$paste = Helper::getPaste();
|
||||||
$this->_data->create(Helper::getPasteId(), $paste);
|
$this->_data->create(Helper::getPasteId(), $paste);
|
||||||
ob_start();
|
ob_start();
|
||||||
new Controller;
|
new Controller;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue