An error occurred while fetching the assigned milestone of the selected merge_request.
Configure testing with GitLab CI
Closes #3423942
Merge request reports
Activity
added 6 commits
- b69420a5 - Apply most fixes from phpcbf
- 11048c81 - Set baseline for phpstan errors
- 8a4195d4 - Wrap most comment lines at 80 characters
- 8d594465 - Use lowerCamelCase for class properties
- 8e9589f2 - Remove @param and @return comments from hook implementations
- c3439c91 - Fix most remaining phpcs errors
Toggle commit listadded 2 commits
1 (function ($, Drupal) { 2 3 /** 4 * Enhancements to states.js. 5 */ 6 // Checking if autocomplete is plugged in. 7 if (Drupal.autocomplete) { 1 /* eslint-disable no-unused-vars */ 2 /* eslint-disable no-restricted-syntax */ 3 /* eslint-disable eqeqeq */ - Comment on lines +1 to +3
changed this line in version 11 of the diff
97 } 98 // Go invisible. 99 if (!e.value) { 100 // Remove required property. 101 $field.trigger({ 102 type: 'state:required', 103 value: false, 104 trigger: true, 105 }); 106 } 107 108 // Go visible. 109 else { 110 // Restore required if necessary. 111 // eslint-disable-next-line no-lonely-if 112 if ($field.data('conditionalFieldsSavedRequired')) { changed this line in version 11 of the diff
273 ) { 274 return false; 275 } 276 } 277 return true; 278 }; 237 279 238 280 /** 239 * Adds RegEx support 240 * https://www.drupal.org/node/1340616 281 * Handle object values for Drupal.states.Dependent.comparisons.Object. 282 * 283 * @param {Object} reference - The reference object for comparison. 284 * @param {string|Array} value - The value to compare with the reference. 285 * @return {boolean} True if the comparison succeeds; otherwise, false. 241 286 */ 295 if (value && value.constructor.name == 'Array') { 296 for (const index in value) { 297 if (regObj.test(value[index])) { 298 return true; 299 } 300 } 301 return false; 249 302 } 250 } 251 return false; 252 } else { 253 303 return regObj.test(value); 304 305 // Adds single XOR support 254 306 } 255 //Adds single XOR support changed this line in version 11 of the diff
266 eq_count++; 307 if ('xor' in reference) { 308 let compare = []; 309 if (typeof value === 'string') { 310 compare = value.split(/\r?\n\r?/); 311 } else if (typeof value === 'object' && value instanceof Array) { 312 compare = value; 267 313 } 314 let eqCount = 0; 315 for (const key in reference.xor) { 316 if ( 317 reference.xor.hasOwnProperty(key) && 318 $.inArray(reference.xor[key], compare) >= 0 319 ) { 320 // eslint-disable-next-line no-plusplus 321 eqCount++; - Comment on lines +320 to +321
Instead of ignoring the rule on this line, either
- Ignore the rule globally (if it is a silly rule); or
- Change
eqCount++
toeqCount += 1
.
Or rename the (integer) variable
eqCount
to something like (boolean)comparison
; initialize ascomparison = false
; replaceeqCount++
withcomparison = !comparison
; andreturn comparison
. changed this line in version 11 of the diff
288 } 289 } 290 }; 343 }, 344 }; 291 345 292 346 /** 293 * The function for compare two strings 294 * @param a 295 * @param b 296 * @returns {boolean|*} 347 * Compare two strings after removing leading and trailing newline characters. 348 * 349 * @param {string|undefined} a - The first string to compare. 350 * @param {string|undefined} b - The second string to compare. 351 * @return {boolean|undefined} True if the strings are equal, undefined if either string is undefined. It looks to me as though the return value is
-
true
if both are strings, and the strings are equal; -
undefined
if both areundefined
; -
true
if one is a string and the other isundefined
; -
false
if both are strings and they are not equal.
The first and last cases are subject to the comment above.
-
changed this line in version 11 of the diff
- Resolved by Lucas Hedding
- Resolved by Lucas Hedding
added 1 commit
- e4fdeee8 - Update tests to use lowerCamelCase properties of the non-test classes
added 20 commits
-
cb322a9a...f988abcf - 3 commits from branch
project:4.x
- f988abcf...a867dd42 - 7 earlier commits
- 1c5361c8 - Keep stylelint happy
- b90ef0ac - Update baseline for phpstan
- e6b6b699 - Addressed Eslint error/warnings
- 1d5c0894 - Fixed all Eslint warnings / errors
- ca9a6d15 - Update tests to use lowerCamelCase properties of the non-test classes
- cea59723 - Let DrupalCI decide where the Drupal root is (PHPStan)
- 5dc2ce16 - Tell phpcs to ignore a line that is commented out
- 9b0c90b9 - Apply new automated fixes from phpcbf
- 0753f82b - Fix comment formatting to keep phpcs happy
- b33394ec - Add a missing @param comment
Toggle commit list-
cb322a9a...f988abcf - 3 commits from branch
added 1 commit
- 5371224f - revert JS changes so we can keep moving on the rest of Gitlab integration
added 3 commits
-
8d14587e...e6acb955 - 2 commits from branch
project:4.x
- 1c142618 - Merge remote-tracking branch 'origin/4.x' into 3423942-gitlab-ci-testing
-
8d14587e...e6acb955 - 2 commits from branch
Please register or sign in to reply