Skip to content

Commit b615899

Browse files
committed
updated test with identifiers
1 parent 9195c5a commit b615899

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

.php-cs-fixer.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"php":"8.3.6","version":"3.68.0:v3.68.0#73f78d8b2b34a0dd65fedb434a602ee4c2c8ad4c","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true},"hashes":{"tests\/resources\/expected\/complex-query-profile.php":"003fa2fdf787e68d6fb3e72d698df763","tests\/Unit\/Neo4jExceptionUnitTest.php":"0d7842780eeb9729d501831ee55df0d8","tests\/Unit\/ResultRowTest.php":"f5ee9f21d2439793a290e8ab946a7f32","tests\/Unit\/Neo4jQueryAPIUnitTest.php":"54be7f7b0f9dcf13d62c4912127583b9","tests\/Integration\/Neo4jQueryAPIIntegrationTest.php":"44977ffd6c09c505b00c8ef4857b8bfd","tests\/Integration\/Neo4jOGMTest.php":"73136b2d28fbb4fa298467d1ab3e18c8","src\/OGM.php":"93aae9c7afc8dbfd5aa00bc1d264ad19","src\/Neo4jQueryAPI.php":"9f2e978ed0191040e303f84846a7f556","src\/Results\/ResultRow.php":"ad55ec1bd999a8f6ad6b18874c4017b5","src\/Results\/ResultSet.php":"5f7748a356bf0fb30403e3c5a411bd24","src\/Exception\/Neo4jException.php":"dfb0f6933b9d3913c5495ba6d801d5f1","src\/Objects\/Path.php":"88c95962a6316ba7aa2fa3f0f6e31627","src\/Objects\/Node.php":"4a8ab7b8bd1981ee4d35d8c52b81c7c3","src\/Objects\/ProfiledQueryPlanArguments.php":"1be7b230a034a72c13349a5670a34a2f","src\/Objects\/Person.php":"f2f469937660f5454761e4f31154e081","src\/Objects\/Point.php":"169715b2157e08482e420374e6ca4cc3","src\/Objects\/ProfiledQueryPlan.php":"4709c2a11e73003fc1c027a6a8a62971","src\/Objects\/Bookmarks.php":"50f89ca88b2df817433ce8237ccc0f18","src\/Objects\/ResultCounters.php":"a9372c98fe7bede10cb004af30ea502f","src\/Objects\/Relationship.php":"f6347c0260780d4f5d2dc407dc97e25e","src\/Transaction.php":"e456922858b31d87b17ca47d25d58474"}}
1+
{"php":"8.3.6","version":"3.68.0:v3.68.0#73f78d8b2b34a0dd65fedb434a602ee4c2c8ad4c","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true},"hashes":{"tests\/Unit\/Neo4jExceptionUnitTest.php":"0d7842780eeb9729d501831ee55df0d8","tests\/Unit\/ResultRowTest.php":"f5ee9f21d2439793a290e8ab946a7f32","tests\/Unit\/Neo4jQueryAPIUnitTest.php":"54be7f7b0f9dcf13d62c4912127583b9","tests\/Integration\/Neo4jQueryAPIIntegrationTest.php":"44977ffd6c09c505b00c8ef4857b8bfd","tests\/Integration\/Neo4jOGMTest.php":"73136b2d28fbb4fa298467d1ab3e18c8","src\/OGM.php":"93aae9c7afc8dbfd5aa00bc1d264ad19","src\/Results\/ResultRow.php":"ad55ec1bd999a8f6ad6b18874c4017b5","src\/Results\/ResultSet.php":"5f7748a356bf0fb30403e3c5a411bd24","src\/Exception\/Neo4jException.php":"dfb0f6933b9d3913c5495ba6d801d5f1","src\/Objects\/Path.php":"88c95962a6316ba7aa2fa3f0f6e31627","src\/Objects\/Node.php":"4a8ab7b8bd1981ee4d35d8c52b81c7c3","src\/Objects\/ProfiledQueryPlanArguments.php":"1be7b230a034a72c13349a5670a34a2f","src\/Objects\/Person.php":"f2f469937660f5454761e4f31154e081","src\/Objects\/Point.php":"169715b2157e08482e420374e6ca4cc3","src\/Objects\/Bookmarks.php":"50f89ca88b2df817433ce8237ccc0f18","src\/Objects\/ResultCounters.php":"a9372c98fe7bede10cb004af30ea502f","src\/Objects\/Relationship.php":"f6347c0260780d4f5d2dc407dc97e25e","src\/Transaction.php":"e456922858b31d87b17ca47d25d58474","tests\/resources\/expected\/complex-query-profile.php":"cc2b1e7e731c30a8855d9fa368cd55f3","src\/Neo4jQueryAPI.php":"8bffb787a834b58523e89fc9e5c19fe3","src\/Objects\/ProfiledQueryPlan.php":"d9ba608f3177426ea34d73276d75f20b"}}

src/Neo4jQueryAPI.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ private function createProfileData(array $data): ProfiledQueryPlan
177177
$queryArguments,
178178
children: [],
179179
identifiers: $identifiers
180-
181180
);
182181
// Process children recursively
183182
foreach ($data['children'] as $child) {

src/Objects/ProfiledQueryPlan.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ class ProfiledQueryPlan
2525
private array $identifiers;
2626

2727
public function __construct(
28-
?int $dbHits ,
29-
?int $records ,
30-
?bool $hasPageCacheStats ,
31-
?int $pageCacheHits ,
32-
?int $pageCacheMisses ,
33-
?float $pageCacheHitRatio ,
34-
?int $time ,
28+
?int $dbHits,
29+
?int $records,
30+
?bool $hasPageCacheStats,
31+
?int $pageCacheHits,
32+
?int $pageCacheMisses,
33+
?float $pageCacheHitRatio,
34+
?int $time,
3535
?string $operatorType,
36-
ProfiledQueryPlanArguments $arguments ,
37-
?array $children=[],
38-
array $identifiers=[] // Default to an empty array
36+
ProfiledQueryPlanArguments $arguments,
37+
?array $children = [],
38+
array $identifiers = [] // Default to an empty array
3939
) {
4040
$this->dbHits = $dbHits ?? 0;
4141
$this->records = $records ?? 0;

tests/resources/expected/complex-query-profile.php

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@
242242
id: 11,
243243
estimatedRows: 10.0,
244244
rows: 100
245-
),identifiers: ["i"]
245+
),
246+
identifiers: ["i"]
246247
)
247-
],identifiers: ["i","j"]
248-
248+
],
249+
identifiers: ["i","j"]
249250
),
250251
// CHILD #1.1.1.1.2: CartesianProduct@neo4j (id=5)
251252
new ProfiledQueryPlan(
@@ -338,12 +339,11 @@
338339
id: 9,
339340
estimatedRows: 1000.0,
340341
rows: 20000,
341-
),identifiers: ["i","j","a"]
342-
343-
342+
),
343+
identifiers: ["i","j","a"]
344344
)
345-
],identifiers: ["i","j","a"]
346-
345+
],
346+
identifiers: ["i","j","a"]
347347
),
348348
// CHILD #1.1.1.1.2.2: Filter@neo4j (id=6)
349349
new ProfiledQueryPlan(
@@ -405,22 +405,28 @@
405405
id: 7,
406406
estimatedRows: 1000.0,
407407
rows: 0
408-
),identifiers: ["i","j","b"]
408+
),
409+
identifiers: ["i","j","b"]
409410
)
410-
],identifiers: ["i","j","b"]
411+
],
412+
identifiers: ["i","j","b"]
411413
)
412-
],identifiers: ["i","j","a","b"]
414+
],
415+
identifiers: ["i","j","a","b"]
413416
)
414-
],identifiers: ["i","j","a","b"]
417+
],
418+
identifiers: ["i","j","a","b"]
415419
)
416420
],
417-
418421
identifiers: ["i","j","a","b"]
419422
)
420-
],identifiers: ["j","a","i","b","anon_0","anon_1"]
423+
],
424+
identifiers: ["j","a","i","b","anon_0","anon_1"]
421425
)
422-
],identifiers: ["j","a","i","b","anon_0","anon_1"]
426+
],
427+
identifiers: ["j","a","i","b","anon_0","anon_1"]
423428
)
424-
],identifiers: ["j","a","i","b","anon_0","anon_1"]
429+
],
430+
identifiers: ["j","a","i","b","anon_0","anon_1"]
425431
)
426432
);

0 commit comments

Comments
 (0)