PHP 8.2.31
Preview: JoinStringsUnitTest.js Size: 474 B
/opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js

one = (1 + 2);
two = (one + 2);
two = (one + one);
three = ('1' + 2);

four = ['1', two].join();
four = ['1', two].join('');
four = ['1', [one, two].join(',')].join(' ');
four = ['1', [one, two].join()].join(' ');
four = ['1', [one, two].join()].join();

five = 'string' + ['1', [one, two].join()].join() + 'string';

six = myArray.join(' ');
six = [arrayOne, arrayTwo].join();

// This is fine because the array is not created inline.
var x = 'x' + test[x].join('p') + 't';

Directory Contents

Dirs: 0 × Files: 2

Name Size Perms Modified Actions
474 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.61 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).