Passed
Pull Request — master (#204)
by Zing
05:29
created
src/Commands/SmsSwitchConnectionCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         }
87 87
 
88 88
         $path = $this->envPath();
89
-        if (! file_exists($path)) {
89
+        if (!file_exists($path)) {
90 90
             $this->displayConnection($connection);
91 91
 
92 92
             return;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         /** @var string $contents */
109 109
         $contents = file_get_contents($path);
110 110
 
111
-        if (! Str::contains($contents, 'SMS_CONNECTION')) {
111
+        if (!Str::contains($contents, 'SMS_CONNECTION')) {
112 112
             // create new entry
113 113
             file_put_contents($path, PHP_EOL . sprintf('SMS_CONNECTION=%s', $connection) . PHP_EOL, FILE_APPEND);
114 114
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             return false;
122 122
         }
123 123
 
124
-        if (! $this->isConfirmed()) {
124
+        if (!$this->isConfirmed()) {
125 125
             $this->comment('Phew... No changes were made to your sms default connection.');
126 126
 
127 127
             return false;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         file_put_contents(
131 131
             $path,
132 132
             str_replace(
133
-                'SMS_CONNECTION=' .  Config::get('sms.default'),
133
+                'SMS_CONNECTION=' . Config::get('sms.default'),
134 134
                 'SMS_CONNECTION=' . $connection,
135 135
                 $contents
136 136
             )
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     protected function displayConnection(string $connection): void
146 146
     {
147
-        Config::set('sms.default',$connection);
147
+        Config::set('sms.default', $connection);
148 148
 
149 149
         $this->info(sprintf('sms default connection switch to [%s] successfully.', $connection));
150 150
     }
Please login to merge, or discard this patch.