Completed
Pull Request — master (#20)
by
unknown
02:07
created
src/Iblock/Exporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
         $this->session = [
98 98
             "property_map" => false,
99 99
             "section_map" => false,
100
-            "work_dir" => pathinfo($absFilename, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR,
101
-            "file_dir" => pathinfo($this->config['path'], PATHINFO_FILENAME) . "_files" . DIRECTORY_SEPARATOR,
100
+            "work_dir" => pathinfo($absFilename, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR,
101
+            "file_dir" => pathinfo($this->config['path'], PATHINFO_FILENAME)."_files".DIRECTORY_SEPARATOR,
102 102
         ];
103 103
 
104 104
         $this->export();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     protected function export()
113 113
     {
114 114
         $filesystem = new Filesystem();
115
-        $handle = fopen($this->config['path'] . $this->prefix, "w");
115
+        $handle = fopen($this->config['path'].$this->prefix, "w");
116 116
 
117 117
         $checkPermissions = true;
118 118
         if (PHP_SAPI == 'cli') {
@@ -162,6 +162,6 @@  discard block
 block discarded – undo
162 162
 
163 163
         fclose($handle);
164 164
         $filesystem->remove($this->config['path']);
165
-        $filesystem->rename($this->config['path'] . $this->prefix, $this->config['path'], true);
165
+        $filesystem->rename($this->config['path'].$this->prefix, $this->config['path'], true);
166 166
     }
167 167
 }
168 168
\ No newline at end of file
Please login to merge, or discard this patch.
src/Iblock/Command/ImportCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,9 +95,9 @@
 block discarded – undo
95 95
             ->setType($this->type)
96 96
             ->setSites($this->sites)
97 97
             ->setActionSection($input->getOption('sections'))
98
-            ->setActionElement($input->getOption('elements'));;
98
+            ->setActionElement($input->getOption('elements')); ;
99 99
 
100
-        foreach (glob(implode(DIRECTORY_SEPARATOR . '*', [$this->dir, $this->extension])) as $file) {
100
+        foreach (glob(implode(DIRECTORY_SEPARATOR.'*', [$this->dir, $this->extension])) as $file) {
101 101
 
102 102
             try {
103 103
                 $importer
Please login to merge, or discard this patch.
Unused Use Statements   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 namespace Notamedia\ConsoleJedi\Iblock\Command;
4 4
 
5
-use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
6
-use Notamedia\ConsoleJedi\Iblock\Exception\IblockException;
7
-use Notamedia\ConsoleJedi\Iblock\Importer;
8
-use Symfony\Component\Console\Input\InputArgument;
9
-use Symfony\Component\Console\Input\InputInterface;
10
-use Symfony\Component\Console\Input\InputOption;
11
-use Symfony\Component\Console\Output\OutputInterface;
12
-use Symfony\Component\Console\Helper\FormatterHelper;
5
+use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
6
+use Notamedia\ConsoleJedi\Iblock\Exception\IblockException;
7
+use Notamedia\ConsoleJedi\Iblock\Importer;
8
+use Symfony\Component\Console\Input\InputArgument;
9
+use Symfony\Component\Console\Input\InputInterface;
10
+use Symfony\Component\Console\Input\InputOption;
11
+use Symfony\Component\Console\Output\OutputInterface;
12
+use Symfony\Component\Console\Helper\FormatterHelper;
13 13
 use Bitrix\Main\Loader;
14 14
 
15 15
 /**
Please login to merge, or discard this patch.
src/Iblock/Command/ExportCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 
97 97
             try {
98 98
                 $xml_id = \CIBlockCMLExport::GetIBlockXML_ID($iblock['ID']);
99
-                $path = implode(DIRECTORY_SEPARATOR, [$this->dir, $xml_id]) . $this->extension;
99
+                $path = implode(DIRECTORY_SEPARATOR, [$this->dir, $xml_id]).$this->extension;
100 100
 
101 101
                 $exporter
102 102
                     ->setPath($path)
Please login to merge, or discard this patch.
Unused Use Statements   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 namespace Notamedia\ConsoleJedi\Iblock\Command;
4 4
 
5
-use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
6
-use Notamedia\ConsoleJedi\Iblock\Exception\IblockException;
7
-use Notamedia\ConsoleJedi\Iblock\Exporter;
8
-use Symfony\Component\Console\Input\InputArgument;
9
-use Symfony\Component\Console\Input\InputInterface;
10
-use Symfony\Component\Console\Input\InputOption;
11
-use Symfony\Component\Console\Output\OutputInterface;
12
-use Symfony\Component\Console\Helper\FormatterHelper;
5
+use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
6
+use Notamedia\ConsoleJedi\Iblock\Exception\IblockException;
7
+use Notamedia\ConsoleJedi\Iblock\Exporter;
8
+use Symfony\Component\Console\Input\InputArgument;
9
+use Symfony\Component\Console\Input\InputInterface;
10
+use Symfony\Component\Console\Input\InputOption;
11
+use Symfony\Component\Console\Output\OutputInterface;
12
+use Symfony\Component\Console\Helper\FormatterHelper;
13 13
 use Bitrix\Main\Loader;
14 14
 
15 15
 /**
Please login to merge, or discard this patch.
src/Iblock/Importer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
         $this->session = [
111 111
             "section_map" => false,
112 112
             "prices_map" => false,
113
-            "work_dir" => pathinfo($absFilename, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR
113
+            "work_dir" => pathinfo($absFilename, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR
114 114
         ];
115 115
 
116 116
         $this->read();
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,8 +122,9 @@
 block discarded – undo
122 122
     {
123 123
         $handle = fopen($this->config['path'], "r");
124 124
 
125
-        if (!$handle)
126
-            throw new ImportException('Unable to open file, or file not exist');
125
+        if (!$handle) {
126
+                    throw new ImportException('Unable to open file, or file not exist');
127
+        }
127 128
 
128 129
         if (!$this->import->CheckIfFileIsCML($this->config['path'])) {
129 130
             throw new ImportException('File is not valid');
Please login to merge, or discard this patch.