@@ -122,7 +122,7 @@ |
||
| 122 | 122 | if (!preg_match('#^[\-|\+]{1}([0-9]+),([0-9]+) [\-\+]{1}([0-9]+),([0-9]+)$#', $ranges, $matches)) { |
| 123 | 123 | throw new \RuntimeException('invalid ranges: ' . $ranges); |
| 124 | 124 | } |
| 125 | - $this->pre = ['from' => (int)$matches[1], 'to' => (int)$matches[2]]; |
|
| 126 | - $this->post = ['from' => (int)$matches[3], 'to' => (int)$matches[4]]; |
|
| 125 | + $this->pre = ['from' => (int) $matches[1], 'to' => (int) $matches[2]]; |
|
| 126 | + $this->post = ['from' => (int) $matches[3], 'to' => (int) $matches[4]]; |
|
| 127 | 127 | } |
| 128 | 128 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | private function isHeaderSimilarityLine(string $line): bool |
| 195 | 195 | { |
| 196 | 196 | $matches = []; |
| 197 | - return (bool)preg_match('#^(similarity|dissimilarity) index [0-9]+%$#', $line, $matches); |
|
| 197 | + return (bool) preg_match('#^(similarity|dissimilarity) index [0-9]+%$#', $line, $matches); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | private function isHeaderFormatLine(string $line): bool |
| 249 | 249 | { |
| 250 | 250 | $matches = []; |
| 251 | - return (bool)preg_match('#^[\-\+]{3} [a|b|c|i|w|o]?/.*#', $line, $matches); |
|
| 251 | + return (bool) preg_match('#^[\-\+]{3} [a|b|c|i|w|o]?/.*#', $line, $matches); |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | /** |
@@ -48,6 +48,6 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | protected function getGitCommand(): string |
| 50 | 50 | { |
| 51 | - return 'config --get ' . escapeshellarg($this->name); |
|
| 51 | + return 'config --get ' . escapeshellarg($this->name); |
|
| 52 | 52 | } |
| 53 | 53 | } |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | protected function getGitCommand(): string |
| 29 | 29 | { |
| 30 | 30 | return 'log --pretty=format:' . escapeshellarg($this->format) |
| 31 | - . $this->abbrev |
|
| 32 | - . $this->author |
|
| 33 | - . $this->merges |
|
| 34 | - . $this->since; |
|
| 31 | + . $this->abbrev |
|
| 32 | + . $this->author |
|
| 33 | + . $this->merges |
|
| 34 | + . $this->since; |
|
| 35 | 35 | } |
| 36 | 36 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | protected function getGitCommand(): string |
| 29 | 29 | { |
| 30 | - return 'log --pretty=format:' . escapeshellarg($this->format) |
|
| 30 | + return 'log --pretty=format:' . escapeshellarg($this->format) |
|
| 31 | 31 | . $this->abbrev |
| 32 | 32 | . $this->author |
| 33 | 33 | . $this->merges |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | '<author><![CDATA[%an]]></author>%n' . |
| 34 | 34 | '<subject><![CDATA[%s]]></subject>%n' . |
| 35 | 35 | '<body><![CDATA[%n%b%n]]></body>%n' . |
| 36 | - '</commit>'; |
|
| 36 | + '</commit>'; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Parse log output into list of Commit objects |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | public function byRevision(string $from, string $to = ''): Log |
| 111 | 111 | { |
| 112 | 112 | $this->since = ' ' . escapeshellarg($from) . '..' |
| 113 | - . (empty($to) ? '' : escapeshellarg($to)); |
|
| 113 | + . (empty($to) ? '' : escapeshellarg($to)); |
|
| 114 | 114 | return $this; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | public function byDate(string $from, string $to = ''): Log |
| 137 | 137 | { |
| 138 | 138 | $this->since = ' --after=' . escapeshellarg($from) |
| 139 | - . (empty($to) ? '' : ' --before=' . escapeshellarg($to)); |
|
| 139 | + . (empty($to) ? '' : ' --before=' . escapeshellarg($to)); |
|
| 140 | 140 | return $this; |
| 141 | 141 | } |
| 142 | 142 | } |
@@ -47,9 +47,9 @@ |
||
| 47 | 47 | public function getCommand(): string |
| 48 | 48 | { |
| 49 | 49 | $command = 'git' |
| 50 | - . $this->getRootOption() |
|
| 51 | - . ' ' |
|
| 52 | - . $this->getGitCommand(); |
|
| 50 | + . $this->getRootOption() |
|
| 51 | + . ' ' |
|
| 52 | + . $this->getGitCommand(); |
|
| 53 | 53 | return $command; |
| 54 | 54 | } |
| 55 | 55 | |