Skip to content

Commit

Permalink
Don't use spaces between various functions and the opening parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki committed May 7, 2014
1 parent c580277 commit 4538eea
Show file tree
Hide file tree
Showing 84 changed files with 547 additions and 547 deletions.
2 changes: 1 addition & 1 deletion admin/MBImport.pl
Expand Up @@ -139,7 +139,7 @@ sub usage
my ($tar, $dir, $decompress) = @$_;
print localtime() . " : tar -C $dir $decompress -xvf $tar\n";
system "tar -C $dir $decompress -xvf $tar";
exit ($? >> 8) if $?;
exit($? >> 8) if $?;
}

print localtime() . " : Validating snapshot\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/SubscribeAutomodsToList
Expand Up @@ -48,7 +48,7 @@ use vars qw( %allowed_nonmember_automods %allowed_posting_guests );
if (-f $sConfigFile)
{
$@ = ""; $! = 0;
do $sConfigFile or die ($!||$@);
do $sConfigFile or die($!||$@);
}

my $automods = $c->sql->select_list_of_lists("SELECT name, email FROM editor
Expand Down
2 changes: 1 addition & 1 deletion admin/replication/BundleReplicationPackets
Expand Up @@ -147,7 +147,7 @@ mkdir "$newpacketdir/mbdump" or die $!;
my $schema_sequence;
my $last_replication_sequence = $start - 1;
for my $sequence (@seq_to_use) {
die ("Replication sequence $sequence is too far from $last_replication_sequence")
die("Replication sequence $sequence is too far from $last_replication_sequence")
if $last_replication_sequence + 1 != $sequence;
my $individual_packet_dir = tempdir("replication-bundle-XXXXXX", DIR => $tmpdir);

Expand Down
4 changes: 2 additions & 2 deletions admin/sql/updates/20130523-mbs-6395-update-medium-index.pl
Expand Up @@ -128,10 +128,10 @@ sub update_index
my $exitcode = WORK_NO_ERROR;

if ($delete_count) {
delete_from_index ($c, $affected->{delete_from_index});
delete_from_index($c, $affected->{delete_from_index});
}
elsif ($insert_count) {
insert_into_index ($c, $affected->{insert_into_index}, $limit);
insert_into_index($c, $affected->{insert_into_index}, $limit);
}
else {
$exitcode = update_index($c, $affected->{update_index}, $limit);
Expand Down
4 changes: 2 additions & 2 deletions contrib/slowdown.psgi
Expand Up @@ -41,9 +41,9 @@ sub handle_other {

$log->info("storing request body at /tmp/slowdown.bin\n");

open (my $fh, ">", "/tmp/slowdown.bin");
open(my $fh, ">", "/tmp/slowdown.bin");
print $fh $request->content;
close ($fh);
close($fh);

my $response = $request->new_response(503);

Expand Down
14 changes: 7 additions & 7 deletions contrib/ssssss.psgi
Expand Up @@ -62,8 +62,8 @@ sub create_bucket
my $bucket = shift;

my $storage = $ENV{SSSSSS_STORAGE} ?
catfile (glob ($ENV{SSSSSS_STORAGE}), $bucket) :
catfile ($FindBin::Bin, 'caa', $bucket);
catfile(glob ($ENV{SSSSSS_STORAGE}), $bucket) :
catfile($FindBin::Bin, 'caa', $bucket);

`mkdir --parents $storage` unless -d $storage;

Expand All @@ -85,9 +85,9 @@ sub handle_put
my $dest = catfile($bucketdir, $request->param('file'));
$log->info("PUT, storing upload at $dest\n");

open (my $fh, ">", $dest);
open(my $fh, ">", $dest);
print $fh $request->content;
close ($fh);
close($fh);

return $request->new_response(204);
}
Expand All @@ -102,12 +102,12 @@ sub handle_post
my $dest = catfile($bucketdir, $request->param('key'));
$log->info("POST, storing upload at $dest\n");

move ($request->uploads->{file}->path, $dest);
move($request->uploads->{file}->path, $dest);

if ($key =~ /.($imgext)$/)
{
thumb (catfile ($bucketdir, $key), 250);
thumb (catfile ($bucketdir, $key), 500);
thumb(catfile($bucketdir, $key), 250);
thumb(catfile($bucketdir, $key), 500);
}

my $redirect = $request->param('success_action_redirect');
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Script/FixLinkDuplicates.pm
Expand Up @@ -69,7 +69,7 @@ sub remove_duplicates
my $count = 0;

printf "%s : Replace links %s with %s\n",
scalar localtime, join (", ", @remove_ids), $keep_id if $self->verbose;
scalar localtime, join(", ", @remove_ids), $keep_id if $self->verbose;

my $rows = $self->c->sql->select_list_of_hashes(
'SELECT entity_type0, entity_type1
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/Controller/Release.pm
Expand Up @@ -303,7 +303,7 @@ sub collections : Chained('load') RequireAuth
# Keep public collections;
# count private collection
foreach my $collection (@all_collections) {
push (@public_collections, $collection)
push(@public_collections, $collection)
if ($collection->{'public'} == 1);
$private_collections++
if ($collection->{'public'} == 0);
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/Data/Statistics.pm
Expand Up @@ -1839,7 +1839,7 @@ sub recalculate_all
printf "Statistics cannot be computed due to missing dependencies\n";
printf "$_ depends on " . join(", ", @{$unsatisfiable_prereqs{$_}}) . ", but these dependencies do not exist\n"
for keys %unsatisfiable_prereqs;
exit (1);
exit(1);
}

my %notdone = %stats;
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/Edit/Medium/Delete.pm
Expand Up @@ -48,7 +48,7 @@ sub foreign_keys
$fk{MediumFormat} = { $self->data->{format_id} => [] };
$fk{Release} = { $self->data->{release_id} => [qw( ArtistCredit )] };

tracklist_foreign_keys (\%fk, $self->data->{tracklist});
tracklist_foreign_keys(\%fk, $self->data->{tracklist});

return \%fk;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/MusicBrainz/Server/Edit/Medium/Edit.pm
Expand Up @@ -166,8 +166,8 @@ sub initialize
my $old = tracks_to_hash($entity->tracks);
my $new = tracks_to_hash($tracklist);

unless (Compare(filter_subsecond_differences ($old),
filter_subsecond_differences ($new)))
unless (Compare(filter_subsecond_differences($old),
filter_subsecond_differences($new)))
{
$data->{old}{tracklist} = $old;
$data->{new}{tracklist} = $new;
Expand Down Expand Up @@ -202,7 +202,7 @@ sub foreign_keys {
push @tracks, @{ $self->data->{new}{tracklist} }
if exists $self->data->{new}{tracklist};

tracklist_foreign_keys (\%fk, \@tracks);
tracklist_foreign_keys(\%fk, \@tracks);

return \%fk;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/Edit/Release/Edit.pm
Expand Up @@ -228,7 +228,7 @@ sub _mapping
my $self = shift;
return (
artist_credit => sub {
clean_submitted_artist_credits (shift->artist_credit)
clean_submitted_artist_credits(shift->artist_credit)
},
barcode => sub { shift->barcode->code },
events => sub {
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/Form.pm
Expand Up @@ -151,7 +151,7 @@ sub _fix_fif
{
for my $prefix (keys %repeatables)
{
delete ($fif->{$_}) if (m/^\Q$prefix\E\.[^0-9]+/);
delete($fif->{$_}) if (m/^\Q$prefix\E\.[^0-9]+/);
}
}

Expand Down
16 changes: 8 additions & 8 deletions lib/MusicBrainz/Server/Test.pm
Expand Up @@ -198,8 +198,8 @@ sub html_ok
{
my ($content, $message) = @_;

xhtml_ok ($Test, $content, $message);
html5_ok ($Test, $content, $message);
xhtml_ok($Test, $content, $message);
html5_ok($Test, $content, $message);
}

sub xml_ok
Expand Down Expand Up @@ -283,7 +283,7 @@ sub mock_search_server

local $/;
my $searchresults = "t/json/search_".lc($type).".json";
open(JSON, $searchresults) or die ("Could not open $searchresults");
open(JSON, $searchresults) or die("Could not open $searchresults");
my $json = <JSON>;
close(JSON);

Expand Down Expand Up @@ -355,7 +355,7 @@ sub schema_validator

$message ||= "Validate against schema";

xml_ok ($xml, "$message (xml_ok)");
xml_ok($xml, "$message (xml_ok)");

SKIP: {

Expand Down Expand Up @@ -424,9 +424,9 @@ sub _build_ws_test_json {
$Test->plan(tests => 3);

$mech->get_ok($end_point . $url, 'fetching');
is_valid_json ($mech->content, "validating (is_valid_json)");
is_valid_json($mech->content, "validating (is_valid_json)");

is_json ($mech->content, $expected);
is_json($mech->content, $expected);
$Test->note($mech->content);
});
};
Expand All @@ -435,7 +435,7 @@ sub _build_ws_test_json {
sub _build_ws_test {
my ($class, $name, $args) = @_;

return $args->{version} eq 'js' ? _build_ws_test_json (@_) : _build_ws_test_xml (@_);
return $args->{version} eq 'js' ? _build_ws_test_json(@_) : _build_ws_test_xml(@_);
}

sub xml_post
Expand Down Expand Up @@ -485,7 +485,7 @@ sub commandline_override
my ($prefix, @default_tests) = @_;

my $test_re = '';
GetOptions ("tests=s" => \$test_re);
GetOptions("tests=s" => \$test_re);

return grep { $_ =~ /$test_re/ } @default_tests;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/MusicBrainz/Server/Test/HTML5.pm
Expand Up @@ -92,7 +92,7 @@ sub save_html
my ($fh, $filename) = tempfile(
"html5_ok_XXXX", SUFFIX => $suffix, TMPDIR => 1);
print $fh encode ("utf-8", $content);
close ($fh);
close($fh);
$Test->diag("failed output written to $filename");
};
}
Expand All @@ -118,7 +118,7 @@ sub xhtml_ok
{
$Test->diag($_);
}
save_html ($Test, $content, ".xml");
save_html($Test, $content, ".xml");
return $Test->ok(0, $message);
}
else
Expand Down Expand Up @@ -187,7 +187,7 @@ sub html5_ok
$message .= ", Could not connect to ".$url;
}

save_html ($Test, $content, ".html") unless $all_ok;
save_html($Test, $content, ".html") unless $all_ok;

$Test->ok($all_ok, $message);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/MusicBrainz/Server/Track.pm
Expand Up @@ -35,8 +35,8 @@ sub FormatTrackLength
($minutes, $seconds) = (floor($seconds / $one_minute), $seconds % $one_minute);

return $hours > 0 ?
sprintf ("%d:%02d:%02d", $hours, $minutes, $seconds) :
sprintf ("%d:%02d", $minutes, $seconds);
sprintf("%d:%02d:%02d", $hours, $minutes, $seconds) :
sprintf("%d:%02d", $minutes, $seconds);
}

sub UnformatTrackLength
Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/WebService/Format.pm
Expand Up @@ -13,7 +13,7 @@ parameter serializers => (
sub _instance
{
my $cls = shift;
load_class ($cls);
load_class($cls);
$cls->new;
}

Expand Down
Expand Up @@ -18,7 +18,7 @@ sub serialize
if (defined $inc && $inc->discids)
{
$body{discs} = [ map {
serialize_entity ($_->cdtoc, $inc, $stash)
serialize_entity($_->cdtoc, $inc, $stash)
} sort_by { $_->cdtoc->discid } $entity->all_cdtocs ];
}

Expand Down
Expand Up @@ -13,7 +13,7 @@ around serialize => sub {

$ret->{rating} = {
"votes-count" => defined $opts->{ratings}->{count} ?
number ($opts->{ratings}->{count}) : 0,
number($opts->{ratings}->{count}) : 0,
"value" => number($opts->{ratings}->{rating})
} if $inc->ratings;

Expand Down
Expand Up @@ -13,7 +13,7 @@ around serialize => sub

return $ret unless defined $inc && $inc->has_rels;

my @rels = map { serialize_entity ($_, $inc, $opts) }
my @rels = map { serialize_entity($_, $inc, $opts) }
sort_by { $_->target_key . $_->link->type->name }
@{ $entity->relationships };

Expand Down
4 changes: 2 additions & 2 deletions root/edit/details/edit_release.tt
Expand Up @@ -72,7 +72,7 @@
edit.display_data.packaging.new.l_name) -%]

[%- display_diff(l('Barcode:'),
html_escape (edit.display_data.barcode.old.format),
html_escape (edit.display_data.barcode.new.format)) -%]
html_escape(edit.display_data.barcode.old.format),
html_escape(edit.display_data.barcode.new.format)) -%]

</table>
2 changes: 1 addition & 1 deletion root/static/scripts/common/MB/Control/Menu.js
Expand Up @@ -26,7 +26,7 @@ MB.Control.HeaderMenu = function () {

$('#header-menu > div > ul > li').bind ('mouseenter.mb', function (event) {
if (self.timeout) {
clearTimeout (self.timeout);
clearTimeout(self.timeout);
$('#header-menu ul li ul').css ('left', '-10000px');
}

Expand Down
4 changes: 2 additions & 2 deletions root/static/scripts/common/MB/utility.js
Expand Up @@ -175,7 +175,7 @@ MB.utility.iteratePromises = function (promises) {
{
queue.shift()().then (iterate, function () {
failed = true;
iterate ();
iterate();
});
}
else
Expand All @@ -191,7 +191,7 @@ MB.utility.iteratePromises = function (promises) {
}
};

iterate ();
iterate();
return deferred.promise();
};

Expand Down

0 comments on commit 4538eea

Please sign in to comment.