@@ -54,21 +54,19 @@ public function getPropertyTypeName($typeInteger)
54
54
*/
55
55
public function formatQueryResult (QueryResultInterface $ result , OutputInterface $ output , $ elapsed )
56
56
{
57
- $ selectorNames = $ result ->getSelectorNames ();
58
-
59
57
$ table = $ this ->tableHelper ->create ();
60
58
$ table ->setHeaders (array_merge (array (
61
59
'Path ' ,
62
60
'Index ' ,
63
61
), $ result ->getColumnNames ()));
64
62
65
- foreach ($ result ->getRows () as $ i => $ row ) {
63
+ foreach ($ result ->getRows () as $ row ) {
66
64
$ values = array_merge (array (
67
65
$ row ->getPath (),
68
66
$ row ->getNode ()->getIndex (),
69
67
), $ row ->getValues ());
70
68
71
- foreach ($ values as $ columnName => &$ value ) {
69
+ foreach ($ values as &$ value ) {
72
70
$ value = $ this ->normalizeValue ($ value );
73
71
}
74
72
@@ -90,13 +88,17 @@ public function normalizeValue($value)
90
88
91
89
foreach ($ array as $ i => $ value ) {
92
90
if ($ value instanceof NodeInterface) {
91
+ $ uuid = $ value ->getIdentifier ();
93
92
$ value = $ value ->getPath ();
93
+ if ($ uuid ) {
94
+ $ value .= ' ( ' . $ uuid . ') ' ;
95
+ }
94
96
} elseif (is_object ($ value )) {
95
97
$ value = '<UNKNOWN OBJECT> ' ;
96
98
} else {
97
99
$ value = $ value ;
98
100
}
99
- $ value = '[ ' . $ i . '] ' . $ this ->textHelper ->truncate ($ value );
101
+ $ value = '[ ' . $ i . '] ' . $ this ->textHelper ->truncate ($ value, 255 );
100
102
$ values [] = $ value ;
101
103
}
102
104
@@ -112,10 +114,8 @@ public function normalizeValue($value)
112
114
113
115
public function formatValue (PropertyInterface $ value , $ showBinary = false )
114
116
{
115
- $ v = $ value ->getValue ();
116
-
117
- if (is_array ($ v )) {
118
- return $ this ->normalizeValue ($ v );
117
+ if (is_array ($ value ->getValue ())) {
118
+ return $ this ->normalizeValue ($ value ->getValue ());
119
119
}
120
120
121
121
switch (intval ($ value ->getType ())) {
0 commit comments