@@ -298,7 +298,11 @@ public function __construct(
298298 self ::$ constructCount ++;
299299 file_put_contents ('/tmp/or-debug.log ' , "MagicMapper::__construct # " .self ::$ constructCount ."\n" , FILE_APPEND );
300300 if (self ::$ constructCount > 2 ) {
301- file_put_contents ('/tmp/or-debug.log ' , "CIRCULAR! Stack: \n" .(new \Exception ())->getTraceAsString ()."\n" , FILE_APPEND );
301+ file_put_contents (
302+ '/tmp/or-debug.log ' ,
303+ "CIRCULAR! Stack: \n" .(new \Exception ())->getTraceAsString ()."\n" ,
304+ FILE_APPEND
305+ );
302306 return ;
303307 }
304308
@@ -878,8 +882,10 @@ public function getSimpleFacetsFromRegisterSchemaTable(array $query, Register $r
878882 schemaSlug: $ schema ->getSlug ()
879883 );
880884 if ($ isMagicEnabled === true ) {
885+ // phpcs:ignore Generic.Files.LineLength.TooLong -- log message string cannot be shortened
886+ $ infoMsg = '[MagicMapper] Register+schema table does not exist but magic mapping enabled, creating table for facets ' ;
881887 $ this ->logger ->info (
882- message: ' [MagicMapper] Register+schema table does not exist but magic mapping enabled, creating table for facets ' ,
888+ message: $ infoMsg ,
883889 context: [
884890 'file ' => __FILE__ ,
885891 'line ' => __LINE__ ,
@@ -1107,8 +1113,10 @@ private function searchAcrossMultipleTablesWithUnion(array $query, array $regist
11071113 schemaSlug: $ schema ->getSlug ()
11081114 );
11091115 if ($ isMagicEnabled === true ) {
1116+ // phpcs:ignore Generic.Files.LineLength.TooLong -- log message string cannot be shortened
1117+ $ infoMsg = '[MagicMapper] Register+schema table does not exist but magic mapping enabled, creating table for cross-search ' ;
11101118 $ this ->logger ->info (
1111- message: ' [MagicMapper] Register+schema table does not exist but magic mapping enabled, creating table for cross-search ' ,
1119+ message: $ infoMsg ,
11121120 context: [
11131121 'file ' => __FILE__ ,
11141122 'line ' => __LINE__ ,
@@ -1607,6 +1615,7 @@ private function checkTableExistsInDatabase(string $tableName): bool
16071615 $ isPostgres = stripos ($ platform ::class, 'PostgreSQL ' ) !== false ;
16081616
16091617 if ($ isPostgres === true ) {
1618+ // phpcs:ignore Generic.Files.LineLength.TooLong -- SQL query cannot be shortened
16101619 $ sql = "SELECT 1 FROM information_schema.tables WHERE table_name = ? AND table_schema = current_schema() LIMIT 1 " ;
16111620 } else {
16121621 // MySQL/MariaDB/SQLite.
@@ -1868,7 +1877,9 @@ public function syncTableForRegisterSchema(Register $register, Schema $schema):
18681877 // Calculate regular properties (excluding metadata).
18691878 $ regularPropCount = count ($ requiredColumns ) - $ metadataCount ;
18701879
1871- $ unchangedCount = count ($ currentColumns ) - count ($ columnStats ['columnsAdded ' ]) - count ($ columnStats ['columnsDropped ' ]);
1880+ $ addedCount = count ($ columnStats ['columnsAdded ' ]);
1881+ $ droppedCount = count ($ columnStats ['columnsDropped ' ]);
1882+ $ unchangedCount = count ($ currentColumns ) - $ addedCount - $ droppedCount ;
18721883
18731884 $ result = [
18741885 'success ' => true ,
@@ -3158,8 +3169,10 @@ private function prepareObjectDataForTable(array $objectData, Register $register
31583169 && (($ propertyConfig ['items ' ]['type ' ] ?? '' ) === 'file ' );
31593170
31603171 if ($ isFileProperty === true && is_string ($ value ) === true && strpos ($ value , 'data: ' ) === 0 ) {
3172+ // phpcs:ignore Generic.Files.LineLength.TooLong -- log message string cannot be shortened
3173+ $ warnMsg = '[MagicMapper] File property contains unprocessed base64 data URL - setting to null to prevent DB error ' ;
31613174 $ this ->logger ->warning (
3162- message: ' [MagicMapper] File property contains unprocessed base64 data URL - setting to null to prevent DB error ' ,
3175+ message: $ warnMsg ,
31633176 context: [
31643177 'file ' => __FILE__ ,
31653178 'line ' => __LINE__ ,
@@ -3175,8 +3188,10 @@ private function prepareObjectDataForTable(array $objectData, Register $register
31753188 $ cleanedArray = [];
31763189 foreach ($ value as $ item ) {
31773190 if (is_string ($ item ) === true && strpos ($ item , 'data: ' ) === 0 ) {
3191+ // phpcs:ignore Generic.Files.LineLength.TooLong -- log message string cannot be shortened
3192+ $ warnMsg = '[MagicMapper] Array file item contains unprocessed base64 data URL - skipping item ' ;
31783193 $ this ->logger ->warning (
3179- message: ' [MagicMapper] Array file item contains unprocessed base64 data URL - skipping item ' ,
3194+ message: $ warnMsg ,
31803195 context: [
31813196 'file ' => __FILE__ ,
31823197 'line ' => __LINE__ ,
@@ -6253,7 +6268,8 @@ public function findByRelationBatchInSchema(
62536268 // PostgreSQL: Handle both array and object formats.
62546269 // - For arrays: use @> containment operator (can't use ? as it conflicts with PDO placeholders).
62556270 // - For objects: use jsonb_each_text to search values.
6256- $ arrSql = "(jsonb_typeof(_relations)='array' AND _relations @> to_jsonb(?::text)) " ;
6271+ $ arrSql = "(jsonb_typeof(_relations)='array' AND _relations @> to_jsonb(?::text)) " ;
6272+ // phpcs:ignore Generic.Files.LineLength.TooLong -- SQL query cannot be shortened
62576273 $ objSql = "(jsonb_typeof(_relations)='object' AND EXISTS(SELECT 1 FROM jsonb_each_text(_relations) kv WHERE kv.value=?)) " ;
62586274 $ conditions [] = "( {$ arrSql } OR {$ objSql }) " ;
62596275 $ params [] = $ uuid ;
@@ -8104,11 +8120,12 @@ public function searchObjectsPaginated(
81048120 *
81058121 * @return array{results: ObjectEntity[], total: int, registers: array, schemas: array}
81068122 *
8107- * @SuppressWarnings(PHPMD.BooleanArgumentFlag) Flags control security filtering behavior
8123+ * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
8124+ * Flags control security filtering behavior
81088125 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
81098126 * @SuppressWarnings(PHPMD.NPathComplexity)
81108127 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
8111- * @psalm-suppress UnusedParam Parameters reserved for future per-schema security filtering.
8128+ * @psalm-suppress UnusedParam Reserved for future per-schema security filtering.
81128129 */
81138130 private function searchObjectsPaginatedMultiSchema (
81148131 array $ searchQuery ,
0 commit comments