- Issue created by @paraderojether
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 3:12am 2 June 2023 - ๐ต๐ญPhilippines paraderojether
Created a patch to fix the issues reported by phpcs.
Please review.
Thank You. - thakurnishant_06 India
Hello everyone,
Tested the #2 patch for pachu 1.0.x-dev on Drupal 9.5.9 and PHP 8.2.4, the issue has been successfully fixed for me. Attached before and after screenshots for references.Thank you for your support!!!
- Status changed to Needs work
over 1 year ago 9:50am 2 June 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The reported errors/warnings are more than the ones shown in the issue summary.
- Assigned to nitin_lama
- Status changed to Needs review
over 1 year ago 10:20am 2 June 2023 - ๐ฎ๐ณIndia nitin_lama India
True @apaderno . Updated patch.
Only warning left:
- Issue was unassigned.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
That warning just says
phpcs
cannot show errors/warnings for minified files. It does not require any change in the project files. - Status changed to Needs work
over 1 year ago 11:08am 2 June 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
+;/*! * jQuery Cycle Plugin (with Transition Definitions) * Examples and documentation at: http://jquery.malsup.com/cycle/ * Copyright (c) 2007-2013 M. Alsup @@ -6,26 +6,26 @@ * Dual licensed under the MIT and GPL licenses. * http://jquery.malsup.com/license.html * Requires: jQuery v1.7.1 or later - */ -;(function($, undefined) { + */(function ($, undefined) {
It is not necessary to move the semicolon before the comment; it needs to be simple be removed.
A closure is placed on its own line, not on the line containing a comment delimiter.function debug(s) { - if ($.fn.cycle.debug) - log(s); -} + if ($.fn.cycle.debug) { + log(s); + } +}
Those lines are still not correctly indented, since Drupal uses two spaces also for the indentation of JavaScript files.
+ /*global console */ + if (window.console && console.log) { + console.log('[cycle] ' + Array.prototype.join.call(arguments,' ')); + }
I would rather remove that comment (which is still not correctly formatted), since there is no need to explain what
window.console
is accessing.I would also avoid changing the jquery.cycle.all.js file, since that is a file copied from another repository. It does not make sense to change that file all the time it is updated. (The fact projects hosted on drupal.org should avoid including files hosted somewhere else is a different matter, considering there are exceptions to that.)
The same holds true for other files that have been copied from other repositories. - Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:33am 6 June 2023 - thakurnishant_06 India
Hello nitin_lama
Tested your #11 patch and implemented on my website having Drupal 9.5.9 and PHP 8.2. I will be adding screenshot (after patch) for reference.
Thank you for your support!! - ๐ฎ๐ณIndia Ridhima gupta Jaipur , Rajasthan
Ridhima gupta โ made their first commit to this issueโs fork.