mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Documentation fixes
This commit is contained in:
parent
232244b981
commit
cfe6fb0059
|
|
@ -70,7 +70,7 @@ class FileLogger implements LoggerInterface
|
|||
*
|
||||
* Potential values are null or a valid file pointer
|
||||
*
|
||||
* @var resource
|
||||
* @var resource|false
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $fp = false;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace phpOMS\Math\Shape\D2;
|
|||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Polygon implements Shape2DInterface
|
||||
class Polygon implements ShapeInterface
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
@ -39,7 +39,7 @@ class Polygon implements Shape2DInterface
|
|||
* @var array[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $coord = null;
|
||||
private $coord = [];
|
||||
|
||||
/**
|
||||
* Polygon perimeter.
|
||||
|
|
@ -47,7 +47,7 @@ class Polygon implements Shape2DInterface
|
|||
* @var float
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $perimeter = null;
|
||||
private $perimeter = 0.0;
|
||||
|
||||
/**
|
||||
* Polygon surface.
|
||||
|
|
@ -55,15 +55,15 @@ class Polygon implements Shape2DInterface
|
|||
* @var float
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $surface = null;
|
||||
private $surface = 0.0;
|
||||
|
||||
/**
|
||||
* Interior angle sum of the polygon.
|
||||
*
|
||||
* @var float
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $interiorAngleSum = null;
|
||||
private $interiorAngleSum = 0;
|
||||
|
||||
/**
|
||||
* Exterior angle sum of the polygon.
|
||||
|
|
@ -71,7 +71,7 @@ class Polygon implements Shape2DInterface
|
|||
* @var float
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $exteriorAngleSum = null;
|
||||
private $exteriorAngleSum = 0.0;
|
||||
|
||||
/**
|
||||
* Polygon barycenter.
|
||||
|
|
@ -79,7 +79,7 @@ class Polygon implements Shape2DInterface
|
|||
* @var float[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $barycenter = null;
|
||||
private $barycenter = ['x' => 0.0, 'y' => 0.0];
|
||||
|
||||
/**
|
||||
* Polygon edge length.
|
||||
|
|
@ -87,7 +87,7 @@ class Polygon implements Shape2DInterface
|
|||
* @var float
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $edgeLength = [];
|
||||
private $edgeLength = 0.0;
|
||||
|
||||
/**
|
||||
* Polygon inner length.
|
||||
|
|
@ -95,15 +95,15 @@ class Polygon implements Shape2DInterface
|
|||
* @var float
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $innerLength = null;
|
||||
private $innerLength = 0.0;
|
||||
|
||||
/**
|
||||
* Polygon inner edge angular.
|
||||
*
|
||||
* @var float
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $innerEdgeAngular = null;
|
||||
private $innerEdgeAngular = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
@ -150,7 +150,7 @@ class Polygon implements Shape2DInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getInteriorAngleSum()
|
||||
public function getInteriorAngleSum() : int
|
||||
{
|
||||
$this->interiorAngleSum = (count($this->coord) - 2) * 180;
|
||||
|
||||
|
|
@ -184,9 +184,9 @@ class Polygon implements Shape2DInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSurface()
|
||||
public function getSurface() : float
|
||||
{
|
||||
$this->surface = 0;
|
||||
$this->surface = 0.0;
|
||||
$count = count($this->coord);
|
||||
|
||||
for ($i = 0; $i < $count - 2; $i++) {
|
||||
|
|
@ -214,14 +214,14 @@ class Polygon implements Shape2DInterface
|
|||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->coord = null;
|
||||
$this->barycenter = null;
|
||||
$this->perimeter = null;
|
||||
$this->surface = null;
|
||||
$this->interiorAngleSum = null;
|
||||
$this->edgeLength = null;
|
||||
$this->innerLength = null;
|
||||
$this->innerEdgeAngular = null;
|
||||
$this->coord = [];
|
||||
$this->barycenter = ['x' => 0.0, 'y' => 0.0];
|
||||
$this->perimeter = 0.0;
|
||||
$this->surface = 0.0;
|
||||
$this->interiorAngleSum = 0;
|
||||
$this->edgeLength = 0.0;
|
||||
$this->innerLength = 0.0;
|
||||
$this->innerEdgeAngular = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -158,14 +158,14 @@ class Response extends ResponseAbstract implements RenderableInterface
|
|||
/**
|
||||
* Set response.
|
||||
*
|
||||
* @param string $response Response to set
|
||||
* @param array $response Response to set
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setResponse(string $response)
|
||||
public function setResponse(array $response)
|
||||
{
|
||||
$this->response = $response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ abstract class ResponseAbstract implements MessageInterface, ArrayableInterface,
|
|||
/**
|
||||
* Response status.
|
||||
*
|
||||
* @var int
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $status = 200;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class PriorityQueue implements \Countable, \Serializable
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($data) : array
|
||||
public function unserialize(array $data) : array
|
||||
{
|
||||
$this->queue = json_decode($data);
|
||||
$this->count = count($this->queue);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ abstract class FileAbstract
|
|||
private $size = 0;
|
||||
private $createdAt = null;
|
||||
private $changedAt = null;
|
||||
private $owner = '';
|
||||
private $owner = 0;
|
||||
private $permission = '0000';
|
||||
|
||||
public function __construct(string $path)
|
||||
|
|
@ -83,7 +83,7 @@ abstract class FileAbstract
|
|||
return $this->changedAt;
|
||||
}
|
||||
|
||||
public function getOwner() : string
|
||||
public function getOwner() : int
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Currency
|
|||
/**
|
||||
* ECB currency rates.
|
||||
*
|
||||
* @var array
|
||||
* @var array|null
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static $ecbCurrencies = null;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class View implements RenderableInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $template = null;
|
||||
protected $template = '';
|
||||
|
||||
/**
|
||||
* Views.
|
||||
|
|
@ -64,7 +64,7 @@ class View implements RenderableInterface
|
|||
/**
|
||||
* View Localization.
|
||||
*
|
||||
* @var array
|
||||
* @var Localization
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $l11n = null;
|
||||
|
|
@ -231,7 +231,7 @@ class View implements RenderableInterface
|
|||
*
|
||||
* @param string $id View ID
|
||||
* @param View $view
|
||||
* @param null|int $order Order of view
|
||||
* @param int $order Order of view
|
||||
* @param bool $overwrite Overwrite existing view
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -239,13 +239,13 @@ class View implements RenderableInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function addView(string $id, View $view, $order = null, bool $overwrite = true)
|
||||
public function addView(string $id, View $view, int $order = 0, bool $overwrite = true)
|
||||
{
|
||||
if ($overwrite || !isset($this->views[$id])) {
|
||||
$this->views[$id] = $view;
|
||||
|
||||
if ($order !== null) {
|
||||
$this->views = uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
|
||||
if ($order !== 0) {
|
||||
uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user