Skip to content

Commit

Permalink
Merge branch 'master' into php-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
tmotyl authored Jun 9, 2021
2 parents f916cd9 + a05b7bf commit 7555c9f
Show file tree
Hide file tree
Showing 132 changed files with 1,654 additions and 1,801 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/php-cs-fixer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: [push, pull_request]
name: Main
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: magmi --diff --dry-run
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/magmi/state/*
!/magmi/state/dummy.txt
/vendor
.php-cs-fixer.cache
.php_cs.cache
17 changes: 17 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

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


$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'binary_operator_spaces' => [
'operators' => [
'=' => 'single_space',
'=>' => 'single_space',
],
],
])
->setFinder($finder);
14 changes: 14 additions & 0 deletions magmi/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<FilesMatch "\.(ini)$">
Order allow,deny
Deny from all
</FilesMatch>

<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>

<FilesMatch "ReleaseNotes.txt">
Order allow,deny
Deny from all
</FilesMatch>
1 change: 1 addition & 0 deletions magmi/cli/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deny from all
4 changes: 2 additions & 2 deletions magmi/cli/magmi.cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ function getEngineInstance($options)
// Getting engine
$importer = getEngineInstance($options);
if (isset($importer)) {
$inifile=isset($options['config'])? $options['config']:null;
$inifile = isset($options['config']) ? $options['config'] : null;
if (isset($inifile)) {
require_once('magmi_config.php');
$conf=Magmi_Config::getInstance();
$conf = Magmi_Config::getInstance();
$conf->load($options['config']);
}
// if logger set, use it or use FileLogger by default
Expand Down
Loading

0 comments on commit 7555c9f

Please sign in to comment.