Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added all directories to checks #4406

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,7 @@
])
->setFinder(
PhpCsFixer\Finder::create()
->in([
'app/code/core/Mage/',
'errors/',
'lib/Mage/',
'lib/Magento/',
'lib/Varien/',
'shell/',
'tests/unit/',
])
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
Expand Down
10 changes: 1 addition & 9 deletions .rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,12 @@

return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/dev',
__DIR__ . '/errors',
__DIR__ . '/lib',
__DIR__ . '/pub',
__DIR__ . '/shell',
__DIR__ . '/tests',
__DIR__,
])
->withSkipPath(__DIR__ . '/vendor')
->withSkip([
CodeQuality\BooleanNot\SimplifyDeMorganBinaryRector::class,
CodeQuality\If_\SimplifyIfReturnBoolRector::class,
__DIR__ . '/shell/translations.php',
__DIR__ . '/shell/update-copyright.php.php'
])
->withRules([
CodeQuality\BooleanNot\ReplaceMultipleBooleanNotRector::class,
Expand Down
1 change: 1 addition & 0 deletions api.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand Down
9 changes: 5 additions & 4 deletions app/Mage.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand Down Expand Up @@ -37,15 +38,15 @@

$appPath = implode(PS, $paths);
set_include_path($appPath . PS . Mage::registry('original_include_path'));
include_once "Mage/Core/functions.php";
include_once "Varien/Autoload.php";
include_once 'Mage/Core/functions.php';
include_once 'Varien/Autoload.php';

Varien_Autoload::register();

/** AUTOLOADER PATCH **/
$autoloaderPath = getenv('COMPOSER_VENDOR_PATH');
if (!$autoloaderPath) {
$autoloaderPath = dirname(BP) . DS . 'vendor';
$autoloaderPath = dirname(BP) . DS . 'vendor';
if (!is_dir($autoloaderPath)) {
$autoloaderPath = BP . DS . 'vendor';
}
Expand Down Expand Up @@ -150,7 +151,7 @@ final class Mage
public static function getVersion()
{
$i = self::getVersionInfo();
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "")
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : '')
. "-{$i['stability']}{$i['number']}", '.-');
}

Expand Down
1 change: 1 addition & 0 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"friendsofphp/php-cs-fixer": "^3.4",
"macopedia/phpstan-magento1": "^1.0.5",
"magento-ecg/coding-standard": "^4.5",
"openmage/dev-meta-package": "^1.0.5",
"openmage/dev-meta-package": "^1.0.6",
"perftools/php-profiler": "^1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.13",
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions cron.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand All @@ -18,7 +19,7 @@
require 'app/Mage.php';

if (!Mage::isInstalled()) {
echo "Application is not installed yet, please complete install wizard first.";
echo 'Application is not installed yet, please complete install wizard first.';
exit;
}

Expand Down Expand Up @@ -58,8 +59,8 @@
$fileName = escapeshellarg(basename(__FILE__));
$cronPath = escapeshellarg(__DIR__ . '/cron.sh');

shell_exec(escapeshellcmd("/bin/sh $cronPath $fileName -mdefault 1") . " &");
shell_exec(escapeshellcmd("/bin/sh $cronPath $fileName -malways 1") . " &");
shell_exec(escapeshellcmd("/bin/sh $cronPath $fileName -mdefault 1") . ' &');
shell_exec(escapeshellcmd("/bin/sh $cronPath $fileName -malways 1") . ' &');
exit;
}
}
Expand Down
4 changes: 2 additions & 2 deletions get.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand Down Expand Up @@ -44,7 +45,7 @@
/** AUTOLOADER PATCH **/
$autoloaderPath = getenv('COMPOSER_VENDOR_PATH');
if (!$autoloaderPath) {
$autoloaderPath = dirname($bp) . $ds . 'vendor';
$autoloaderPath = dirname($bp) . $ds . 'vendor';
if (!is_dir($autoloaderPath)) {
$autoloaderPath = $bp . $ds . 'vendor';
}
Expand Down Expand Up @@ -173,7 +174,6 @@ function sendNotFoundPage()
* Check resource by whitelist
*
* @param string $resource
* @param array $allowedResources
*/
function checkResource($resource, array $allowedResources)
{
Expand Down
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand Down
1 change: 1 addition & 0 deletions install.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* OpenMage
*
Expand Down
Loading
Loading