@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public static function withTrailingSlash($string) |
187 | 187 | { |
188 | - return $string . (substr($string, -1) !== '/' ? '/' : ''); |
|
188 | + return $string.(substr($string, -1) !== '/' ? '/' : ''); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | public static function withLeadingSlash($string) |
209 | 209 | { |
210 | - return (substr($string, 0, 1) !== '/' ? '/' : '') . $string; |
|
210 | + return (substr($string, 0, 1) !== '/' ? '/' : '').$string; |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
@@ -230,6 +230,6 @@ discard block |
||
230 | 230 | */ |
231 | 231 | public static function appendPluralS($subject, $amount) |
232 | 232 | { |
233 | - return $subject . ($amount == 1 ? '' : (substr($subject, -1) == 's' ? '\'s' : 's')); |
|
233 | + return $subject.($amount == 1 ? '' : (substr($subject, -1) == 's' ? '\'s' : 's')); |
|
234 | 234 | } |
235 | 235 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function sync(Target $target, Result $result) |
33 | 33 | { |
34 | 34 | $sourcePath = $target->getPathname(); |
35 | - $targetPath = $this->path . $target->getFilename(); |
|
35 | + $targetPath = $this->path.$target->getFilename(); |
|
36 | 36 | |
37 | 37 | $s3 = S3Client::factory( |
38 | 38 | [ |
@@ -101,11 +101,11 @@ |
||
101 | 101 | public function simulate(Target $target, Result $result) |
102 | 102 | { |
103 | 103 | $result->debug( |
104 | - 'sync backup to ' . $this->getProtocolName() . ' server' . PHP_EOL |
|
105 | - . ' host: ' . $this->host . PHP_EOL |
|
106 | - . ' user: ' . $this->user . PHP_EOL |
|
107 | - . ' password: ********' . PHP_EOL |
|
108 | - . ' path: ' . $this->remotePath |
|
104 | + 'sync backup to '.$this->getProtocolName().' server'.PHP_EOL |
|
105 | + . ' host: '.$this->host.PHP_EOL |
|
106 | + . ' user: '.$this->user.PHP_EOL |
|
107 | + . ' password: ********'.PHP_EOL |
|
108 | + . ' path: '.$this->remotePath |
|
109 | 109 | ); |
110 | 110 | } |
111 | 111 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | public function sync(Target $target, Result $result) |
77 | 77 | { |
78 | 78 | $sourcePath = $target->getPathname(); |
79 | - $dropboxPath = $this->path . $target->getFilename(); |
|
79 | + $dropboxPath = $this->path.$target->getFilename(); |
|
80 | 80 | $client = new DropboxApi\Client($this->token, "phpbu/1.1.0"); |
81 | 81 | $pathError = DropboxApi\Path::findErrorNonRoot($dropboxPath); |
82 | 82 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } catch (\Exception $e) { |
101 | 101 | throw new Exception($e->getMessage(), null, $e); |
102 | 102 | } |
103 | - $result->debug('upload: done (' . $res['size'] . ')'); |
|
103 | + $result->debug('upload: done ('.$res['size'].')'); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | public function simulate(Target $target, Result $result) |
113 | 113 | { |
114 | 114 | $result->debug( |
115 | - 'sync backup to dropbox' . PHP_EOL |
|
116 | - . ' token: ********' . PHP_EOL |
|
117 | - . ' location: ' . $this->path |
|
115 | + 'sync backup to dropbox'.PHP_EOL |
|
116 | + . ' token: ********'.PHP_EOL |
|
117 | + . ' location: '.$this->path |
|
118 | 118 | ); |
119 | 119 | } |
120 | 120 | } |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | |
181 | 181 | // make sure there is a scheme |
182 | 182 | if (!isset($parsed['scheme'])) { |
183 | - $parsed = parse_url('http://' . $host); |
|
183 | + $parsed = parse_url('http://'.$host); |
|
184 | 184 | } |
185 | 185 | |
186 | - $url = $parsed['scheme'] . '://' . $this->getAuthUrlSnippet($user, $password) . $parsed['host']; |
|
186 | + $url = $parsed['scheme'].'://'.$this->getAuthUrlSnippet($user, $password).$parsed['host']; |
|
187 | 187 | |
188 | 188 | if (isset($parsed['port'])) { |
189 | - $url .= ':' . $parsed['port']; |
|
189 | + $url .= ':'.$parsed['port']; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | if (!empty($parsed['path'])) { |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $url = $user; |
215 | 215 | |
216 | 216 | if (!empty($password)) { |
217 | - $url .= ':' . $password; |
|
217 | + $url .= ':'.$password; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | if (!empty($url)) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $path = $configuration->getIncludePaths(); |
55 | 55 | if (count($path)) { |
56 | 56 | $path = implode(PATH_SEPARATOR, $path); |
57 | - ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path')); |
|
57 | + ini_set('include_path', $path.PATH_SEPARATOR.ini_get('include_path')); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (!empty($filename)) { |
72 | 72 | $pathToFile = stream_resolve_include_path($filename); |
73 | 73 | if (!$pathToFile || !is_readable($pathToFile)) { |
74 | - throw new Exception(sprintf('Cannot open bootstrap file "%s".' . PHP_EOL, $filename)); |
|
74 | + throw new Exception(sprintf('Cannot open bootstrap file "%s".'.PHP_EOL, $filename)); |
|
75 | 75 | } |
76 | 76 | require $pathToFile; |
77 | 77 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | $ext = pathinfo($filename, PATHINFO_EXTENSION); |
44 | 44 | $type = isset(self::$extToLoaderMap[$ext]) ? self::$extToLoaderMap[$ext] : self::DEFAULT_LOADER; |
45 | - $class = '\\phpbu\\App\\Configuration\\Loader\\' . $type; |
|
45 | + $class = '\\phpbu\\App\\Configuration\\Loader\\'.$type; |
|
46 | 46 | |
47 | 47 | return new $class($filename); |
48 | 48 | } |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $loaded = $document->loadXML($contents); |
382 | 382 | |
383 | 383 | foreach (libxml_get_errors() as $error) { |
384 | - $message .= "\n" . $error->message; |
|
384 | + $message .= "\n".$error->message; |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | libxml_use_internal_errors($internal); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | sprintf( |
393 | 393 | 'Error loading file "%s".%s', |
394 | 394 | $filename, |
395 | - $message != '' ? "\n" . $message : '' |
|
395 | + $message != '' ? "\n".$message : '' |
|
396 | 396 | ) |
397 | 397 | ); |
398 | 398 | } |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | public function parseShortOption($arg, array &$options) |
102 | 102 | { |
103 | 103 | if (!isset($this->shortOptions[$arg])) { |
104 | - throw new Exception('unknown option: -' . $arg); |
|
104 | + throw new Exception('unknown option: -'.$arg); |
|
105 | 105 | } |
106 | - $options['-' . $arg] = true; |
|
106 | + $options['-'.$arg] = true; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
@@ -123,17 +123,17 @@ discard block |
||
123 | 123 | $argument = $list[1]; |
124 | 124 | } |
125 | 125 | if (count($list) > 2) { |
126 | - throw new Exception('invalid value for option: --' . $arg); |
|
126 | + throw new Exception('invalid value for option: --'.$arg); |
|
127 | 127 | } |
128 | - if (!isset($this->longOptions[$option]) && !isset($this->longOptions[$option . '='])) { |
|
129 | - throw new Exception('unknown option: --' . $option); |
|
128 | + if (!isset($this->longOptions[$option]) && !isset($this->longOptions[$option.'='])) { |
|
129 | + throw new Exception('unknown option: --'.$option); |
|
130 | 130 | } |
131 | - if ($argument === true && isset($this->longOptions[$option . '='])) { |
|
132 | - throw new Exception('argument required for option: --' . $option); |
|
131 | + if ($argument === true && isset($this->longOptions[$option.'='])) { |
|
132 | + throw new Exception('argument required for option: --'.$option); |
|
133 | 133 | } |
134 | 134 | if ($argument !== true && isset($this->longOptions[$option])) { |
135 | - throw new Exception('needless argument for option: --' . $option); |
|
135 | + throw new Exception('needless argument for option: --'.$option); |
|
136 | 136 | } |
137 | - $options['--' . $option] = $argument; |
|
137 | + $options['--'.$option] = $argument; |
|
138 | 138 | } |
139 | 139 | } |