Skip to content

Conversation

@odain-cbd
Copy link
Contributor

@odain-cbd odain-cbd commented Oct 17, 2025

Current PR aims at validating code style easily via php-cs-fixer.

this tool is also integrated into Jenkins pipeline along to phpstan/phpunit.
Jenkins steps have been reordered logically (code style/phpstan/phpunit).

report generated in Jenkins is in verbose. you can have it by calling:

test/php-code-style/validate.sh

whole code base has been re-formatted. style will be clean starting with this PR.

@odain-cbd odain-cbd requested review from Molkobain and jf-cbd October 17, 2025 06:54
@odain-cbd odain-cbd self-assigned this Oct 17, 2025
@odain-cbd odain-cbd added enhancement New feature or request internal Work made by Combodo labels Oct 17, 2025
@Hipska
Copy link
Collaborator

Hipska commented Oct 17, 2025

Ew, spaces for indentation? 😱 Current docs luckily still say to use tabs.

@odain-cbd
Copy link
Contributor Author

Ew, spaces for indentation? 😱 Current docs luckily still say to use tabs.

thanks for this feedback. good catch!

Copy link
Collaborator

@Hipska Hipska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better now, some minor comments/suggestions.

Comment on lines -603 to +611
if (in_array($sHeader, $aField['columns'])) return true;
if (in_array($sHeader, $aField['columns'])) {
return true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single line if-return should be allowed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to have but tricky to configure
PHP-CS-Fixer/PHP-CS-Fixer#2780

Comment on lines +753 to +756
$sResult = self::CallItopViaHttp(
"/synchro/synchro_exec.php?login_mode=$sLoginform",
$aData
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about

Suggested change
$sResult = self::CallItopViaHttp(
"/synchro/synchro_exec.php?login_mode=$sLoginform",
$aData
);
$sResult = self::CallItopViaHttp("/synchro/synchro_exec.php?login_mode=$sLoginform", $aData);

Comment on lines -108 to +110
Utils::Log(LOG_ERR,
"[".get_class($this)."] defaults section configuration is not correct. please see documentation.");
Utils::Log(
LOG_ERR,
"[".get_class($this)."] defaults section configuration is not correct. please see documentation."
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar here (and other Utils::Log calls), why can't it just be on 1 line? It's not that complicated to see what's happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hacktoberfest-accepted internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants