Completed
Pull Request — master (#20)
by
unknown
02:56
created
src/Schema/Command/ExportCommand.php 2 patches
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\Schema\Command;
4 4
 
5
-use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
6
-use Notamedia\ConsoleJedi\Schema\Exception\SchemaException;
7
-use Notamedia\ConsoleJedi\Schema\Schema;
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\Schema\Exception\SchemaException;
7
+use Notamedia\ConsoleJedi\Schema\Schema;
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
 class ExportCommand extends BitrixCommand
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 
93 93
             try {
94 94
                 $xml_id = \CIBlockCMLExport::GetIBlockXML_ID($iblock['ID']);
95
-                $path = implode('/', [$this->dir, $xml_id]) . $this->extension;
95
+                $path = implode('/', [$this->dir, $xml_id]).$this->extension;
96 96
 
97 97
                 $export
98 98
                     ->setPath($path)
Please login to merge, or discard this patch.
src/Schema/Command/ImportCommand.php 2 patches
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\Schema\Command;
4 4
 
5
-use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
6
-use Notamedia\ConsoleJedi\Schema\Exception\SchemaException;
7
-use Notamedia\ConsoleJedi\Schema\Schema;
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\Schema\Exception\SchemaException;
7
+use Notamedia\ConsoleJedi\Schema\Schema;
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
 class ImportCommand extends BitrixCommand
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
             ->setType($this->type)
92 92
             ->setSites($this->sites)
93 93
             ->setActionSection($input->getOption('sections'))
94
-            ->setActionElement($input->getOption('elements'));;
94
+            ->setActionElement($input->getOption('elements')); ;
95 95
 
96 96
         foreach (glob(implode('/*', [$this->dir, $this->extension])) as $file) {
97 97
 
Please login to merge, or discard this patch.
src/Schema/Import.php 1 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.
src/Schema/Export.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     protected function export()
110 110
     {
111 111
         $filesystem = new Filesystem();
112
-        $handle = fopen($this->config['path'] . $this->prefix, "w");
112
+        $handle = fopen($this->config['path'].$this->prefix, "w");
113 113
 
114 114
         $checkPermissions = true;
115 115
         if (PHP_SAPI == 'cli') {
@@ -159,6 +159,6 @@  discard block
 block discarded – undo
159 159
 
160 160
         fclose($handle);
161 161
         $filesystem->remove($this->config['path']);
162
-        $filesystem->rename($this->config['path'] . $this->prefix, $this->config['path'], true);
162
+        $filesystem->rename($this->config['path'].$this->prefix, $this->config['path'], true);
163 163
     }
164 164
 }
165 165
\ No newline at end of file
Please login to merge, or discard this patch.