refactor: Apply PHP7.0 sets
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Родитель
78f4a9ed79
Коммит
de41b51160
|
@ -230,7 +230,7 @@ class Cache extends Horde_Imap_Client_Cache_Backend {
|
|||
* @return void
|
||||
*/
|
||||
public function setMetaData($mailbox, $data) {
|
||||
$this->_loadSliceMap($mailbox, isset($data['uidvalid']) ? $data['uidvalid'] : null);
|
||||
$this->_loadSliceMap($mailbox, $data['uidvalid'] ?? null);
|
||||
$this->_slicemap[$mailbox]['d'] = array_merge($this->_slicemap[$mailbox]['d'], $data);
|
||||
$this->_toUpdate($mailbox, 'slicemap', true);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ class Cache {
|
|||
* @return void
|
||||
*/
|
||||
public function addValue(string $key, ?string $value): void {
|
||||
$this->cache->set($key, $value === null ? false : $value, self::CACHE_TTL);
|
||||
$this->cache->set($key, $value ?? false, self::CACHE_TTL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -24,20 +24,20 @@ class UploadedFile {
|
|||
* @return string|null
|
||||
*/
|
||||
public function getFileName() {
|
||||
return isset($this->fileData['name']) ? $this->fileData['name'] : null;
|
||||
return $this->fileData['name'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTempPath() {
|
||||
return isset($this->fileData['tmp_name']) ? $this->fileData['tmp_name'] : null;
|
||||
return $this->fileData['tmp_name'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMimeType() {
|
||||
return isset($this->fileData['type']) ? $this->fileData['type'] : 'application/octet-stream';
|
||||
return $this->fileData['type'] ?? 'application/octet-stream';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ return RectorConfig::configure()
|
|||
phpunit: true,
|
||||
)
|
||||
->withPhpSets(
|
||||
php55: true,
|
||||
php70: true,
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче