phpcs fixes

This commit is contained in:
Dennis Eichhorn 2020-12-05 21:39:55 +01:00
parent fb295292be
commit 710ff5f7d3
5 changed files with 43 additions and 30 deletions

View File

@ -369,7 +369,7 @@ final class Complex
public function div(int|float|self $value) : self
{
if (\is_numeric($value)) {
return $this->divScalar($value);
return $this->divScalar($value);
}
return $this->divComplex($value);

View File

@ -31,21 +31,21 @@ use phpOMS\Views\View;
*/
final class SocketResponse extends ResponseAbstract implements RenderableInterface
{
/**
* Set response.
*
* @param array $response Response to set
*
* @return void
*
* @since 1.0.0
*/
public function setResponse(array $response) : void
{
$this->response = $response;
}
/**
* Set response.
*
* @param array $response Response to set
*
* @return void
*
* @since 1.0.0
*/
public function setResponse(array $response) : void
{
$this->response = $response;
}
/**
/**
* Remove response by ID.
*
* @param mixed $id Response ID
@ -54,24 +54,24 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa
*
* @since 1.0.0
*/
public function remove($id) : bool
{
if (isset($this->response[$id])) {
unset($this->response[$id]);
public function remove($id) : bool
{
if (isset($this->response[$id])) {
unset($this->response[$id]);
return true;
}
return true;
}
return false;
}
return false;
}
/**
/**
* {@inheritdoc}
*/
public function getJsonData() : array
{
return \json_decode($this->getRaw(), true);
}
public function getJsonData() : array
{
return \json_decode($this->getRaw(), true);
}
/**
* {@inheritdoc}

View File

@ -0,0 +1,13 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package phpOMS\Uri
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);

View File

@ -402,7 +402,7 @@ final class File extends FileAbstract implements FileInterface
return false; // @codeCoverageIgnore
}
\touch($path);
\touch($path);
return true;
}

View File

@ -115,7 +115,7 @@ final class SystemUtils
\exec('wmic cpu get LoadPercentage', $cpuUsage);
$cpuUsage = $cpuUsage[1];
} elseif (\stristr(\PHP_OS, 'LINUX') !== false) {
$loadavg = \sys_getloadavg();
$loadavg = \sys_getloadavg();
if ($loadavg === false) {
return -1;