apply StyleCI patch

This commit is contained in:
El RIDO 2019-05-10 21:45:34 +02:00
parent 632d70412a
commit 1e44902340
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
9 changed files with 51 additions and 54 deletions

View File

@ -486,7 +486,6 @@ class Database extends AbstractData
return $result; return $result;
} }
/** /**
* get version dependent key names * get version dependent key names
* *

View File

@ -177,6 +177,5 @@ abstract class AbstractModel
*/ */
protected function _validate(array $data) protected function _validate(array $data)
{ {
return;
} }
} }

View File

@ -195,10 +195,9 @@ class Paste extends AbstractModel
if (!array_key_exists('adata', $this->_data) && !array_key_exists('data', $this->_data)) { if (!array_key_exists('adata', $this->_data) && !array_key_exists('data', $this->_data)) {
$this->get(); $this->get();
} }
return ( return
(array_key_exists('adata', $this->_data) && $this->_data['adata'][3] === 1) || (array_key_exists('adata', $this->_data) && $this->_data['adata'][3] === 1) ||
(array_key_exists('burnafterreading', $this->_data['meta']) && $this->_data['meta']['burnafterreading']) (array_key_exists('burnafterreading', $this->_data['meta']) && $this->_data['meta']['burnafterreading']);
);
} }
/** /**
@ -213,10 +212,9 @@ class Paste extends AbstractModel
if (!array_key_exists('adata', $this->_data) && !array_key_exists('data', $this->_data)) { if (!array_key_exists('adata', $this->_data) && !array_key_exists('data', $this->_data)) {
$this->get(); $this->get();
} }
return ( return
(array_key_exists('adata', $this->_data) && $this->_data['adata'][2] === 1) || (array_key_exists('adata', $this->_data) && $this->_data['adata'][2] === 1) ||
(array_key_exists('opendiscussion', $this->_data['meta']) && $this->_data['meta']['opendiscussion']) (array_key_exists('opendiscussion', $this->_data['meta']) && $this->_data['meta']['opendiscussion']);
);
} }
/** /**

View File

@ -161,7 +161,7 @@ class Request
public function getData() public function getData()
{ {
$data = array( $data = array(
'adata' => json_decode($this->getParam('adata', '[]'), true) 'adata' => json_decode($this->getParam('adata', '[]'), true),
); );
$required_keys = array('v', 'ct'); $required_keys = array('v', 'ct');
$meta = $this->getParam('meta'); $meta = $this->getParam('meta');

View File

@ -66,7 +66,7 @@ class Helper
), ),
'plaintext', 'plaintext',
1, 1,
0 0,
), ),
'meta' => array( 'meta' => array(
'expire' => '5min', 'expire' => '5min',
@ -159,6 +159,7 @@ class Helper
$example['meta'] = array('expire' => $example['meta']['expire']); $example['meta'] = array('expire' => $example['meta']['expire']);
return $example; return $example;
} }
/** /**
* get example paste, as received via POST by the user * get example paste, as received via POST by the user
* *