@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | use DumperTrait; |
| 12 | 12 | |
| 13 | - public function __construct(array $options = []) |
|
| 13 | + public function __construct(array $options = [ ]) |
|
| 14 | 14 | { |
| 15 | 15 | foreach ($options as $option => $value) { |
| 16 | 16 | if (property_exists($this, $option)) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * @return $this |
| 23 | 23 | */ |
| 24 | - public static function create(array $options = []) |
|
| 24 | + public static function create(array $options = [ ]) |
|
| 25 | 25 | { |
| 26 | 26 | return new static($options); |
| 27 | 27 | } |
@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | /*@var int*/ |
| 22 | 22 | protected $timeout = 0; |
| 23 | 23 | /*@var array*/ |
| 24 | - protected $tables = []; |
|
| 24 | + protected $tables = [ ]; |
|
| 25 | 25 | /*@var array*/ |
| 26 | - protected $ignoreTables = []; |
|
| 26 | + protected $ignoreTables = [ ]; |
|
| 27 | 27 | /*@var string*/ |
| 28 | 28 | protected $destinationPath = 'dump.sql'; |
| 29 | 29 | /*@var string*/ |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | if (is_string($tables)) { |
| 104 | - $tables = [$tables]; |
|
| 104 | + $tables = [ $tables ]; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | if (!is_array($tables)) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (is_string($tables)) { |
| 127 | - $tables = [$tables]; |
|
| 127 | + $tables = [ $tables ]; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | if (!is_array($tables)) { |
@@ -63,38 +63,38 @@ |
||
| 63 | 63 | "{$this->dumpCommandPath}mongodump", |
| 64 | 64 | ]; |
| 65 | 65 | if ($this->isCompress) { |
| 66 | - $options[] = "--archive --gzip"; |
|
| 66 | + $options[ ] = "--archive --gzip"; |
|
| 67 | 67 | } |
| 68 | 68 | if ($this->uri) { |
| 69 | - $options[] = $this->uri; |
|
| 69 | + $options[ ] = $this->uri; |
|
| 70 | 70 | } |
| 71 | 71 | // Database |
| 72 | 72 | if ($this->dbName && !$this->uri) { |
| 73 | - $options[] = "--db {$this->dbName}"; |
|
| 73 | + $options[ ] = "--db {$this->dbName}"; |
|
| 74 | 74 | } |
| 75 | 75 | // Username |
| 76 | 76 | if ($this->username && !$this->uri) { |
| 77 | - $options[] = "--username {$this->username}"; |
|
| 77 | + $options[ ] = "--username {$this->username}"; |
|
| 78 | 78 | } |
| 79 | 79 | //Password |
| 80 | 80 | if ($this->password && !$this->uri) { |
| 81 | - $options[] = "--password {$this->password}"; |
|
| 81 | + $options[ ] = "--password {$this->password}"; |
|
| 82 | 82 | } |
| 83 | 83 | // Host |
| 84 | 84 | if ($this->host && !$this->uri) { |
| 85 | - $options[] = "--host {$this->host}"; |
|
| 85 | + $options[ ] = "--host {$this->host}"; |
|
| 86 | 86 | } |
| 87 | 87 | // Port |
| 88 | 88 | if ($this->port && !$this->uri) { |
| 89 | - $options[] = "--port {$this->port}"; |
|
| 89 | + $options[ ] = "--port {$this->port}"; |
|
| 90 | 90 | } |
| 91 | 91 | // Collection |
| 92 | 92 | if ($this->collection) { |
| 93 | - $options[] = "--collection {$this->collection}"; |
|
| 93 | + $options[ ] = "--collection {$this->collection}"; |
|
| 94 | 94 | } |
| 95 | 95 | // Authentication Database |
| 96 | 96 | if ($this->authenticationDatabase && !$this->uri) { |
| 97 | - $options[] = "--authenticationDatabase {$this->authenticationDatabase}"; |
|
| 97 | + $options[ ] = "--authenticationDatabase {$this->authenticationDatabase}"; |
|
| 98 | 98 | } |
| 99 | 99 | return implode(' ', $options); |
| 100 | 100 | } |