Skip to content

Commit c1a90cd

Browse files
separated enum
1 parent 895ede7 commit c1a90cd

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace Bolt\protocol\v6\structures;
4+
5+
/**
6+
* Type markers for vector data
7+
* @author Michal Stefanak
8+
* @link https://github.com/neo4j-php/Bolt
9+
* @link https://www.neo4j.com/docs/bolt/current/bolt/structure-semantics/#structure-vector
10+
* @package Bolt\protocol\v6\structures
11+
*/
12+
enum TypeMarker: int
13+
{
14+
case INT_8 = 0xC8;
15+
case INT_16 = 0xC9;
16+
case INT_32 = 0xCA;
17+
case INT_64 = 0xCB;
18+
case FLOAT_32 = 0xC6;
19+
case FLOAT_64 = 0xC1;
20+
}

src/protocol/v6/structures/Vector.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Bolt\packstream\Bytes;
66
use Bolt\protocol\IStructure;
7+
use Bolt\protocol\v6\structures\TypeMarker;
78

89
/**
910
* Class Vector
@@ -137,13 +138,3 @@ public function decode(): array
137138
return $output;
138139
}
139140
}
140-
141-
enum TypeMarker: int
142-
{
143-
case INT_8 = 0xC8;
144-
case INT_16 = 0xC9;
145-
case INT_32 = 0xCA;
146-
case INT_64 = 0xCB;
147-
case FLOAT_32 = 0xC6;
148-
case FLOAT_64 = 0xC1;
149-
}

0 commit comments

Comments
 (0)