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 public function div(int|float|self $value) : self
{ {
if (\is_numeric($value)) { if (\is_numeric($value)) {
return $this->divScalar($value); return $this->divScalar($value);
} }
return $this->divComplex($value); return $this->divComplex($value);

View File

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

View File

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