Closed (fixed)
Project:
Office Hours
Version:
8.x-1.28
Component:
Miscellaneous
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2025 at 12:15 UTC
Updated:
11 Sep 2025 at 19:39 UTC
Jump to comment: Most recent
Comments
Comment #2
bluegeek9 commentedComment #3
johnvYeah, I know, do not try to resolve them.
Ther are stupid rules:
- max 80 char per line
- no empty line after inline comments
- no inline comments after a code line.
- code in inline comments is regardes as text.
Unless you can tell me a way to exclude such nonsense from the phpcs jobs, i will leave it this way.
Thanks, anyway
Comment #4
bluegeek9 commentedWe can add a php.xml.dist file.
Which rules do you want to exclude?
Comment #6
bluegeek9 commentedComment #8
bluegeek9 commentedI am not sure about that one. I think code might need to be in multi line comments.
I add a phpcs.xml.dist to handle:
- max 80 char per line
- no empty line after inline comments
- no inline comments after a code line.
Comment #9
bluegeek9 commentedComment #11
johnvLet us see what happens.
Comment #12
johnvwow, what a relief. The below difference may not seem so much, but it will make a big difference on my other modules, too.
I now will add other errors at some other time, if needed. Thanks.
before: https://git.drupalcode.org/project/office_hours/-/jobs/6276228
After: https://git.drupalcode.org/project/office_hours/-/jobs/6277048
Comment #14
bluegeek9 commentedI addressed obvious items reported by phpcs.
I left commented code alone.
Some of the Hooks have non camel casing. I can fix it but wasn't sure if the change will be welcomed.
Public method name "OfficeHoursThemeHooks::preprocess_field" is not in lowerCamel format
| | (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
Comment #15
johnv"Some of the Hooks have non camel casing. I can fix it but wasn't sure if the change will be welcomed."
Fixing that would be nice. Thank you.
I really appreciate your efforts. I can learn from that and build upon it!
Comment #17
bluegeek9 commentedI fixed Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps and added a unit test form the office_hours.module file.
Comment #20
johnvThanks, committed. Let us await the jobs.
You are fast, I assume you have some tool?
Comment #21
bluegeek9 commentedI use ddev. It includes phpcs and phpcbf.
I also work on Drupal issues everyday :)
Comment #22
johnvThanks.