mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-28 17:08:41 +00:00
test fixes
This commit is contained in:
parent
772453e753
commit
9c02749567
|
|
@ -456,6 +456,8 @@ final class ReadMapper extends DataMapperAbstract
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var_dump($query->execute()?->fetchColumn());
|
||||||
|
|
||||||
return $query->execute()?->fetchColumn();
|
return $query->execute()?->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -243,8 +243,12 @@ class BinarySearchTree
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = null;
|
$temp = null;
|
||||||
if ($node->left === null) {
|
if ($node->right !== null) {
|
||||||
$temp = $node->right->root;
|
$temp = $node->right->root;
|
||||||
|
if ($temp === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($node->parent !== null) {
|
if ($node->parent !== null) {
|
||||||
if ($node->parent->left !== null
|
if ($node->parent->left !== null
|
||||||
&& $node->parent->left->root?->compare($node->data) === 0
|
&& $node->parent->left->root?->compare($node->data) === 0
|
||||||
|
|
@ -264,8 +268,12 @@ class BinarySearchTree
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($node->right === null) {
|
if ($node->left !== null) {
|
||||||
$temp = $node->left->root;
|
$temp = $node->left->root;
|
||||||
|
if ($temp === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($node->parent !== null) {
|
if ($node->parent !== null) {
|
||||||
if ($node->parent->left !== null
|
if ($node->parent->left !== null
|
||||||
&& $node->parent->left->root?->compare($node->data) === 0
|
&& $node->parent->left->root?->compare($node->data) === 0
|
||||||
|
|
@ -291,6 +299,13 @@ class BinarySearchTree
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return $this->root?->toArray() ?? ['key' => null, 0 => null, 1 => null];
|
return $this->root?->toArray() ?? ['key' => null, 0 => null, 1 => null];
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,13 @@ class Node
|
||||||
return $this->data <=> $data;
|
return $this->data <=> $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class ICalParser
|
||||||
$event['location'] = $locationMatch[1];
|
$event['location'] = $locationMatch[1];
|
||||||
|
|
||||||
\preg_match('/GEO:(.*?)\r\n/', $match[1], $geo);
|
\preg_match('/GEO:(.*?)\r\n/', $match[1], $geo);
|
||||||
$temp = \explode(';', $geo[1]);
|
$temp = \explode(';', $geo[1]);
|
||||||
$event['geo'] = [
|
$event['geo'] = [
|
||||||
'lat' => (float) $temp[0],
|
'lat' => (float) $temp[0],
|
||||||
'lon' => (float) $temp[1],
|
'lon' => (float) $temp[1],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user