Skip to content

Commit 932ade3

Browse files
authored
try PSR-12 again with added test on src directory (openemr#3403)
* try PSR-12 again with added test on src directory * fix indent * add src dir and couple exclude patterns * easy PSR-12 clean up and little peak at refactor work ahead in src directory
1 parent e8461c9 commit 932ade3

File tree

2,731 files changed

+25330
-21674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,731 files changed

+25330
-21674
lines changed

.travis.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@ addons:
1515
- &lint_style |
1616
failTest=false
1717
echo "--------------------------------------"
18-
echo "Checking for PHP styling (PSR2) issues"
18+
echo "Checking for PHP styling (PSR-12) issues"
1919
echo "--------------------------------------"
2020
composer global require "squizlabs/php_codesniffer=3.*" || failTest=true
2121
$HOME/.config/composer/vendor/bin/phpcs -p -n --extensions=php,inc --report-width=120 --standard=ci/phpcs.xml --report=full . || failTest=true
22+
# todo clean up method visibility and other refactors in src/
23+
# $HOME/.config/composer/vendor/bin/phpcs -p -n --extensions=php,inc --report-width=120 --standard=ci/phpcs_src.xml --report=full src/ || failTest=true
24+
2225
if $failTest; then
2326
failJob=true
2427
mes="FAILED"
2528
else
2629
mes="PASSED"
2730
fi
2831
echo "-----------------------------------------------"
29-
jobTest="${mes} - Checking for PHP styling (PSR2) issues"
32+
jobTest="${mes} - Checking for PHP styling (PSR-12) issues"
3033
jobTests+="${jobTest}\n"
3134
echo "${jobTest}"
3235
echo "-----------------------------------------------"
@@ -207,7 +210,7 @@ before_script:
207210
- echo 'error_reporting = "E_ALL & ~E_NOTICE & ~E_STRICT"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
208211
jobs:
209212
include:
210-
- name: 'Psr2 style'
213+
- name: 'Psr12 style'
211214
php: '7.4'
212215
script:
213216
- failJob=false

Documentation/help_files/add_edit_transactions_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Add Edit Transaction Dashboard Help.
45
*

Documentation/help_files/adminacl_help.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Access Control List Help.
45
*
@@ -9,7 +10,6 @@
910
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
1011
*/
1112

12-
1313
require_once("../../interface/globals.php");
1414

1515
use OpenEMR\Core\Header;

Documentation/help_files/cms_1500_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* CMS 1500 Help.
45
*

Documentation/help_files/common_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* New Encounter Help.
45
*

Documentation/help_files/configure_orders_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Message Center Help.
45
*

Documentation/help_files/fee_sheet_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Fee Sheet Help.
45
*

Documentation/help_files/history_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* History Dashboard Help.
45
*

Documentation/help_files/issues_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Issues Dashboard Help.
45
*

Documentation/help_files/ledger_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Ledger Dashboard Help.
45
*

Documentation/help_files/medical_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Medical Dashboard Help.
45
*

Documentation/help_files/message_center_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Message Center Help.
45
*

Documentation/help_files/mfa_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Message Center Help.
45
*

Documentation/help_files/openemr_installation_help.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* OpenEMR Installation Help.
45
*
@@ -8,6 +9,7 @@
89
* @copyright Copyright (c) 2019 Ranganath Pathak <[email protected]>
910
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
1011
*/
12+
1113
?>
1214
<!DOCTYPE HTML>
1315
<html>

Documentation/help_files/openemr_multisite_admin_help.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Multi Site Administration Help.
45
*
@@ -8,6 +9,7 @@
89
* @copyright Copyright (c) 2019 Ranganath Pathak <[email protected]>
910
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
1011
*/
12+
1113
?>
1214
<!DOCTYPE HTML>
1315
<html>

Documentation/help_files/procedure_provider_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Message Center Help.
45
*

Documentation/help_files/report_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Report Dashboard Help.
45
*

Documentation/help_files/sl_eob_help.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Access Control List Help.
45
*
@@ -9,6 +10,7 @@
910
* @copyright Copyright (c) 2017 Ranganath Pathak <[email protected]>
1011
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
1112
*/
13+
1214
use OpenEMR\Core\Header;
1315

1416
require_once("../../interface/globals.php");

Documentation/help_files/transactions_dashboard_help.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Transactions Dashboard Help.
45
*

Documentation/privileged_db/secure_sqlconf.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is an example secure_sqlconf.php provided for reference.
45
* After configuring the MySQL user 'secure' with password 'securepassword'

_rest_config.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Useful globals class for Rest
45
*
@@ -88,7 +89,7 @@ static function GetInstance()
8889
}
8990

9091
if (!self::$INSTANCE instanceof self) {
91-
self::$INSTANCE = new self;
92+
self::$INSTANCE = new self();
9293
}
9394

9495
return self::$INSTANCE;

_rest_routes.inc.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Routes
45
* (All REST routes)

0 commit comments

Comments
 (0)