@@ -67,44 +67,44 @@ discard block |
||
67 | 67 | |
68 | 68 | protected function prepareDumpCommand(string $credentialFile, string $destinationPath): string |
69 | 69 | { |
70 | - $options = []; |
|
70 | + $options = [ ]; |
|
71 | 71 | |
72 | - if(count($this->tables) > 0) { |
|
73 | - $options['tables'] = '--tables ' . implode(' ', $this->tables); |
|
72 | + if (count($this->tables) > 0) { |
|
73 | + $options[ 'tables' ] = '--tables ' . implode(' ', $this->tables); |
|
74 | 74 | } |
75 | 75 | // Ignore Tables |
76 | - $ignoreTables = []; |
|
76 | + $ignoreTables = [ ]; |
|
77 | 77 | foreach ($this->ignoreTables as $tableName) { |
78 | - $ignoreTables[] = "--ignore-table=" . $databaseArg . "." . $tableName; |
|
79 | - $options['ignoreTables'] = implode(' ', $ignoreTables); |
|
78 | + $ignoreTables[ ] = "--ignore-table=" . $databaseArg . "." . $tableName; |
|
79 | + $options[ 'ignoreTables' ] = implode(' ', $ignoreTables); |
|
80 | 80 | } |
81 | 81 | |
82 | - if($this->singleTransaction) { |
|
83 | - $options['singleTransaction'] => '--single-transaction'; |
|
82 | + if ($this->singleTransaction) { |
|
83 | + $options[ 'singleTransaction' ] => '--single-transaction'; |
|
84 | 84 | } |
85 | 85 | |
86 | - if($this->skipLockTable) { |
|
87 | - $options['skipLockTable'] => '--skip-lock-tables'; |
|
86 | + if ($this->skipLockTable) { |
|
87 | + $options[ 'skipLockTable' ] => '--skip-lock-tables'; |
|
88 | 88 | } |
89 | 89 | |
90 | - if($this->quick) { |
|
91 | - $options['quick'] => '--quick'; |
|
90 | + if ($this->quick) { |
|
91 | + $options[ 'quick' ] => '--quick'; |
|
92 | 92 | } |
93 | 93 | |
94 | - if(!$this->createTables) { |
|
95 | - $options['createTables'] => '--no-create-info'; |
|
94 | + if (!$this->createTables) { |
|
95 | + $options[ 'createTables' ] => '--no-create-info'; |
|
96 | 96 | } |
97 | - if($this->skipComments) { |
|
98 | - $options['skipComments'] => '--skip-comments'; |
|
97 | + if ($this->skipComments) { |
|
98 | + $options[ 'skipComments' ] => '--skip-comments'; |
|
99 | 99 | } |
100 | - if($this->socket !== '') { |
|
101 | - $options['socket'] => "--socket={$this->socket}"; |
|
100 | + if ($this->socket !== '') { |
|
101 | + $options[ 'socket' ] => "--socket={$this->socket}"; |
|
102 | 102 | } |
103 | - if($this->defaultCharacterSet) { |
|
104 | - $options['defaultCharacterSet'] => '--default-character-set=' . $this->defaultCharacterSet; |
|
103 | + if ($this->defaultCharacterSet) { |
|
104 | + $options[ 'defaultCharacterSet' ] => '--default-character-set=' . $this->defaultCharacterSet; |
|
105 | 105 | } |
106 | - if($this->authenticate) { |
|
107 | - $options['authenticate'] => "--defaults-extra-file={$credentialFile}"; |
|
106 | + if ($this->authenticate) { |
|
107 | + $options[ 'authenticate' ] => "--defaults-extra-file={$credentialFile}"; |
|
108 | 108 | } |
109 | 109 | // Dump command |
110 | 110 | $dumpCommand = sprintf( |
@@ -112,15 +112,15 @@ discard block |
||
112 | 112 | $this->dumpCommandPath, |
113 | 113 | $authenticate, |
114 | 114 | $this->dbName, |
115 | - $options['socket'], |
|
116 | - $options['skipComments'], |
|
117 | - $options['createTables'], |
|
118 | - $options['singleTransaction'], |
|
119 | - $options['skipLockTable'], |
|
120 | - $options['quick'], |
|
121 | - $options['defaultCharacterSet'], |
|
122 | - $options['tables'], |
|
123 | - $options['ignoreTables'] |
|
115 | + $options[ 'socket' ], |
|
116 | + $options[ 'skipComments' ], |
|
117 | + $options[ 'createTables' ], |
|
118 | + $options[ 'singleTransaction' ], |
|
119 | + $options[ 'skipLockTable' ], |
|
120 | + $options[ 'quick' ], |
|
121 | + $options[ 'defaultCharacterSet' ], |
|
122 | + $options[ 'tables' ], |
|
123 | + $options[ 'ignoreTables' ] |
|
124 | 124 | ); |
125 | 125 | // Add compressor if compress is enable |
126 | 126 | if ($this->isCompress) { |