Skip to content

Commit 00f6ada

Browse files
committed
php-cs fix
1 parent 6a5d58c commit 00f6ada

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

eventum-cvs-hook.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ function cvs_filter_none($rev)
206206
if ($rev != 'NONE') {
207207
return $rev;
208208
}
209+
209210
return null;
210211
}
211212

@@ -219,5 +220,6 @@ function cvs_commit_msg()
219220
// get the full commit message
220221
$input = stream_get_contents(STDIN);
221222
$commit_msg = rtrim(substr($input, strpos($input, 'Log Message:') + strlen('Log Message:') + 1));
223+
222224
return $commit_msg;
223-
}
225+
}

eventum-git-hook.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ function git_receive_refs()
141141
foreach (explode(PHP_EOL, rtrim($input, PHP_EOL)) as $line) {
142142
$result[] = explode(' ', $line);
143143
}
144+
144145
return $result;
145146
}
146147

@@ -183,6 +184,7 @@ function git_rev_list($old, $new, $options = '')
183184
function git_commit_author($rev)
184185
{
185186
$output = execx("git log --format=%ae -n1 $rev");
187+
186188
return current($output);
187189
}
188190

@@ -193,5 +195,6 @@ function git_commit_author($rev)
193195
function git_commit_msg($rev)
194196
{
195197
$output = execx("git log --format=%B -n1 $rev");
198+
196199
return current($output);
197-
}
200+
}

eventum-svn-hook.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666

6767
if ($argc < 3) {
68-
error_log("$PROGRAM: Missing arguments, got " . ($argc - 1) . ", expected 2");
68+
error_log("$PROGRAM: Missing arguments, got " . ($argc - 1) . ', expected 2');
6969
exit(1);
7070
}
7171

@@ -145,7 +145,7 @@ function svn_commit_info($results)
145145
array_shift($results);
146146

147147
// get the full commit message
148-
$commit_msg = join("\n", $results);
148+
$commit_msg = implode("\n", $results);
149149

150150
return array($username, $date, $commit_msg);
151151
}
@@ -177,6 +177,7 @@ function svn_commit_files($repo, $old_revision, $new_revision)
177177
'new_revision' => $new_revision
178178
);
179179
}
180+
180181
return $modified_files;
181182
}
182183

@@ -193,4 +194,4 @@ function svnlook($command, $repo, $revision)
193194
global $svnlook;
194195

195196
return execx("$svnlook $command $repo -r $revision");
196-
}
197+
}

helpers.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
34
// +----------------------------------------------------------------------+
45
// | Eventum - Issue Tracking System |
@@ -51,7 +52,7 @@ function scm_ping($params)
5152
{
5253
global $PROGRAM, $eventum_url;
5354

54-
$ping_url = $eventum_url . "scm_ping.php";
55+
$ping_url = $eventum_url . 'scm_ping.php';
5556
$params['json'] = 1;
5657

5758
$res = wget($ping_url, $params);
@@ -135,7 +136,7 @@ function wget($url, $params, $headers = true)
135136
// see if we can fopen
136137
$flag = ini_get('allow_url_fopen');
137138
if (!$flag) {
138-
throw new RuntimeException("allow_url_fopen is disabled");
139+
throw new RuntimeException('allow_url_fopen is disabled');
139140
}
140141

141142
// see if https is supported
@@ -165,4 +166,4 @@ function wget($url, $params, $headers = true)
165166
}
166167

167168
return $data;
168-
}
169+
}

0 commit comments

Comments
 (0)