Skip to content

Commit

Permalink
Merge pull request #143 from Orange-Management/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
spl1nes authored Oct 26, 2017
2 parents 79f5b64 + be14091 commit eede030
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 262 deletions.
8 changes: 4 additions & 4 deletions Account/AccountStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
*/
abstract class AccountStatus extends Enum
{
/* public */ const ACTIVE = 1;
/* public */ const INACTIVE = 2;
/* public */ const TIMEOUT = 3;
/* public */ const BANNED = 4;
/* public */ const ACTIVE = 1;
/* public */ const INACTIVE = 2;
/* public */ const TIMEOUT = 3;
/* public */ const BANNED = 4;
}
4 changes: 2 additions & 2 deletions Account/AccountType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
*/
abstract class AccountType extends Enum
{
/* public */ const USER = 0;
/* public */ const GROUP = 1;
/* public */ const USER = 0;
/* public */ const GROUP = 1;
}
6 changes: 3 additions & 3 deletions Account/GroupStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
abstract class GroupStatus extends Enum
{
/* public */ const ACTIVE = 1;
/* public */ const INACTIVE = 2;
/* public */ const HIDDEN = 4;
/* public */ const ACTIVE = 1;
/* public */ const INACTIVE = 2;
/* public */ const HIDDEN = 4;
}
6 changes: 3 additions & 3 deletions Asset/AssetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
abstract class AssetType extends Enum
{
/* public */ const CSS = 0;
/* public */ const JS = 1;
/* public */ const JSLATE = 2;
/* public */ const CSS = 0;
/* public */ const JS = 1;
/* public */ const JSLATE = 2;
}
2 changes: 1 addition & 1 deletion DataStorage/Database/Connection/ConnectionAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/**
* Database grammar.
*
* @var Grammar
* @var SchemaGrammar
* @since 1.0.0
*/
protected $schemaGrammar = null;
Expand Down
2 changes: 0 additions & 2 deletions DataStorage/Database/DataMapperAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ public static function with(...$objects) /* : void */
// todo: how to handle with of parent objects/extends/relations

self::$fields = $objects;

//return __CLASS__;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion DataStorage/Database/Query/Grammar/GrammarInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

namespace phpOMS\DataStorage\Database\Query\Grammar;

class GrammarInterface
interface GrammarInterface
{
}
3 changes: 2 additions & 1 deletion Math/Geometry/Shape/D2/Polygon.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public function pointInPolygon(array $point) : int
* @param array $polygon Polygon definition
*
* @return int
*
*
* @link http://erich.realtimerendering.com/ptinpoly/
* @since 1.0.0
*/
public static function isPointInPolygon(array $point, array $polygon) : int
Expand Down
6 changes: 4 additions & 2 deletions Math/Matrix/LUDecomposition.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public function __construct(Matrix $M)

public function getL()
{
$L = [[]];

for ($i = 0; $i < $this->m; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
if ($i > $j) {
Expand All @@ -104,6 +106,8 @@ public function getL()

public function getU()
{
$U = [[]];

for ($i = 0; $i < $this->n; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
if ($i <= $j) {
Expand Down Expand Up @@ -154,8 +158,6 @@ public function solve(Matrix $B)
if (!$this->isNonsingular()) {
}

var_dump($this->piv);

$nx = $B->getM();
$X = $B->getMatrix($this->piv, 0, $nx-1);

Expand Down
9 changes: 8 additions & 1 deletion Math/Matrix/QRDecomposition.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public function isFullRank() : bool

public function getH()
{
$H = [[]];

for ($i = 0; $i < $this->m; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
if ($i >= $j) {
Expand All @@ -99,6 +101,8 @@ public function getH()

public function getR()
{
$R = [[]];

for ($i = 0; $i < $this->n; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
if ($i < $j) {
Expand All @@ -119,10 +123,13 @@ public function getR()

public function getQ()
{
$Q = [[]];

for ($k = $this->n-1; $k >= 0; --$k) {
for ($i = 0; $i < $this->m; ++$i) {
$Q[$i][$k] = 0.0;
}
}

$Q[$k][$k] = 1.0;
for ($j = $k; $j < $this->n; ++$j) {
if ($this->QR[$k][$k] != 0) {
Expand Down
222 changes: 0 additions & 222 deletions Math/Optimization/Graph/Graph.php

This file was deleted.

4 changes: 2 additions & 2 deletions Math/Statistic/Average.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ class Average
*
* @since 1.0.0
*/
public static function averageChange(array $x, int $h = 1) : float
public static function averageDatasetChange(array $x, int $h = 1) : float
{
$count = count($x);

return $x[$count - 1] + $h * ($x[$count - 1] - $x[0]) / ($count - 1);
return $h * ($x[$count - 1] - $x[0]) / ($count - 1);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Math/Statistic/MeasureOfDispersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function range(array $values) : float
$end = end($values);
$start = reset($values);

return $start - $end;
return $end - $start;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions Message/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ private function getRaw() : string
return trim(preg_replace('/(\s{2,}|\n)(?![^<>]*<\/pre>)/', ' ', $render);
}

$types = $this->header->get('Content-Type');

if(stripos($types[0], MimeType::M_HTML) !== false) {
return trim(preg_replace('/(\s{2,}|\n|\t)(?![^<>]*<\/pre>)/', ' ', $render));
}

return $render;
}

Expand Down
Loading

0 comments on commit eede030

Please sign in to comment.