Skip to content

Commit

Permalink
Merge pull request #4 from pkp/main
Browse files Browse the repository at this point in the history
upstream
  • Loading branch information
withanage authored Apr 22, 2021
2 parents 6bbdd6a + 2dda2bf commit 83ec9f6
Show file tree
Hide file tree
Showing 1,132 changed files with 93,926 additions and 45,135 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ styles/build.css
cypress.env.json
cypress/logs/
cypress/screenshots/
.php_cs.cache
50 changes: 50 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__);

// Apply formatting to all plugins that are not git submodules
$pluginsDir = __DIR__ . DIRECTORY_SEPARATOR . 'plugins';
$files = scandir($pluginsDir);
foreach ($files as $file) {
$categoryDir = $pluginsDir . DIRECTORY_SEPARATOR . $file;
if (!in_array($file, ['.', '..']) && is_dir($categoryDir)) {
$pluginDirs = scandir($categoryDir);
foreach ($pluginDirs as $pluginDir) {
$fullPluginPath = join(DIRECTORY_SEPARATOR, [$categoryDir, $pluginDir]);
$gitPath = join(DIRECTORY_SEPARATOR, [$fullPluginPath, '.git']);
if (!in_array($pluginDir, ['.', '..']) && is_dir($fullPluginPath) && !file_exists($gitPath)) {
$finder->in($fullPluginPath);
}
}
}
}

$finder->exclude([
'cache',
'cypress',
'dbscripts',
'docs',
'js',
'lib/pkp',
'lib/ui-library',
'locale',
'node_modules',
'public',
'plugins',
'registry',
'schemas',
'styles',
'templates',
])
->name('*.php')
->name('_ide_helper')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

$rules = include './lib/pkp/.php_cs_rules';

$config = new PhpCsFixer\Config();
return $config->setRules($rules)
->setFinder($finder);
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ matrix:
php: 7.3
- env: TEST=pgsql
php: 7.4
- env: TEST=pgsql
php: 8.0
# MySQL / various PHP
- env: TEST=mysql
php: 7.3
- env: TEST=mysql
php: 7.4
- env: TEST=mysql
php: 8.0
# Path info disabled (DISABLED pending a fix of pkp/pkp-lib#4414)
# - env: TEST=mysql DISABLE_PATH_INFO=1
# php: 7.2
Expand Down
4 changes: 2 additions & 2 deletions api/v1/_email/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
/**
* @file api/v1/_email/index.php
*
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2003-2020 John Willinsky
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2003-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @ingroup api_v1__email
Expand Down
8 changes: 5 additions & 3 deletions api/v1/_payments/BackendPaymentsSettingsHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
/**
* @file api/v1/_payments/BackendPaymentsSettingsHandler.inc.php
*
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2003-2020 John Willinsky
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2003-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class BackendPaymentsSettingsHandler
* @ingroup api_v1_backend
*/
import('lib.pkp.api.v1._payments.PKPBackendPaymentsSettingsHandler');

class BackendPaymentsSettingsHandler extends PKPBackendPaymentsSettingsHandler {}
class BackendPaymentsSettingsHandler extends PKPBackendPaymentsSettingsHandler
{
}
4 changes: 2 additions & 2 deletions api/v1/_payments/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
/**
* @file api/v1/_payments/index.php
*
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2003-2020 John Willinsky
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2003-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @ingroup api_v1_backend
Expand Down
Loading

0 comments on commit 83ec9f6

Please sign in to comment.