@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Change double quotes to single quotes.

Summary: Ran `arc lint --apply-patches --everything` over rP, mainly to change double quotes to single quotes where appropriate. These changes also validate that the `ArcanistXHPASTLinter::LINT_DOUBLE_QUOTE` rule is working as expected.

Test Plan: Eyeballed it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D9431

authored by

Joshua Spence and committed by
epriestley
0a62f134 78f78322

+1721 -1722
+1 -1
resources/sql/patches/059.engines.php
··· 24 24 echo "Converting {$name}...\n"; 25 25 queryfx( 26 26 $conn, 27 - "ALTER TABLE %T.%T ENGINE=InnoDB", 27 + 'ALTER TABLE %T.%T ENGINE=InnoDB', 28 28 $table['db'], 29 29 $table['tbl']); 30 30 }
+2 -2
resources/sql/patches/079.nametokenindex.php
··· 7 7 $table->beginReadLocking(); 8 8 9 9 $users = $table->loadAll(); 10 - echo count($users)." users to index"; 10 + echo count($users).' users to index'; 11 11 foreach ($users as $user) { 12 12 $user->updateNameTokens(); 13 - echo "."; 13 + echo '.'; 14 14 } 15 15 16 16 $table->endReadLocking();
+3 -3
resources/sql/patches/090.forceuniqueprojectnames.php
··· 64 64 } 65 65 if (count($update) == $size) { 66 66 throw new Exception( 67 - "Failed to make any progress while updating projects. Schema upgrade ". 68 - "has failed. Go manually fix your project names to be unique (they are ". 69 - "probably ridiculous?) and then try again."); 67 + 'Failed to make any progress while updating projects. Schema upgrade '. 68 + 'has failed. Go manually fix your project names to be unique (they are '. 69 + 'probably ridiculous?) and then try again.'); 70 70 } 71 71 } 72 72
+2 -2
resources/sql/patches/102.heraldcleanup.php
··· 24 24 mpull($rules, 'getID')); 25 25 } 26 26 27 - echo "This may take a moment"; 27 + echo 'This may take a moment'; 28 28 do { 29 29 queryfx( 30 30 $conn_w, 31 31 'DELETE FROM %T %Q LIMIT 1000', 32 32 HeraldRule::TABLE_RULE_APPLIED, 33 33 $clause); 34 - echo "."; 34 + echo '.'; 35 35 } while ($conn_w->getAffectedRows()); 36 36 37 37 $table->endReadLocking();
+1 -1
resources/sql/patches/117.repositorydescription.php
··· 2 2 3 3 $conn = id(new PhabricatorRepository())->establishConnection('w'); 4 4 if (queryfx_one($conn, "SHOW COLUMNS FROM `repository` LIKE 'description'")) { 5 - queryfx($conn, "ALTER TABLE `repository` DROP `description`"); 5 + queryfx($conn, 'ALTER TABLE `repository` DROP `description`'); 6 6 }
+2 -2
resources/sql/patches/131.migraterevisionquery.php
··· 5 5 $table->beginReadLocking(); 6 6 $conn_w = $table->establishConnection('w'); 7 7 8 - echo "Migrating revisions"; 8 + echo 'Migrating revisions'; 9 9 do { 10 10 $revisions = $table->loadAllWhere('branchName IS NULL LIMIT 1000'); 11 11 12 12 foreach ($revisions as $revision) { 13 - echo "."; 13 + echo '.'; 14 14 15 15 $diff = $revision->loadActiveDiff(); 16 16 if (!$diff) {
+2 -2
resources/sql/patches/20121209.xmacromigrate.php
··· 1 1 <?php 2 2 3 - echo "Giving image macros PHIDs"; 3 + echo 'Giving image macros PHIDs'; 4 4 $table = new PhabricatorFileImageMacro(); 5 5 $table->openTransaction(); 6 6 ··· 9 9 continue; 10 10 } 11 11 12 - echo "."; 12 + echo '.'; 13 13 14 14 queryfx( 15 15 $macro->establishConnection('w'),
+1 -1
resources/sql/patches/20130201.revisionunsubscribed.php
··· 11 11 'SELECT id, phid, unsubscribed FROM differential_revision'); 12 12 13 13 foreach ($revs as $rev) { 14 - echo "."; 14 + echo '.'; 15 15 16 16 $unsubscribed = json_decode($rev['unsubscribed']); 17 17 if (!$unsubscribed) {
+2 -2
resources/sql/patches/20130409.commitdrev.php
··· 22 22 $editor->addEdge($commit->getPHID(), $commit_drev, $revision_phid); 23 23 $edges++; 24 24 if ($edges % 256 == 0) { 25 - echo "."; 25 + echo '.'; 26 26 $editor->save(); 27 27 $editor = id(new PhabricatorEdgeEditor())->setSuppressEvents(true); 28 28 } 29 29 } 30 30 31 - echo "."; 31 + echo '.'; 32 32 $editor->save(); 33 33 echo "\nDone.\n";
+2 -2
resources/sql/patches/20130502.countdownrevamp2.php
··· 1 1 <?php 2 2 3 - echo "Giving countdowns PHIDs"; 3 + echo 'Giving countdowns PHIDs'; 4 4 $table = new PhabricatorCountdown(); 5 5 $table->openTransaction(); 6 6 ··· 9 9 continue; 10 10 } 11 11 12 - echo "."; 12 + echo '.'; 13 13 14 14 queryfx( 15 15 $countdown->establishConnection('w'),
+1 -1
resources/sql/patches/20130703.legalpaddocdenorm.php
··· 1 1 <?php 2 2 3 - echo "Populating Legalpad Documents with ", 3 + echo 'Populating Legalpad Documents with ', 4 4 "titles, recentContributorPHIDs, and contributorCounts...\n"; 5 5 $table = new LegalpadDocument(); 6 6 $table->openTransaction();
+2 -2
resources/sql/patches/20130711.pholioimageobsolete.php
··· 1 1 <?php 2 2 3 - echo "Giving pholio images PHIDs"; 3 + echo 'Giving pholio images PHIDs'; 4 4 $table = new PholioImage(); 5 5 $table->openTransaction(); 6 6 ··· 9 9 continue; 10 10 } 11 11 12 - echo "."; 12 + echo '.'; 13 13 14 14 queryfx( 15 15 $image->establishConnection('w'),
+6 -6
resources/sql/patches/20131205.buildstepordermig.php
··· 13 13 14 14 $rows = queryfx_all( 15 15 $conn_w, 16 - "SELECT id, sequence FROM harbormaster_buildstep ". 17 - "WHERE buildPlanPHID = %s ". 18 - "ORDER BY id ASC", 16 + 'SELECT id, sequence FROM harbormaster_buildstep '. 17 + 'WHERE buildPlanPHID = %s '. 18 + 'ORDER BY id ASC', 19 19 $plan->getPHID()); 20 20 21 21 $sequence = 1; ··· 29 29 echo " - {$id} to position {$sequence}...\n"; 30 30 queryfx( 31 31 $conn_w, 32 - "UPDATE harbormaster_buildstep ". 33 - "SET sequence = %d ". 34 - "WHERE id = %d", 32 + 'UPDATE harbormaster_buildstep '. 33 + 'SET sequence = %d '. 34 + 'WHERE id = %d', 35 35 $sequence, 36 36 $id); 37 37 $sequence++;
+32 -32
scripts/calendar/import_us_holidays.php
··· 7 7 // http://www.opm.gov/operating_status_schedules/fedhol/ 8 8 $holidays = array( 9 9 '2014-01-01' => "New Year's Day", 10 - '2014-01-20' => "Birthday of Martin Luther King, Jr.", 10 + '2014-01-20' => 'Birthday of Martin Luther King, Jr.', 11 11 '2014-02-17' => "Washington's Birthday", 12 - '2014-05-26' => "Memorial Day", 13 - '2014-07-04' => "Independence Day", 14 - '2014-09-01' => "Labor Day", 15 - '2014-10-13' => "Columbus Day", 16 - '2014-11-11' => "Veterans Day", 17 - '2014-11-27' => "Thanksgiving Day", 18 - '2014-12-25' => "Christmas Day", 12 + '2014-05-26' => 'Memorial Day', 13 + '2014-07-04' => 'Independence Day', 14 + '2014-09-01' => 'Labor Day', 15 + '2014-10-13' => 'Columbus Day', 16 + '2014-11-11' => 'Veterans Day', 17 + '2014-11-27' => 'Thanksgiving Day', 18 + '2014-12-25' => 'Christmas Day', 19 19 '2015-01-01' => "New Year's Day", 20 - '2015-01-19' => "Birthday of Martin Luther King, Jr.", 20 + '2015-01-19' => 'Birthday of Martin Luther King, Jr.', 21 21 '2015-02-16' => "Washington's Birthday", 22 - '2015-05-25' => "Memorial Day", 23 - '2015-07-03' => "Independence Day", 24 - '2015-09-07' => "Labor Day", 25 - '2015-10-12' => "Columbus Day", 26 - '2015-11-11' => "Veterans Day", 27 - '2015-11-26' => "Thanksgiving Day", 28 - '2015-12-25' => "Christmas Day", 22 + '2015-05-25' => 'Memorial Day', 23 + '2015-07-03' => 'Independence Day', 24 + '2015-09-07' => 'Labor Day', 25 + '2015-10-12' => 'Columbus Day', 26 + '2015-11-11' => 'Veterans Day', 27 + '2015-11-26' => 'Thanksgiving Day', 28 + '2015-12-25' => 'Christmas Day', 29 29 '2016-01-01' => "New Year's Day", 30 - '2016-01-18' => "Birthday of Martin Luther King, Jr.", 30 + '2016-01-18' => 'Birthday of Martin Luther King, Jr.', 31 31 '2016-02-15' => "Washington's Birthday", 32 - '2016-05-30' => "Memorial Day", 33 - '2016-07-04' => "Independence Day", 34 - '2016-09-05' => "Labor Day", 35 - '2016-10-10' => "Columbus Day", 36 - '2016-11-11' => "Veterans Day", 37 - '2016-11-24' => "Thanksgiving Day", 38 - '2016-12-26' => "Christmas Day", 32 + '2016-05-30' => 'Memorial Day', 33 + '2016-07-04' => 'Independence Day', 34 + '2016-09-05' => 'Labor Day', 35 + '2016-10-10' => 'Columbus Day', 36 + '2016-11-11' => 'Veterans Day', 37 + '2016-11-24' => 'Thanksgiving Day', 38 + '2016-12-26' => 'Christmas Day', 39 39 '2017-01-02' => "New Year's Day", 40 - '2017-01-16' => "Birthday of Martin Luther King, Jr.", 40 + '2017-01-16' => 'Birthday of Martin Luther King, Jr.', 41 41 '2017-02-10' => "Washington's Birthday", 42 - '2017-05-29' => "Memorial Day", 43 - '2017-07-04' => "Independence Day", 44 - '2017-09-04' => "Labor Day", 45 - '2017-10-09' => "Columbus Day", 46 - '2017-11-10' => "Veterans Day", 47 - '2017-11-23' => "Thanksgiving Day", 48 - '2017-12-25' => "Christmas Day", 42 + '2017-05-29' => 'Memorial Day', 43 + '2017-07-04' => 'Independence Day', 44 + '2017-09-04' => 'Labor Day', 45 + '2017-10-09' => 'Columbus Day', 46 + '2017-11-10' => 'Veterans Day', 47 + '2017-11-23' => 'Thanksgiving Day', 48 + '2017-12-25' => 'Christmas Day', 49 49 ); 50 50 51 51 $table = new PhabricatorCalendarHoliday();
+3 -3
scripts/mail/mail_handler.php
··· 44 44 (preg_match('/charset="(.*?)"/', $content_type, $matches) || 45 45 preg_match('/charset=(\S+)/', $content_type, $matches)) 46 46 ) { 47 - $text_body = phutil_utf8_convert($text_body, "UTF-8", $matches[1]); 47 + $text_body = phutil_utf8_convert($text_body, 'UTF-8', $matches[1]); 48 48 } 49 49 50 50 $headers = $parser->getHeaders(); 51 - $headers['subject'] = iconv_mime_decode($headers['subject'], 0, "UTF-8"); 52 - $headers['from'] = iconv_mime_decode($headers['from'], 0, "UTF-8"); 51 + $headers['subject'] = iconv_mime_decode($headers['subject'], 0, 'UTF-8'); 52 + $headers['from'] = iconv_mime_decode($headers['from'], 0, 'UTF-8'); 53 53 54 54 if ($args->getArg('process-duplicates')) { 55 55 $headers['message-id'] = Filesystem::readRandomCharacters(64);
+2 -2
scripts/repository/rebuild_summaries.php
··· 22 22 23 23 $repository_ids = array_keys($sizes + $maxes); 24 24 25 - echo "Updating ".count($repository_ids)." repositories"; 25 + echo 'Updating '.count($repository_ids).' repositories'; 26 26 27 27 foreach ($repository_ids as $repository_id) { 28 28 $last_commit = queryfx_one( ··· 48 48 $last_commit, 49 49 idx($sizes, $repository_id, 0), 50 50 idx($maxes, $repository_id, 0)); 51 - echo "."; 51 + echo '.'; 52 52 } 53 53 echo "\ndone.\n";
+6 -6
scripts/repository/reparse.php
··· 103 103 $min_date = $args->getArg('min-date'); 104 104 105 105 if (!$all_from_repo && !$reparse_what) { 106 - usage("Specify a commit or repository to reparse."); 106 + usage('Specify a commit or repository to reparse.'); 107 107 } 108 108 109 109 if ($all_from_repo && $reparse_what) { ··· 116 116 117 117 if (!$reparse_message && !$reparse_change && !$reparse_herald && 118 118 !$reparse_owners && !$reparse_harbormaster) { 119 - usage("Specify what information to reparse with --message, --change, ". 120 - "--herald, --harbormaster, and/or --owners"); 119 + usage('Specify what information to reparse with --message, --change, '. 120 + '--herald, --harbormaster, and/or --owners'); 121 121 } 122 122 123 123 $min_timestamp = false; ··· 142 142 143 143 if ($reparse_owners && !$force) { 144 144 echo phutil_console_wrap( 145 - "You are about to recreate the relationship entries between the commits ". 146 - "and the packages they touch. This might delete some existing ". 147 - "relationship entries for some old commits."); 145 + 'You are about to recreate the relationship entries between the commits '. 146 + 'and the packages they touch. This might delete some existing '. 147 + 'relationship entries for some old commits.'); 148 148 149 149 if (!phutil_console_confirm('Are you ready to continue?')) { 150 150 echo "Cancelled.\n";
+6 -6
scripts/repository/save_lint.php
··· 18 18 array( 19 19 'name' => 'all', 20 20 'help' => 21 - "Discover problems in the whole repository instead of just changes ". 22 - "since the last run.", 21 + 'Discover problems in the whole repository instead of just changes '. 22 + 'since the last run.', 23 23 ), 24 24 array( 25 25 'name' => 'arc', 26 26 'param' => 'path', 27 27 'default' => 'arc', 28 - 'help' => "Path to Arcanist executable.", 28 + 'help' => 'Path to Arcanist executable.', 29 29 ), 30 30 array( 31 31 'name' => 'severity', 32 32 'param' => 'string', 33 33 'default' => ArcanistLintSeverity::SEVERITY_ADVICE, 34 - 'help' => "Minimum severity, one of ArcanistLintSeverity constants.", 34 + 'help' => 'Minimum severity, one of ArcanistLintSeverity constants.', 35 35 ), 36 36 array( 37 37 'name' => 'chunk-size', 38 38 'param' => 'number', 39 39 'default' => 256, 40 - 'help' => "Number of paths passed to `arc` at once.", 40 + 'help' => 'Number of paths passed to `arc` at once.', 41 41 ), 42 42 array( 43 43 'name' => 'blame', 44 - 'help' => "Assign lint errors to authors who last modified the line.", 44 + 'help' => 'Assign lint errors to authors who last modified the line.', 45 45 ), 46 46 )); 47 47
+1 -1
scripts/ssh/ssh-auth.php
··· 16 16 $ssh_dao->getTableName()); 17 17 18 18 if (!$rows) { 19 - echo pht("No keys found.")."\n"; 19 + echo pht('No keys found.')."\n"; 20 20 exit(1); 21 21 } 22 22
+7 -7
scripts/ssh/ssh-exec.php
··· 32 32 try { 33 33 $user_name = $args->getArg('phabricator-ssh-user'); 34 34 if (!strlen($user_name)) { 35 - throw new Exception("No username."); 35 + throw new Exception('No username.'); 36 36 } 37 37 38 38 $user = id(new PhabricatorUser())->loadOneWhere( 39 39 'userName = %s', 40 40 $user_name); 41 41 if (!$user) { 42 - throw new Exception("Invalid username."); 42 + throw new Exception('Invalid username.'); 43 43 } 44 44 45 45 $ssh_log->setData( ··· 49 49 )); 50 50 51 51 if (!$user->isUserActivated()) { 52 - throw new Exception(pht("Your account is not activated.")); 52 + throw new Exception(pht('Your account is not activated.')); 53 53 } 54 54 55 55 if ($args->getArg('ssh-command')) { ··· 96 96 $original_args = new PhutilArgumentParser($original_argv); 97 97 98 98 if (empty($workflow_names[$command])) { 99 - throw new Exception("Invalid command."); 99 + throw new Exception('Invalid command.'); 100 100 } 101 101 102 102 $workflow = $original_args->parseWorkflows($workflows); ··· 104 104 105 105 $sock_stdin = fopen('php://stdin', 'r'); 106 106 if (!$sock_stdin) { 107 - throw new Exception("Unable to open stdin."); 107 + throw new Exception('Unable to open stdin.'); 108 108 } 109 109 110 110 $sock_stdout = fopen('php://stdout', 'w'); 111 111 if (!$sock_stdout) { 112 - throw new Exception("Unable to open stdout."); 112 + throw new Exception('Unable to open stdout.'); 113 113 } 114 114 115 115 $sock_stderr = fopen('php://stderr', 'w'); 116 116 if (!$sock_stderr) { 117 - throw new Exception("Unable to open stderr."); 117 + throw new Exception('Unable to open stderr.'); 118 118 } 119 119 120 120 $socket_channel = new PhutilSocketChannel(
+5 -5
scripts/symbols/generate_ctags_symbols.php
··· 35 35 $tags = explode("\n", $tags[1]); 36 36 37 37 foreach ($tags as $tag) { 38 - $parts = explode(";", $tag); 38 + $parts = explode(';', $tag); 39 39 // skip lines that we can not parse 40 40 if (count($parts) < 2) { 41 41 continue; ··· 67 67 68 68 // To keep consistent with "Separate with commas, for example: php, py" 69 69 // in Arcanist Project edit form. 70 - $language = str_ireplace("python", "py", $language); 70 + $language = str_ireplace('python', 'py', $language); 71 71 72 72 // also, "normalize" c++ and c# 73 - $language = str_ireplace("c++", "cpp", $language); 74 - $language = str_ireplace("c#", "cs", $language); 73 + $language = str_ireplace('c++', 'cpp', $language); 74 + $language = str_ireplace('c#', 'cs', $language); 75 75 76 76 // Ruby has "singleton method", for example 77 77 $type = substr(str_replace(' ', '_', $type), 0, 12); ··· 107 107 function print_symbol($file, $line_num, $type, $token, $context, $language) { 108 108 // get rid of relative path 109 109 $file = explode('/', $file); 110 - if ($file[0] == '.' || $file[0] == "..") { 110 + if ($file[0] == '.' || $file[0] == '..') { 111 111 array_shift($file); 112 112 } 113 113 $file = '/' . implode('/', $file);
+7 -7
scripts/user/account_admin.php
··· 21 21 "which gives you more help setting up your install. If you create an ". 22 22 "account with this script instead, you will skip the setup help and you ". 23 23 "will not be able to access it later."); 24 - if (!phutil_console_confirm(pht("Skip easy setup and create account?"))) { 25 - echo pht("Cancelled.")."\n"; 24 + if (!phutil_console_confirm(pht('Skip easy setup and create account?'))) { 25 + echo pht('Cancelled.')."\n"; 26 26 exit(1); 27 27 } 28 28 } 29 29 30 - echo "Enter a username to create a new account or edit an existing account."; 30 + echo 'Enter a username to create a new account or edit an existing account.'; 31 31 32 - $username = phutil_console_prompt("Enter a username:"); 32 + $username = phutil_console_prompt('Enter a username:'); 33 33 if (!strlen($username)) { 34 34 echo "Cancelled.\n"; 35 35 exit(1); ··· 95 95 $create_email = null; 96 96 if ($is_new) { 97 97 do { 98 - $email = phutil_console_prompt("Enter user email address:"); 98 + $email = phutil_console_prompt('Enter user email address:'); 99 99 $duplicate = id(new PhabricatorUserEmail())->loadOneWhere( 100 100 'address = %s', 101 101 $email); ··· 115 115 // it. 116 116 phutil_passthru('stty -echo'); 117 117 $password = phutil_console_prompt( 118 - "Enter a password for this user [blank to leave unchanged]:"); 118 + 'Enter a password for this user [blank to leave unchanged]:'); 119 119 phutil_passthru('stty echo'); 120 120 if (strlen($password)) { 121 121 $changed_pass = $password; ··· 183 183 184 184 echo "\n"; 185 185 186 - if (!phutil_console_confirm("Save these changes?", $default_no = false)) { 186 + if (!phutil_console_confirm('Save these changes?', $default_no = false)) { 187 187 echo "Cancelled.\n"; 188 188 exit(1); 189 189 }
+2 -2
scripts/user/add_user.php
··· 19 19 $argv[4]); 20 20 if (!$admin) { 21 21 throw new Exception( 22 - "Admin user must be the username of a valid Phabricator account, used ". 23 - "to send the new user a welcome email."); 22 + 'Admin user must be the username of a valid Phabricator account, used '. 23 + 'to send the new user a welcome email.'); 24 24 } 25 25 26 26 $existing_user = id(new PhabricatorUser())->loadOneWhere(
+1 -1
src/aphront/AphrontRequest.php
··· 483 483 if (empty($_SERVER['HTTPS'])) { 484 484 return false; 485 485 } 486 - if (!strcasecmp($_SERVER["HTTPS"], "off")) { 486 + if (!strcasecmp($_SERVER['HTTPS'], 'off')) { 487 487 return false; 488 488 } 489 489 return true;
+2 -2
src/aphront/configuration/AphrontApplicationConfiguration.php
··· 138 138 ->executeOne(); 139 139 } catch (PhabricatorPolicyException $ex) { 140 140 throw new Exception( 141 - "This blog is not visible to logged out users, so it can not be ". 142 - "visited from a custom domain."); 141 + 'This blog is not visible to logged out users, so it can not be '. 142 + 'visited from a custom domain.'); 143 143 } 144 144 145 145 if (!$blog) {
+1 -1
src/aphront/response/AphrontProxyResponse.php
··· 67 67 68 68 final public function buildResponseString() { 69 69 throw new Exception( 70 - "AphrontProxyResponse must implement reduceProxyResponse()."); 70 + 'AphrontProxyResponse must implement reduceProxyResponse().'); 71 71 } 72 72 73 73
+1 -1
src/aphront/sink/AphrontHTTPSink.php
··· 50 50 51 51 if (strpos($name, ':') !== false) { 52 52 throw new Exception( 53 - "Declining to emit response with malformed HTTP header name: ". 53 + 'Declining to emit response with malformed HTTP header name: '. 54 54 $name); 55 55 } 56 56
+2 -2
src/aphront/sink/__tests__/AphrontHTTPSinkTestCase.php
··· 36 36 public function testHTTPSinkResponseSplitting() { 37 37 $input = $this->tryTestCaseMap( 38 38 array( 39 - "test" => true, 39 + 'test' => true, 40 40 "test\nx" => false, 41 41 "test\rx" => false, 42 42 "test\0x" => false, ··· 75 75 $this->assertEqual( 76 76 'for (;;);{"x":"\u003ciframe\u003e"}', 77 77 $sink->getEmittedData(), 78 - "JSONResponse should prevent content-sniffing attacks."); 78 + 'JSONResponse should prevent content-sniffing attacks.'); 79 79 } 80 80 81 81
+1 -1
src/applications/arcanist/conduit/ConduitAPI_arcanist_projectinfo_Method.php
··· 7 7 extends ConduitAPI_arcanist_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Get information about Arcanist projects."; 10 + return 'Get information about Arcanist projects.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/audit/conduit/ConduitAPI_audit_query_Method.php
··· 6 6 final class ConduitAPI_audit_query_Method extends ConduitAPI_audit_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Query audit requests."; 9 + return 'Query audit requests.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+2 -2
src/applications/audit/editor/PhabricatorAuditCommentEditor.php
··· 145 145 $actor_request = id(new PhabricatorRepositoryAuditRequest()) 146 146 ->setCommitPHID($commit->getPHID()) 147 147 ->setAuditorPHID($actor->getPHID()) 148 - ->setAuditReasons(array("Resigned")); 148 + ->setAuditReasons(array('Resigned')); 149 149 } 150 150 151 151 $actor_request ··· 220 220 ->setCommitPHID($commit->getPHID()) 221 221 ->setAuditorPHID($actor->getPHID()) 222 222 ->setAuditStatus($new_status) 223 - ->setAuditReasons(array("Voluntary Participant")) 223 + ->setAuditReasons(array('Voluntary Participant')) 224 224 ->save(); 225 225 $requests[] = $request; 226 226 }
+2 -2
src/applications/audit/mail/PhabricatorAuditReplyHandler.php
··· 4 4 5 5 public function validateMailReceiver($mail_receiver) { 6 6 if (!($mail_receiver instanceof PhabricatorRepositoryCommit)) { 7 - throw new Exception("Mail receiver is not a commit!"); 7 + throw new Exception('Mail receiver is not a commit!'); 8 8 } 9 9 } 10 10 ··· 24 24 25 25 public function getReplyHandlerInstructions() { 26 26 if ($this->supportsReplies()) { 27 - return pht("Reply to comment."); 27 + return pht('Reply to comment.'); 28 28 } else { 29 29 return null; 30 30 }
+4 -4
src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php
··· 72 72 $max_date = $this->loadDate($args->getArg('max-commit-date')); 73 73 if ($min_date && $max_date && ($min_date > $max_date)) { 74 74 throw new PhutilArgumentUsageException( 75 - "Specified max date must come after specified min date."); 75 + 'Specified max date must come after specified min date.'); 76 76 } 77 77 78 78 $is_dry_run = $args->getArg('dry-run'); ··· 124 124 $console = PhutilConsole::getConsole(); 125 125 126 126 if (!$audits) { 127 - $console->writeErr("%s\n", pht("No audits match the query.")); 127 + $console->writeErr("%s\n", pht('No audits match the query.')); 128 128 return 0; 129 129 } 130 130 ··· 140 140 $console->writeOut( 141 141 "%s\n", 142 142 sprintf( 143 - "%10d %-16s %-16s %s: %s", 143 + '%10d %-16s %-16s %s: %s', 144 144 $audit->getID(), 145 145 $handles[$audit->getAuditorPHID()]->getName(), 146 146 PhabricatorAuditStatusConstants::getStatusName( ··· 158 158 if ($console->confirm($message)) { 159 159 foreach ($audits as $audit) { 160 160 $id = $audit->getID(); 161 - $console->writeOut("%s\n", pht("Deleting audit %d...", $id)); 161 + $console->writeOut("%s\n", pht('Deleting audit %d...', $id)); 162 162 $audit->delete(); 163 163 } 164 164 }
+2 -2
src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php
··· 58 58 'class' => 'aphront-form-instructions', 59 59 ), 60 60 pht( 61 - "Confirm the link with this %s account. This account will be ". 62 - "able to log in to your Phabricator account.", 61 + 'Confirm the link with this %s account. This account will be '. 62 + 'able to log in to your Phabricator account.', 63 63 $provider->getProviderName()))) 64 64 ->appendChild( 65 65 id(new PhabricatorAuthAccountView())
+2 -2
src/applications/auth/controller/PhabricatorAuthLoginController.php
··· 68 68 69 69 if (!$account) { 70 70 throw new Exception( 71 - "Auth provider failed to load an account from processLoginRequest()!"); 71 + 'Auth provider failed to load an account from processLoginRequest()!'); 72 72 } 73 73 74 74 if ($account->getUserPHID()) { ··· 164 164 $next_uri) { 165 165 166 166 if ($account->getUserPHID()) { 167 - throw new Exception("Account is already registered or linked."); 167 + throw new Exception('Account is already registered or linked.'); 168 168 } 169 169 170 170 // Regenerate the registration secret key, set it on the external account,
+3 -3
src/applications/auth/controller/PhabricatorAuthRegisterController.php
··· 163 163 164 164 $captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request); 165 165 if (!$captcha_ok) { 166 - $errors[] = pht("Captcha response is incorrect, try again."); 166 + $errors[] = pht('Captcha response is incorrect, try again.'); 167 167 $e_captcha = pht('Invalid'); 168 168 } 169 169 } ··· 479 479 if (!$providers) { 480 480 $response = $this->renderError( 481 481 pht( 482 - "There are no configured default registration providers.")); 482 + 'There are no configured default registration providers.')); 483 483 return array($account, $provider, $response); 484 484 } else if (count($providers) > 1) { 485 485 $response = $this->renderError( 486 486 pht( 487 - "There are too many configured default registration providers.")); 487 + 'There are too many configured default registration providers.')); 488 488 return array($account, $provider, $response); 489 489 } 490 490
+8 -8
src/applications/auth/controller/PhabricatorAuthStartController.php
··· 46 46 47 47 return $this->renderError( 48 48 pht( 49 - "Your login session is invalid. Try reloading the page and ". 50 - "logging in again. If that does not work, clear your browser ". 51 - "cookies.")); 49 + 'Your login session is invalid. Try reloading the page and '. 50 + 'logging in again. If that does not work, clear your browser '. 51 + 'cookies.')); 52 52 } 53 53 } 54 54 ··· 69 69 70 70 return $this->renderError( 71 71 pht( 72 - "This Phabricator install is not configured with any enabled ". 73 - "authentication providers which can be used to log in. If you ". 74 - "have accidentally locked yourself out by disabling all providers, ". 75 - "you can use `phabricator/bin/auth recover <username>` to ". 76 - "recover access to an administrative account.")); 72 + 'This Phabricator install is not configured with any enabled '. 73 + 'authentication providers which can be used to log in. If you '. 74 + 'have accidentally locked yourself out by disabling all providers, '. 75 + 'you can use `phabricator/bin/auth recover <username>` to '. 76 + 'recover access to an administrative account.')); 77 77 } 78 78 79 79 $next_uri = $request->getStr('next');
+7 -7
src/applications/auth/controller/PhabricatorAuthUnlinkController.php
··· 73 73 ->setTitle(pht('No Such Account')) 74 74 ->appendChild( 75 75 pht( 76 - "You can not unlink this account because it is not linked.")) 76 + 'You can not unlink this account because it is not linked.')) 77 77 ->addCancelButton($this->getDoneURI()); 78 78 79 79 return id(new AphrontDialogResponse())->setDialog($dialog); ··· 87 87 ->setTitle(pht('Permanent Account Link')) 88 88 ->appendChild( 89 89 pht( 90 - "You can not unlink this account because the administrator has ". 91 - "configured Phabricator to make links to %s accounts permanent.", 90 + 'You can not unlink this account because the administrator has '. 91 + 'configured Phabricator to make links to %s accounts permanent.', 92 92 $provider->getProviderName())) 93 93 ->addCancelButton($this->getDoneURI()); 94 94 ··· 101 101 ->setTitle(pht('Last Valid Account')) 102 102 ->appendChild( 103 103 pht( 104 - "You can not unlink this account because you have no other ". 105 - "valid login accounts. If you removed it, you would be unable ". 106 - "to login. Add another authentication method before removing ". 107 - "this one.")) 104 + 'You can not unlink this account because you have no other '. 105 + 'valid login accounts. If you removed it, you would be unable '. 106 + 'to login. Add another authentication method before removing '. 107 + 'this one.')) 108 108 ->addCancelButton($this->getDoneURI()); 109 109 110 110 return id(new AphrontDialogResponse())->setDialog($dialog);
+2 -2
src/applications/auth/controller/PhabricatorAuthValidateController.php
··· 49 49 if (!$failures) { 50 50 if (!$viewer->getPHID()) { 51 51 $failures[] = pht( 52 - "Login cookie was set correctly, but your login session is not ". 53 - "valid. Try clearing cookies and logging in again."); 52 + 'Login cookie was set correctly, but your login session is not '. 53 + 'valid. Try clearing cookies and logging in again.'); 54 54 } 55 55 } 56 56
+4 -4
src/applications/auth/controller/PhabricatorEmailLoginController.php
··· 26 26 27 27 $captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request); 28 28 if (!$captcha_ok) { 29 - $errors[] = pht("Captcha response is incorrect, try again."); 29 + $errors[] = pht('Captcha response is incorrect, try again.'); 30 30 $e_captcha = pht('Invalid'); 31 31 } 32 32 33 33 $email = $request->getStr('email'); 34 34 if (!strlen($email)) { 35 - $errors[] = pht("You must provide an email address."); 35 + $errors[] = pht('You must provide an email address.'); 36 36 $e_email = pht('Required'); 37 37 } 38 38 ··· 54 54 55 55 if (!$target_user) { 56 56 $errors[] = 57 - pht("There is no account associated with that email address."); 58 - $e_email = pht("Invalid"); 57 + pht('There is no account associated with that email address.'); 58 + $e_email = pht('Invalid'); 59 59 } 60 60 61 61 if (!$errors) {
+2 -2
src/applications/auth/controller/config/PhabricatorAuthEditController.php
··· 177 177 $email_domains = PhabricatorEnv::getEnvConfig($config_name); 178 178 if ($email_domains) { 179 179 $registration_warning = pht( 180 - "Users will only be able to register with a verified email address ". 181 - "at one of the configured [[ %s | %s ]] domains: **%s**", 180 + 'Users will only be able to register with a verified email address '. 181 + 'at one of the configured [[ %s | %s ]] domains: **%s**', 182 182 $config_href, 183 183 $config_name, 184 184 implode(', ', $email_domains));
+6 -6
src/applications/auth/management/PhabricatorAuthManagementLDAPWorkflow.php
··· 19 19 if (!$provider) { 20 20 $console->writeOut( 21 21 "%s\n", 22 - "The LDAP authentication provider is not enabled."); 22 + 'The LDAP authentication provider is not enabled.'); 23 23 exit(1); 24 24 } 25 25 26 26 if (!function_exists('ldap_connect')) { 27 27 $console->writeOut( 28 28 "%s\n", 29 - "The LDAP extension is not enabled."); 29 + 'The LDAP extension is not enabled.'); 30 30 exit(1); 31 31 } 32 32 33 33 $adapter = $provider->getAdapter(); 34 34 35 35 $console->writeOut("%s\n", pht('Enter LDAP Credentials')); 36 - $username = phutil_console_prompt("LDAP Username: "); 36 + $username = phutil_console_prompt('LDAP Username: '); 37 37 if (!strlen($username)) { 38 38 throw new PhutilArgumentUsageException( 39 - pht("You must enter an LDAP username.")); 39 + pht('You must enter an LDAP username.')); 40 40 } 41 41 42 42 phutil_passthru('stty -echo'); 43 - $password = phutil_console_prompt("LDAP Password: "); 43 + $password = phutil_console_prompt('LDAP Password: '); 44 44 phutil_passthru('stty echo'); 45 45 46 46 if (!strlen($password)) { 47 47 throw new PhutilArgumentUsageException( 48 - pht("You must enter an LDAP password.")); 48 + pht('You must enter an LDAP password.')); 49 49 } 50 50 51 51 $adapter->setLoginUsername($username);
+10 -10
src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php
··· 67 67 68 68 if (!$accounts) { 69 69 throw new PhutilArgumentUsageException( 70 - pht("No accounts match the arguments!")); 70 + pht('No accounts match the arguments!')); 71 71 } else { 72 72 $console->writeOut( 73 73 "%s\n", 74 74 pht( 75 - "Found %s account(s) to refresh.", 75 + 'Found %s account(s) to refresh.', 76 76 new PhutilNumber(count($accounts)))); 77 77 } 78 78 ··· 82 82 $console->writeOut( 83 83 "%s\n", 84 84 pht( 85 - "Refreshing account #%d (%s/%s).", 85 + 'Refreshing account #%d (%s/%s).', 86 86 $account->getID(), 87 87 $account->getAccountType(), 88 88 $account->getAccountDomain())); ··· 91 91 if (empty($providers[$key])) { 92 92 $console->writeOut( 93 93 "> %s\n", 94 - pht("Skipping, provider is not enabled or does not exist.")); 94 + pht('Skipping, provider is not enabled or does not exist.')); 95 95 continue; 96 96 } 97 97 ··· 99 99 if (!($provider instanceof PhabricatorAuthProviderOAuth2)) { 100 100 $console->writeOut( 101 101 "> %s\n", 102 - pht("Skipping, provider is not an OAuth2 provider.")); 102 + pht('Skipping, provider is not an OAuth2 provider.')); 103 103 continue; 104 104 } 105 105 ··· 107 107 if (!$adapter->supportsTokenRefresh()) { 108 108 $console->writeOut( 109 109 "> %s\n", 110 - pht("Skipping, provider does not support token refresh.")); 110 + pht('Skipping, provider does not support token refresh.')); 111 111 continue; 112 112 } 113 113 ··· 115 115 if (!$refresh_token) { 116 116 $console->writeOut( 117 117 "> %s\n", 118 - pht("Skipping, provider has no stored refresh token.")); 118 + pht('Skipping, provider has no stored refresh token.')); 119 119 continue; 120 120 } 121 121 122 122 $console->writeOut( 123 123 "+ %s\n", 124 124 pht( 125 - "Refreshing token, current token expires in %s seconds.", 125 + 'Refreshing token, current token expires in %s seconds.', 126 126 new PhutilNumber( 127 127 $account->getProperty('oauth.token.access.expires') - time()))); 128 128 ··· 137 137 $console->writeOut( 138 138 "+ %s\n", 139 139 pht( 140 - "Refreshed token, new token expires in %s seconds.", 140 + 'Refreshed token, new token expires in %s seconds.', 141 141 new PhutilNumber( 142 142 $account->getProperty('oauth.token.access.expires') - time()))); 143 143 144 144 } 145 145 146 - $console->writeOut("%s\n", pht("Done.")); 146 + $console->writeOut("%s\n", pht('Done.')); 147 147 148 148 return 0; 149 149 }
+1 -1
src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php
··· 120 120 121 121 $console = PhutilConsole::getConsole(); 122 122 123 - $console->writeOut("%s\n\n", pht("These auth factors will be stripped:")); 123 + $console->writeOut("%s\n\n", pht('These auth factors will be stripped:')); 124 124 125 125 foreach ($factors as $factor) { 126 126 $impl = $factor->getImplementation();
+4 -4
src/applications/auth/provider/PhabricatorAuthProvider.php
··· 16 16 public function getProviderConfig() { 17 17 if ($this->providerConfig === null) { 18 18 throw new Exception( 19 - "Call attachProviderConfig() before getProviderConfig()!"); 19 + 'Call attachProviderConfig() before getProviderConfig()!'); 20 20 } 21 21 return $this->providerConfig; 22 22 } ··· 180 180 protected function renderLoginForm( 181 181 AphrontRequest $request, 182 182 $mode) { 183 - throw new Exception("Not implemented!"); 183 + throw new Exception('Not implemented!'); 184 184 } 185 185 186 186 public function createProviders() { ··· 198 198 protected function loadOrCreateAccount($account_id) { 199 199 if (!strlen($account_id)) { 200 200 throw new Exception( 201 - "loadOrCreateAccount(...): empty account ID!"); 201 + 'loadOrCreateAccount(...): empty account ID!'); 202 202 } 203 203 204 204 $adapter = $this->getAdapter(); ··· 295 295 } 296 296 297 297 public function getDefaultExternalAccount() { 298 - throw new Exception("Not implemented!"); 298 + throw new Exception('Not implemented!'); 299 299 } 300 300 301 301 public function getLoginOrder() {
+13 -13
src/applications/auth/provider/PhabricatorAuthProviderLDAP.php
··· 167 167 $account_id = $adapter->getAccountID(); 168 168 DarkConsoleErrorLogPluginAPI::disableDiscardMode(); 169 169 } else { 170 - throw new Exception("Username and password are required!"); 170 + throw new Exception('Username and password are required!'); 171 171 } 172 172 } catch (PhutilAuthCredentialException $ex) { 173 173 $response = $controller->buildProviderPageResponse( ··· 346 346 "All of the attribute names used here are just examples: your LDAP ". 347 347 "server may use different attribute names."), 348 348 self::KEY_ALWAYS_SEARCH => pht( 349 - "To search for an LDAP record before authenticating, either check ". 350 - "the **Always Search** checkbox or enter an anonymous ". 351 - "username and password to use to perform the search."), 349 + 'To search for an LDAP record before authenticating, either check '. 350 + 'the **Always Search** checkbox or enter an anonymous '. 351 + 'username and password to use to perform the search.'), 352 352 self::KEY_USERNAME_ATTRIBUTE => pht( 353 - "Optionally, specify a username attribute to use to prefill usernames ". 354 - "when registering a new account. This is purely cosmetic and does not ". 355 - "affect the login process, but you can configure it to make sure ". 356 - "users get the same default username as their LDAP username, so ". 357 - "usernames remain consistent across systems."), 353 + 'Optionally, specify a username attribute to use to prefill usernames '. 354 + 'when registering a new account. This is purely cosmetic and does not '. 355 + 'affect the login process, but you can configure it to make sure '. 356 + 'users get the same default username as their LDAP username, so '. 357 + 'usernames remain consistent across systems.'), 358 358 self::KEY_REALNAME_ATTRIBUTES => pht( 359 - "Optionally, specify one or more comma-separated attributes to use to ". 360 - "prefill the \"Real Name\" field when registering a new account. This ". 361 - "is purely cosmetic and does not affect the login process, but can ". 362 - "make registration a little easier."), 359 + 'Optionally, specify one or more comma-separated attributes to use to '. 360 + 'prefill the "Real Name" field when registering a new account. This '. 361 + 'is purely cosmetic and does not affect the login process, but can '. 362 + 'make registration a little easier.'), 363 363 ); 364 364 365 365 foreach ($labels as $key => $label) {
+1 -1
src/applications/auth/provider/PhabricatorAuthProviderOAuth2.php
··· 198 198 $force_refresh = false) { 199 199 200 200 if ($account->getProviderKey() !== $this->getProviderKey()) { 201 - throw new Exception("Account does not match provider!"); 201 + throw new Exception('Account does not match provider!'); 202 202 } 203 203 204 204 if (!$force_refresh) {
+2 -2
src/applications/auth/provider/PhabricatorAuthProviderPersona.php
··· 55 55 $response = null; 56 56 57 57 if (!$request->isAjax()) { 58 - throw new Exception("Expected this request to come via Ajax."); 58 + throw new Exception('Expected this request to come via Ajax.'); 59 59 } 60 60 61 61 $assertion = $request->getStr('assertion'); 62 62 if (!$assertion) { 63 - throw new Exception("Expected identity assertion."); 63 + throw new Exception('Expected identity assertion.'); 64 64 } 65 65 66 66 $adapter->setAssertion($assertion);
+1 -1
src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php
··· 7 7 const TYPE_REGISTRATION = 'config:registration'; 8 8 const TYPE_LINK = 'config:link'; 9 9 const TYPE_UNLINK = 'config:unlink'; 10 - const TYPE_TRUST_EMAILS = "config:trustEmails"; 10 + const TYPE_TRUST_EMAILS = 'config:trustEmails'; 11 11 const TYPE_PROPERTY = 'config:property'; 12 12 13 13 const PROPERTY_KEY = 'auth:property';
+2 -2
src/applications/base/controller/PhabricatorController.php
··· 251 251 252 252 public function getApplicationURI($path = '') { 253 253 if (!$this->getCurrentApplication()) { 254 - throw new Exception("No application!"); 254 + throw new Exception('No application!'); 255 255 } 256 256 return $this->getCurrentApplication()->getApplicationURI($path); 257 257 } ··· 324 324 if (isset($seen[$hash])) { 325 325 $seen[] = get_class($response); 326 326 throw new Exception( 327 - "Cycle while reducing proxy responses: ". 327 + 'Cycle while reducing proxy responses: '. 328 328 implode(' -> ', $seen)); 329 329 } 330 330 $seen[$hash] = get_class($response);
+10 -10
src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
··· 63 63 // Test standard defaults. 64 64 65 65 $this->checkAccess( 66 - "Default", 66 + 'Default', 67 67 id(clone $controller), 68 68 $request, 69 69 array( ··· 82 82 83 83 $env->overrideEnvConfig('auth.require-email-verification', true); 84 84 $this->checkAccess( 85 - "Email Verification Required", 85 + 'Email Verification Required', 86 86 id(clone $controller), 87 87 $request, 88 88 array( ··· 97 97 )); 98 98 99 99 $this->checkAccess( 100 - "Email Verification Required, With Exception", 100 + 'Email Verification Required, With Exception', 101 101 id(clone $controller)->setConfig('email', false), 102 102 $request, 103 103 array( ··· 116 116 // Test admin access. 117 117 118 118 $this->checkAccess( 119 - "Admin Required", 119 + 'Admin Required', 120 120 id(clone $controller)->setConfig('admin', true), 121 121 $request, 122 122 array( ··· 134 134 // Test disabled access. 135 135 136 136 $this->checkAccess( 137 - "Allow Disabled", 137 + 'Allow Disabled', 138 138 id(clone $controller)->setConfig('enabled', false), 139 139 $request, 140 140 array( ··· 152 152 // Test no login required. 153 153 154 154 $this->checkAccess( 155 - "No Login Required", 155 + 'No Login Required', 156 156 id(clone $controller)->setConfig('login', false), 157 157 $request, 158 158 array( ··· 170 170 // Test public access. 171 171 172 172 $this->checkAccess( 173 - "No Login Required", 173 + 'No Login Required', 174 174 id(clone $controller)->setConfig('public', true), 175 175 $request, 176 176 array( ··· 185 185 186 186 $env->overrideEnvConfig('policy.allow-public', true); 187 187 $this->checkAccess( 188 - "Public + configured", 188 + 'Public + configured', 189 189 id(clone $controller)->setConfig('public', true), 190 190 $request, 191 191 array( ··· 210 210 $app_controller = id(clone $controller)->setCurrentApplication($app); 211 211 212 212 $this->checkAccess( 213 - "Application Controller", 213 + 'Application Controller', 214 214 $app_controller, 215 215 $request, 216 216 array( ··· 225 225 )); 226 226 227 227 $this->checkAccess( 228 - "Application Controller", 228 + 'Application Controller', 229 229 id(clone $app_controller)->setConfig('login', false), 230 230 $request, 231 231 array(
+2 -2
src/applications/cache/PhabricatorKeyValueDatabaseCache.php
··· 136 136 137 137 private function willWriteValue($key, $value) { 138 138 if (!is_string($value)) { 139 - throw new Exception("Only strings may be written to the DB cache!"); 139 + throw new Exception('Only strings may be written to the DB cache!'); 140 140 } 141 141 142 142 static $can_deflate; ··· 162 162 case self::CACHE_FORMAT_DEFLATE: 163 163 return PhabricatorCaches::inflateData($value); 164 164 default: 165 - throw new Exception("Unknown cache format."); 165 + throw new Exception('Unknown cache format.'); 166 166 } 167 167 } 168 168
+3 -3
src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php
··· 52 52 } 53 53 54 54 if ($purge['remarkup']) { 55 - $console->writeOut("Purging remarkup cache..."); 55 + $console->writeOut('Purging remarkup cache...'); 56 56 $this->purgeRemarkupCache(); 57 57 $console->writeOut("done.\n"); 58 58 } 59 59 60 60 if ($purge['changeset']) { 61 - $console->writeOut("Purging changeset cache..."); 61 + $console->writeOut('Purging changeset cache...'); 62 62 $this->purgeChangesetCache(); 63 63 $console->writeOut("done.\n"); 64 64 } 65 65 66 66 if ($purge['general']) { 67 - $console->writeOut("Purging general cache..."); 67 + $console->writeOut('Purging general cache...'); 68 68 $this->purgeGeneralCache(); 69 69 $console->writeOut("done.\n"); 70 70 }
+1 -1
src/applications/calendar/view/AphrontCalendarEventView.php
··· 88 88 } 89 89 90 90 public function render() { 91 - throw new Exception("Events are only rendered indirectly."); 91 + throw new Exception('Events are only rendered indirectly.'); 92 92 } 93 93 94 94 }
+1 -1
src/applications/chatlog/conduit/ConduitAPI_chatlog_query_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return "Retrieve chatter."; 14 + return 'Retrieve chatter.'; 15 15 } 16 16 17 17 public function defineParamTypes() {
+1 -1
src/applications/chatlog/conduit/ConduitAPI_chatlog_record_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return "Record chatter."; 14 + return 'Record chatter.'; 15 15 } 16 16 17 17 public function defineParamTypes() {
+4 -4
src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php
··· 152 152 array( 153 153 'href' => $first_uri, 154 154 ), 155 - "\xC2\xAB ". pht("Newest")); 155 + "\xC2\xAB ". pht('Newest')); 156 156 } 157 157 158 158 $prev_uri = $pager->getPrevPageURI(); ··· 162 162 array( 163 163 'href' => $prev_uri, 164 164 ), 165 - "\xE2\x80\xB9 " . pht("Newer")); 165 + "\xE2\x80\xB9 " . pht('Newer')); 166 166 } 167 167 168 168 $next_uri = $pager->getNextPageURI(); ··· 172 172 array( 173 173 'href' => $next_uri, 174 174 ), 175 - pht("Older") . " \xE2\x80\xBA"); 175 + pht('Older') . " \xE2\x80\xBA"); 176 176 } 177 177 178 178 $pager_top = phutil_tag( ··· 224 224 array( 225 225 'href' => '#latest' 226 226 ), 227 - pht("Jump to Bottom") . " \xE2\x96\xBE"); 227 + pht('Jump to Bottom') . " \xE2\x96\xBE"); 228 228 229 229 $jump = phutil_tag( 230 230 'div',
+5 -5
src/applications/conduit/call/ConduitCall.php
··· 114 114 if (!$allow_public) { 115 115 if (!$user->isLoggedIn() && !$user->isOmnipotent()) { 116 116 // TODO: As per below, this should get centralized and cleaned up. 117 - throw new ConduitException("ERR-INVALID-AUTH"); 117 + throw new ConduitException('ERR-INVALID-AUTH'); 118 118 } 119 119 } 120 120 ··· 131 131 if (!$can_view) { 132 132 throw new ConduitException( 133 133 pht( 134 - "You do not have access to the application which provides this ". 135 - "API method.")); 134 + 'You do not have access to the application which provides this '. 135 + 'API method.')); 136 136 } 137 137 } 138 138 } ··· 142 142 $client = new ConduitClient($server); 143 143 $params = $this->request->getAllParameters(); 144 144 145 - $params["__conduit__"]["isProxied"] = true; 145 + $params['__conduit__']['isProxied'] = true; 146 146 147 147 if ($this->handler->shouldRequireAuthentication()) { 148 148 $client->callMethodSynchronous( ··· 152 152 'clientVersion' => '1.0', 153 153 'user' => $this->getUser()->getUserName(), 154 154 'certificate' => $this->getUser()->getConduitCertificate(), 155 - '__conduit__' => $params["__conduit__"], 155 + '__conduit__' => $params['__conduit__'], 156 156 )); 157 157 } 158 158
+1 -1
src/applications/conduit/call/__tests__/ConduitCallTestCase.php
··· 23 23 24 24 $this->assertTrue( 25 25 ($caught instanceof ConduitException), 26 - "user.whoami should require authentication"); 26 + 'user.whoami should require authentication'); 27 27 } 28 28 }
+4 -4
src/applications/conduit/config/PhabricatorConduitConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Conduit"); 7 + return pht('Conduit'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure conduit."); 11 + return pht('Configure conduit.'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 return array( 16 - $this->newOption("conduit.servers", "list<string>", array()) 16 + $this->newOption('conduit.servers', 'list<string>', array()) 17 17 ->setLocked(true) 18 - ->setSummary(pht("Servers that conduit can connect to.")) 18 + ->setSummary(pht('Servers that conduit can connect to.')) 19 19 ->setDescription( 20 20 pht( 21 21 "Set an array of servers where conduit can connect to. This is ".
+1 -1
src/applications/conduit/controller/PhabricatorConduitAPIController.php
··· 168 168 $user_name) { 169 169 170 170 if (!$api_request->getUser()->getIsAdmin()) { 171 - throw new Exception("Only administrators can use actAsUser"); 171 + throw new Exception('Only administrators can use actAsUser'); 172 172 } 173 173 174 174 $user = id(new PhabricatorUser())->loadOneWhere(
+21 -21
src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php
··· 14 14 } 15 15 16 16 public function getMethodDescription() { 17 - return "Connect a session-based client."; 17 + return 'Connect a session-based client.'; 18 18 } 19 19 20 20 public function defineParamTypes() { ··· 35 35 36 36 public function defineErrorTypes() { 37 37 return array( 38 - "ERR-BAD-VERSION" => 39 - "Client/server version mismatch. Upgrade your server or downgrade ". 40 - "your client.", 41 - "NEW-ARC-VERSION" => 42 - "Client/server version mismatch. Upgrade your client.", 43 - "ERR-UNKNOWN-CLIENT" => 44 - "Client is unknown.", 45 - "ERR-INVALID-USER" => 46 - "The username you are attempting to authenticate with is not valid.", 47 - "ERR-INVALID-CERTIFICATE" => 48 - "Your authentication certificate for this server is invalid.", 49 - "ERR-INVALID-TOKEN" => 38 + 'ERR-BAD-VERSION' => 39 + 'Client/server version mismatch. Upgrade your server or downgrade '. 40 + 'your client.', 41 + 'NEW-ARC-VERSION' => 42 + 'Client/server version mismatch. Upgrade your client.', 43 + 'ERR-UNKNOWN-CLIENT' => 44 + 'Client is unknown.', 45 + 'ERR-INVALID-USER' => 46 + 'The username you are attempting to authenticate with is not valid.', 47 + 'ERR-INVALID-CERTIFICATE' => 48 + 'Your authentication certificate for this server is invalid.', 49 + 'ERR-INVALID-TOKEN' => 50 50 "The challenge token you are authenticating with is outside of the ". 51 51 "allowed time range. Either your system clock is out of whack or ". 52 52 "you're executing a replay attack.", 53 - "ERR-NO-CERTIFICATE" => "This server requires authentication.", 53 + 'ERR-NO-CERTIFICATE' => 'This server requires authentication.', 54 54 ); 55 55 } 56 56 ··· 126 126 throw id(new ConduitException('ERR-INVALID-TOKEN')) 127 127 ->setErrorDescription( 128 128 pht( 129 - "The request you submitted is signed with a timestamp, but that ". 130 - "timestamp is not within %s of the current time. The ". 131 - "signed timestamp is %s (%s), and the current server time is ". 132 - "%s (%s). This is a difference of %s seconds, but the ". 133 - "timestamp must differ from the server time by no more than ". 134 - "%s seconds. Your client or server clock may not be set ". 135 - "correctly.", 129 + 'The request you submitted is signed with a timestamp, but that '. 130 + 'timestamp is not within %s of the current time. The '. 131 + 'signed timestamp is %s (%s), and the current server time is '. 132 + '%s (%s). This is a difference of %s seconds, but the '. 133 + 'timestamp must differ from the server time by no more than '. 134 + '%s seconds. Your client or server clock may not be set '. 135 + 'correctly.', 136 136 phabricator_format_relative_time($threshold), 137 137 $token, 138 138 date('r', $token),
+6 -6
src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php
··· 15 15 } 16 16 17 17 public function getMethodDescription() { 18 - return "Retrieve certificate information for a user."; 18 + return 'Retrieve certificate information for a user.'; 19 19 } 20 20 21 21 public function defineParamTypes() { ··· 31 31 32 32 public function defineErrorTypes() { 33 33 return array( 34 - "ERR-BAD-TOKEN" => "Token does not exist or has expired.", 35 - "ERR-RATE-LIMIT" => 36 - "You have made too many invalid token requests recently. Wait before ". 37 - "making more.", 34 + 'ERR-BAD-TOKEN' => 'Token does not exist or has expired.', 35 + 'ERR-RATE-LIMIT' => 36 + 'You have made too many invalid token requests recently. Wait before '. 37 + 'making more.', 38 38 ); 39 39 } 40 40 ··· 70 70 'phid = %s', 71 71 $info->getUserPHID()); 72 72 if (!$user) { 73 - throw new Exception("Certificate token points to an invalid user!"); 73 + throw new Exception('Certificate token points to an invalid user!'); 74 74 } 75 75 76 76 return array(
+1 -1
src/applications/conduit/method/ConduitAPI_conduit_ping_Method.php
··· 10 10 } 11 11 12 12 public function getMethodDescription() { 13 - return "Basic ping for monitoring or a health-check."; 13 + return 'Basic ping for monitoring or a health-check.'; 14 14 } 15 15 16 16 public function defineParamTypes() {
+3 -3
src/applications/conduit/method/ConduitAPI_conduit_query_Method.php
··· 6 6 final class ConduitAPI_conduit_query_Method extends ConduitAPIMethod { 7 7 8 8 public function getMethodDescription() { 9 - return "Returns the parameters of the Conduit methods."; 9 + return 'Returns the parameters of the Conduit methods.'; 10 10 } 11 11 12 12 public function defineParamTypes() { ··· 30 30 31 31 $names_to_params = array(); 32 32 foreach ($classes as $class) { 33 - $method_name = $class["name"]; 33 + $method_name = $class['name']; 34 34 $obj = newv($method_name, array()); 35 35 $names_to_params[$this->getAPIMethodNameFromClassName($method_name)] = 36 - array("params" => $obj->defineParamTypes()); 36 + array('params' => $obj->defineParamTypes()); 37 37 } 38 38 return $names_to_params; 39 39 }
+3 -3
src/applications/conduit/protocol/ConduitAPIRequest.php
··· 38 38 public function getUser() { 39 39 if (!$this->user) { 40 40 throw new Exception( 41 - "You can not access the user inside the implementation of a Conduit ". 42 - "method which does not require authentication (as per ". 43 - "shouldRequireAuthentication())."); 41 + 'You can not access the user inside the implementation of a Conduit '. 42 + 'method which does not require authentication (as per '. 43 + 'shouldRequireAuthentication()).'); 44 44 } 45 45 return $this->user; 46 46 }
+3 -3
src/applications/conduit/ssh/ConduitSSHWorkflow.php
··· 18 18 19 19 $methodv = $args->getArg('method'); 20 20 if (!$methodv) { 21 - throw new Exception("No Conduit method provided."); 21 + throw new Exception('No Conduit method provided.'); 22 22 } else if (count($methodv) > 1) { 23 - throw new Exception("Too many Conduit methods provided."); 23 + throw new Exception('Too many Conduit methods provided.'); 24 24 } 25 25 26 26 $method = head($methodv); ··· 28 28 $json = $this->readAllInput(); 29 29 $raw_params = json_decode($json, true); 30 30 if (!is_array($raw_params)) { 31 - throw new Exception("Invalid JSON input."); 31 + throw new Exception('Invalid JSON input.'); 32 32 } 33 33 34 34 $params = idx($raw_params, 'params', '[]');
+1 -1
src/applications/config/check/PhabricatorSetupCheckAPC.php
··· 19 19 } 20 20 21 21 if (!ini_get('apc.enabled')) { 22 - $summary = pht("Enabling APC will dramatically improve performance."); 22 + $summary = pht('Enabling APC will dramatically improve performance.'); 23 23 $message = pht( 24 24 "The PHP extension 'APC' is installed, but not enabled in your PHP ". 25 25 "configuration. Enabling it will dramatically improve Phabricator ".
+1 -1
src/applications/config/check/PhabricatorSetupCheckBaseURI.php
··· 55 55 $this 56 56 ->newIssue('config.phabricator.base-uri') 57 57 ->setShortName(pht('No Base URI')) 58 - ->setName(pht("Base URI Not Configured")) 58 + ->setName(pht('Base URI Not Configured')) 59 59 ->setSummary($summary) 60 60 ->setMessage($message) 61 61 ->addCommand(
+3 -3
src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
··· 29 29 $short = pht('Obsolete Config'); 30 30 $name = pht('Obsolete Configuration Option "%s"', $key); 31 31 } else { 32 - $summary = pht("This option is not recognized. It may be misspelled."); 32 + $summary = pht('This option is not recognized. It may be misspelled.'); 33 33 $message = pht( 34 34 "The configuration option '%s' is not recognized. It may be ". 35 35 "misspelled, or it might have existed in an older version of ". ··· 65 65 } 66 66 67 67 $message = $message."\n\n".pht( 68 - "This configuration value is defined in these %d ". 69 - "configuration source(s): %s.", 68 + 'This configuration value is defined in these %d '. 69 + 'configuration source(s): %s.', 70 70 count($found), 71 71 implode(', ', $found)); 72 72 $issue->setMessage($message);
+3 -3
src/applications/config/check/PhabricatorSetupCheckMail.php
··· 41 41 'different mail adapter.'); 42 42 43 43 $this->newIssue('config.amazon-ses.access-key') 44 - ->setName(pht("Amazon SES Access Key Not Set")) 44 + ->setName(pht('Amazon SES Access Key Not Set')) 45 45 ->setMessage($message) 46 46 ->addRelatedPhabricatorConfig('metamta.mail-adapter') 47 47 ->addPhabricatorConfig('amazon-ses.access-key'); ··· 54 54 'different mail adapter.'); 55 55 56 56 $this->newIssue('config.amazon-ses.secret-key') 57 - ->setName(pht("Amazon SES Secret Key Not Set")) 57 + ->setName(pht('Amazon SES Secret Key Not Set')) 58 58 ->setMessage($message) 59 59 ->addRelatedPhabricatorConfig('metamta.mail-adapter') 60 60 ->addPhabricatorConfig('amazon-ses.secret-key'); ··· 71 71 'a "From" address, or choose a different mail adapter.'); 72 72 73 73 $this->newIssue('config.metamta.default-address') 74 - ->setName(pht("No SES From Address Configured")) 74 + ->setName(pht('No SES From Address Configured')) 75 75 ->setMessage($message) 76 76 ->addRelatedPhabricatorConfig('metamta.mail-adapter') 77 77 ->addPhabricatorConfig('metamta.default-address');
+3 -3
src/applications/config/check/PhabricatorSetupCheckMySQL.php
··· 25 25 ->setMessage($message); 26 26 } 27 27 28 - $mode_string = queryfx_one($conn_raw, "SELECT @@sql_mode"); 28 + $mode_string = queryfx_one($conn_raw, 'SELECT @@sql_mode'); 29 29 $modes = explode(',', $mode_string['@@sql_mode']); 30 30 if (!in_array('STRICT_ALL_TABLES', $modes)) { 31 31 $summary = pht( 32 - "MySQL is not in strict mode, but using strict mode is strongly ". 33 - "encouraged."); 32 + 'MySQL is not in strict mode, but using strict mode is strongly '. 33 + 'encouraged.'); 34 34 35 35 $message = pht( 36 36 "On your MySQL instance, the global %s is not set to %s. ".
+2 -2
src/applications/config/check/PhabricatorSetupCheckPath.php
··· 103 103 ->setName(pht('$PATH Component Unusable')) 104 104 ->setSummary( 105 105 pht( 106 - "A component of the configured PATH can not be used by ". 107 - "the webserver: %s", 106 + 'A component of the configured PATH can not be used by '. 107 + 'the webserver: %s', 108 108 $path_part)) 109 109 ->setMessage( 110 110 pht(
+2 -2
src/applications/config/check/PhabricatorSetupCheckRepositories.php
··· 18 18 19 19 if (!Filesystem::pathExists($repo_path)) { 20 20 $summary = pht( 21 - "The path for local repositories does not exist, or is not ". 22 - "readable by the webserver."); 21 + 'The path for local repositories does not exist, or is not '. 22 + 'readable by the webserver.'); 23 23 $message = pht( 24 24 "The directory for local repositories (%s) does not exist, or is not ". 25 25 "readable by the webserver. Phabricator uses this directory to store ".
+2 -2
src/applications/config/check/PhabricatorSetupCheckTimezone.php
··· 31 31 } 32 32 33 33 $summary = pht( 34 - "Without a configured timezone, PHP will emit warnings when working ". 35 - "with dates, and dates and times may not display correctly."); 34 + 'Without a configured timezone, PHP will emit warnings when working '. 35 + 'with dates, and dates and times may not display correctly.'); 36 36 37 37 $message = pht( 38 38 "Your configuration fails to specify a server timezone. You can either ".
+6 -6
src/applications/config/controller/PhabricatorConfigEditController.php
··· 24 24 $ancient[$this->key]); 25 25 } else { 26 26 $desc = pht( 27 - "This configuration option is unknown. It may be misspelled, ". 28 - "or have existed in a previous version of Phabricator."); 27 + 'This configuration option is unknown. It may be misspelled, '. 28 + 'or have existed in a previous version of Phabricator.'); 29 29 } 30 30 31 31 // This may be a dead config entry, which existed in the past but no ··· 112 112 ->setErrors($errors); 113 113 } else if ($option->getHidden()) { 114 114 $msg = pht( 115 - "This configuration is hidden and can not be edited or viewed from ". 116 - "the web interface."); 115 + 'This configuration is hidden and can not be edited or viewed from '. 116 + 'the web interface.'); 117 117 118 118 $error_view = id(new AphrontErrorView()) 119 119 ->setTitle(pht('Configuration Hidden')) ··· 121 121 ->appendChild(phutil_tag('p', array(), $msg)); 122 122 } else if ($option->getLocked()) { 123 123 $msg = pht( 124 - "This configuration is locked and can not be edited from the web ". 125 - "interface. Use `./bin/config` in `phabricator/` to edit it."); 124 + 'This configuration is locked and can not be edited from the web '. 125 + 'interface. Use `./bin/config` in `phabricator/` to edit it.'); 126 126 127 127 $error_view = id(new AphrontErrorView()) 128 128 ->setTitle(pht('Configuration Locked'))
+2 -2
src/applications/config/controller/PhabricatorConfigIgnoreController.php
··· 31 31 $title = pht('Unignore this setup issue?'); 32 32 $submit_title = pht('Unignore'); 33 33 $body = pht( 34 - "This issue will no longer be suppressed, and will return to its ". 35 - "rightful place as a global setup warning."); 34 + 'This issue will no longer be suppressed, and will return to its '. 35 + 'rightful place as a global setup warning.'); 36 36 } else { 37 37 throw new Exception('Unrecognized verb: ' . $this->verb); 38 38 }
+1 -1
src/applications/config/controller/PhabricatorConfigIssueListController.php
··· 15 15 PhabricatorSetupCheck::countUnignoredIssues($issues)); 16 16 17 17 $list = $this->buildIssueList($issues); 18 - $list->setNoDataString(pht("There are no open setup issues.")); 18 + $list->setNoDataString(pht('There are no open setup issues.')); 19 19 20 20 $header = id(new PHUIHeaderView()) 21 21 ->setHeader(pht('Open Phabricator Setup Issues'));
+2 -2
src/applications/config/management/PhabricatorConfigManagementDeleteWorkflow.php
··· 23 23 $argv = $args->getArg('args'); 24 24 if (count($argv) == 0) { 25 25 throw new PhutilArgumentUsageException( 26 - "Specify a configuration key to delete."); 26 + 'Specify a configuration key to delete.'); 27 27 } 28 28 29 29 $key = $argv[0]; 30 30 31 31 if (count($argv) > 1) { 32 32 throw new PhutilArgumentUsageException( 33 - "Too many arguments: expected one key."); 33 + 'Too many arguments: expected one key.'); 34 34 } 35 35 36 36 $config = new PhabricatorConfigLocalSource();
+2 -2
src/applications/config/management/PhabricatorConfigManagementGetWorkflow.php
··· 23 23 $argv = $args->getArg('args'); 24 24 if (count($argv) == 0) { 25 25 throw new PhutilArgumentUsageException( 26 - "Specify a configuration key to get."); 26 + 'Specify a configuration key to get.'); 27 27 } 28 28 29 29 $key = $argv[0]; 30 30 31 31 if (count($argv) > 1) { 32 32 throw new PhutilArgumentUsageException( 33 - "Too many arguments: expected one key."); 33 + 'Too many arguments: expected one key.'); 34 34 } 35 35 36 36 $options = PhabricatorApplicationConfigOptions::loadAllOptions();
+2 -2
src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
··· 22 22 $argv = $args->getArg('args'); 23 23 if (count($argv) == 0) { 24 24 throw new PhutilArgumentUsageException( 25 - "Specify a configuration key and a value to set it to."); 25 + 'Specify a configuration key and a value to set it to.'); 26 26 } 27 27 28 28 $key = $argv[0]; ··· 36 36 37 37 if (count($argv) > 2) { 38 38 throw new PhutilArgumentUsageException( 39 - "Too many arguments: expected one key and one value."); 39 + 'Too many arguments: expected one key and one value.'); 40 40 } 41 41 42 42 $options = PhabricatorApplicationConfigOptions::loadAllOptions();
+2 -2
src/applications/config/option/PhabricatorAWSConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Amazon Web Services"); 7 + return pht('Amazon Web Services'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure integration with AWS (EC2, SES, S3, etc)."); 11 + return pht('Configure integration with AWS (EC2, SES, S3, etc).'); 12 12 } 13 13 14 14 public function getOptions() {
+27 -27
src/applications/config/option/PhabricatorAccessLogConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Access Logs"); 7 + return pht('Access Logs'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure the access logs, which log HTTP/SSH requests."); 11 + return pht('Configure the access logs, which log HTTP/SSH requests.'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 $common_map = array( 16 - 'C' => pht("The controller or workflow which handled the request."), 17 - 'c' => pht("The HTTP response code or process exit code."), 18 - 'D' => pht("The request date."), 19 - 'e' => pht("Epoch timestamp."), 16 + 'C' => pht('The controller or workflow which handled the request.'), 17 + 'c' => pht('The HTTP response code or process exit code.'), 18 + 'D' => pht('The request date.'), 19 + 'e' => pht('Epoch timestamp.'), 20 20 'h' => pht("The webserver's host name."), 21 - 'p' => pht("The PID of the server process."), 22 - 'r' => pht("The remote IP."), 23 - 'T' => pht("The request duration, in microseconds."), 24 - 'U' => pht("The request path, or request target."), 25 - 'm' => pht("For conduit, the Conduit method which was invoked."), 26 - 'u' => pht("The logged-in username, if one is logged in."), 27 - 'P' => pht("The logged-in user PHID, if one is logged in."), 28 - 'i' => pht("Request input, in bytes."), 29 - 'o' => pht("Request output, in bytes."), 21 + 'p' => pht('The PID of the server process.'), 22 + 'r' => pht('The remote IP.'), 23 + 'T' => pht('The request duration, in microseconds.'), 24 + 'U' => pht('The request path, or request target.'), 25 + 'm' => pht('For conduit, the Conduit method which was invoked.'), 26 + 'u' => pht('The logged-in username, if one is logged in.'), 27 + 'P' => pht('The logged-in user PHID, if one is logged in.'), 28 + 'i' => pht('Request input, in bytes.'), 29 + 'o' => pht('Request output, in bytes.'), 30 30 ); 31 31 32 32 $http_map = $common_map + array( 33 - 'R' => pht("The HTTP referrer."), 34 - 'M' => pht("The HTTP method."), 33 + 'R' => pht('The HTTP referrer.'), 34 + 'M' => pht('The HTTP method.'), 35 35 ); 36 36 37 37 $ssh_map = $common_map + array( 38 - 's' => pht("The system user."), 39 - 'S' => pht("The system sudo user."), 38 + 's' => pht('The system user.'), 39 + 'S' => pht('The system sudo user.'), 40 40 ); 41 41 42 42 $http_desc = pht( 43 - "Format for the HTTP access log. Use {{log.access.path}} to set the ". 44 - "path. Available variables are:"); 43 + 'Format for the HTTP access log. Use {{log.access.path}} to set the '. 44 + 'path. Available variables are:'); 45 45 $http_desc .= "\n\n"; 46 46 $http_desc .= $this->renderMapHelp($http_map); 47 47 48 48 $ssh_desc = pht( 49 - "Format for the SSH access log. Use {{log.ssh.path}} to set the ". 50 - "path. Available variables are:"); 49 + 'Format for the SSH access log. Use {{log.ssh.path}} to set the '. 50 + 'path. Available variables are:'); 51 51 $ssh_desc .= "\n\n"; 52 52 $ssh_desc .= $this->renderMapHelp($ssh_map); 53 53 54 54 return array( 55 55 $this->newOption('log.access.path', 'string', null) 56 56 ->setLocked(true) 57 - ->setSummary(pht("Access log location.")) 57 + ->setSummary(pht('Access log location.')) 58 58 ->setDescription( 59 59 pht( 60 60 "To enable the Phabricator access log, specify a path. The ". ··· 76 76 'wild', 77 77 "[%D]\t%p\t%h\t%r\t%u\t%C\t%m\t%U\t%R\t%c\t%T") 78 78 ->setLocked(true) 79 - ->setSummary(pht("Access log format.")) 79 + ->setSummary(pht('Access log format.')) 80 80 ->setDescription($http_desc), 81 81 $this->newOption('log.ssh.path', 'string', null) 82 82 ->setLocked(true) 83 - ->setSummary(pht("SSH log location.")) 83 + ->setSummary(pht('SSH log location.')) 84 84 ->setDescription( 85 85 pht( 86 86 "To enable the Phabricator SSH log, specify a path. The ". ··· 99 99 'wild', 100 100 "[%D]\t%p\t%h\t%r\t%s\t%S\t%u\t%C\t%U\t%c\t%T\t%i\t%o") 101 101 ->setLocked(true) 102 - ->setSummary(pht("SSH log format.")) 102 + ->setSummary(pht('SSH log format.')) 103 103 ->setDescription($ssh_desc), 104 104 ); 105 105 }
+23 -23
src/applications/config/option/PhabricatorAuthenticationConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Authentication"); 7 + return pht('Authentication'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options relating to authentication."); 11 + return pht('Options relating to authentication.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 16 16 $this->newOption('auth.require-email-verification', 'bool', false) 17 17 ->setBoolOptions( 18 18 array( 19 - pht("Require email verification"), 19 + pht('Require email verification'), 20 20 pht("Don't require email verification") 21 21 )) 22 22 ->setSummary( 23 - pht("Require email verification before a user can log in.")) 23 + pht('Require email verification before a user can log in.')) 24 24 ->setDescription( 25 25 pht( 26 - "If true, email addresses must be verified (by clicking a link ". 27 - "in an email) before a user can login. By default, verification ". 28 - "is optional unless {{auth.email-domains}} is nonempty.")), 26 + 'If true, email addresses must be verified (by clicking a link '. 27 + 'in an email) before a user can login. By default, verification '. 28 + 'is optional unless {{auth.email-domains}} is nonempty.')), 29 29 $this->newOption('auth.require-approval', 'bool', true) 30 30 ->setBoolOptions( 31 31 array( 32 - pht("Require Administrators to Approve Accounts"), 32 + pht('Require Administrators to Approve Accounts'), 33 33 pht("Don't Require Manual Approval"), 34 34 )) 35 35 ->setSummary( 36 - pht("Require administrators to approve new accounts.")) 36 + pht('Require administrators to approve new accounts.')) 37 37 ->setDescription( 38 38 pht( 39 39 "Newly registered Phabricator accounts can either be placed ". ··· 50 50 "{{auth.email-domains}} is configured correctly for your ". 51 51 "install!")), 52 52 $this->newOption('auth.email-domains', 'list<string>', array()) 53 - ->setSummary(pht("Only allow registration from particular domains.")) 53 + ->setSummary(pht('Only allow registration from particular domains.')) 54 54 ->setDescription( 55 55 pht( 56 56 "You can restrict allowed email addresses to certain domains ". ··· 67 67 pht('Valid Setting')), 68 68 $this->newOption('auth.login-message', 'string', null) 69 69 ->setLocked(true) 70 - ->setSummary(pht("A block of HTML displayed on the login screen.")) 70 + ->setSummary(pht('A block of HTML displayed on the login screen.')) 71 71 ->setDescription( 72 72 pht( 73 73 "You can provide an arbitrary block of HTML here, which will ". ··· 76 76 $this->newOption('account.editable', 'bool', true) 77 77 ->setBoolOptions( 78 78 array( 79 - pht("Allow editing"), 80 - pht("Prevent editing") 79 + pht('Allow editing'), 80 + pht('Prevent editing') 81 81 )) 82 82 ->setSummary( 83 83 pht( 84 - "Determines whether or not basic account information is ". 85 - "editable.")) 84 + 'Determines whether or not basic account information is '. 85 + 'editable.')) 86 86 ->setDescription( 87 87 pht( 88 - "Is basic account information (email, real name, profile ". 89 - "picture) editable? If you set up Phabricator to automatically ". 90 - "synchronize account information from some other authoritative ". 91 - "system, you can disable this to ensure information remains ". 92 - "consistent across both systems.")), 88 + 'Is basic account information (email, real name, profile '. 89 + 'picture) editable? If you set up Phabricator to automatically '. 90 + 'synchronize account information from some other authoritative '. 91 + 'system, you can disable this to ensure information remains '. 92 + 'consistent across both systems.')), 93 93 $this->newOption('account.minimum-password-length', 'int', 8) 94 - ->setSummary(pht("Minimum password length.")) 94 + ->setSummary(pht('Minimum password length.')) 95 95 ->setDescription( 96 96 pht( 97 - "When users set or reset a password, it must have at least this ". 98 - "many characters.")), 97 + 'When users set or reset a password, it must have at least this '. 98 + 'many characters.')), 99 99 ); 100 100 } 101 101
+1 -1
src/applications/config/option/PhabricatorConfigOption.php
··· 187 187 public function getCustomObject() { 188 188 if (!$this->customObject) { 189 189 if (!$this->isCustomType()) { 190 - throw new Exception("This option does not have a custom type!"); 190 + throw new Exception('This option does not have a custom type!'); 191 191 } 192 192 $this->customObject = newv(substr($this->getType(), 7), array()); 193 193 }
+25 -25
src/applications/config/option/PhabricatorCoreConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Core"); 7 + return pht('Core'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure core options, including URIs."); 11 + return pht('Configure core options, including URIs.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 27 27 return array( 28 28 $this->newOption('phabricator.base-uri', 'string', null) 29 29 ->setLocked(true) 30 - ->setSummary(pht("URI where Phabricator is installed.")) 30 + ->setSummary(pht('URI where Phabricator is installed.')) 31 31 ->setDescription( 32 32 pht( 33 - "Set the URI where Phabricator is installed. Setting this ". 34 - "improves security by preventing cookies from being set on other ". 35 - "domains, and allows daemons to send emails with links that have ". 36 - "the correct domain.")) 33 + 'Set the URI where Phabricator is installed. Setting this '. 34 + 'improves security by preventing cookies from being set on other '. 35 + 'domains, and allows daemons to send emails with links that have '. 36 + 'the correct domain.')) 37 37 ->addExample('http://phabricator.example.com/', pht('Valid Setting')), 38 38 $this->newOption('phabricator.production-uri', 'string', null) 39 39 ->setSummary( 40 - pht("Primary install URI, for multi-environment installs.")) 40 + pht('Primary install URI, for multi-environment installs.')) 41 41 ->setDescription( 42 42 pht( 43 - "If you have multiple Phabricator environments (like a ". 44 - "development/staging environment for working on testing ". 45 - "Phabricator, and a production environment for deploying it), ". 46 - "set the production environment URI here so that emails and other ". 47 - "durable URIs will always generate with links pointing at the ". 48 - "production environment. If unset, defaults to ". 49 - "{{phabricator.base-uri}}. Most installs do not need to set ". 50 - "this option.")) 43 + 'If you have multiple Phabricator environments (like a '. 44 + 'development/staging environment for working on testing '. 45 + 'Phabricator, and a production environment for deploying it), '. 46 + 'set the production environment URI here so that emails and other '. 47 + 'durable URIs will always generate with links pointing at the '. 48 + 'production environment. If unset, defaults to '. 49 + '{{phabricator.base-uri}}. Most installs do not need to set '. 50 + 'this option.')) 51 51 ->addExample('http://phabricator.example.com/', pht('Valid Setting')), 52 52 $this->newOption('phabricator.allowed-uris', 'list<string>', array()) 53 53 ->setLocked(true) 54 - ->setSummary(pht("Alternative URIs that can access Phabricator.")) 54 + ->setSummary(pht('Alternative URIs that can access Phabricator.')) 55 55 ->setDescription( 56 56 pht( 57 57 "These alternative URIs will be able to access 'normal' pages ". ··· 64 64 pht('Valid Setting')), 65 65 $this->newOption('phabricator.timezone', 'string', null) 66 66 ->setSummary( 67 - pht("The timezone Phabricator should use.")) 67 + pht('The timezone Phabricator should use.')) 68 68 ->setDescription( 69 69 pht( 70 70 "PHP requires that you set a timezone in your php.ini before ". ··· 78 78 ->addExample('America/Los_Angeles', pht('US West (PDT)')), 79 79 $this->newOption('phabricator.cookie-prefix', 'string', null) 80 80 ->setSummary( 81 - pht("Set a string Phabricator should use to prefix ". 82 - "cookie names")) 81 + pht('Set a string Phabricator should use to prefix '. 82 + 'cookie names')) 83 83 ->setDescription( 84 84 pht( 85 - "Cookies set for x.com are also sent for y.x.com. Assuming ". 86 - "Phabricator instances are running on both domains, this will ". 87 - "create a collision preventing you from logging in.")) 85 + 'Cookies set for x.com are also sent for y.x.com. Assuming '. 86 + 'Phabricator instances are running on both domains, this will '. 87 + 'create a collision preventing you from logging in.')) 88 88 ->addExample('dev', pht('Prefix cookie with "dev"')), 89 89 $this->newOption('phabricator.show-beta-applications', 'bool', false) 90 90 ->setBoolOptions( ··· 112 112 pht('Shenanigans'), // That should be interesting to translate. :P 113 113 )) 114 114 ->setSummary( 115 - pht("Allows you to remove levity and jokes from the UI.")) 115 + pht('Allows you to remove levity and jokes from the UI.')) 116 116 ->setDescription( 117 117 pht( 118 118 'By default, Phabricator includes some flavor text in the UI, '. ··· 122 122 'extra flavor.')), 123 123 $this->newOption('environment.append-paths', 'list<string>', $paths) 124 124 ->setSummary( 125 - pht("These paths get appended to your \$PATH envrionment variable.")) 125 + pht('These paths get appended to your \$PATH envrionment variable.')) 126 126 ->setDescription( 127 127 pht( 128 128 "Phabricator occasionally shells out to other binaries on the ".
+33 -33
src/applications/config/option/PhabricatorDeveloperConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Developer / Debugging"); 7 + return pht('Developer / Debugging'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options for Phabricator developers, including debugging."); 11 + return pht('Options for Phabricator developers, including debugging.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 16 16 $this->newOption('darkconsole.enabled', 'bool', false) 17 17 ->setBoolOptions( 18 18 array( 19 - pht("Enable DarkConsole"), 20 - pht("Disable DarkConsole"), 19 + pht('Enable DarkConsole'), 20 + pht('Disable DarkConsole'), 21 21 )) 22 22 ->setSummary(pht("Enable Phabricator's debugging console.")) 23 23 ->setDescription( ··· 34 34 $this->newOption('darkconsole.always-on', 'bool', false) 35 35 ->setBoolOptions( 36 36 array( 37 - pht("Always Activate DarkConsole"), 38 - pht("Require DarkConsole Activation"), 37 + pht('Always Activate DarkConsole'), 38 + pht('Require DarkConsole Activation'), 39 39 )) 40 - ->setSummary(pht("Activate DarkConsole on every page.")) 40 + ->setSummary(pht('Activate DarkConsole on every page.')) 41 41 ->setDescription( 42 42 pht( 43 43 "This option allows you to enable DarkConsole on every page, ". ··· 49 49 $this->newOption('debug.stop-on-redirect', 'bool', false) 50 50 ->setBoolOptions( 51 51 array( 52 - pht("Stop Before HTTP Redirect"), 53 - pht("Use Normal HTTP Redirects"), 52 + pht('Stop Before HTTP Redirect'), 53 + pht('Use Normal HTTP Redirects'), 54 54 )) 55 55 ->setSummary( 56 56 pht( 57 - "Confirm before redirecting so DarkConsole can be examined.")) 57 + 'Confirm before redirecting so DarkConsole can be examined.')) 58 58 ->setDescription( 59 59 pht( 60 - "Normally, Phabricator issues HTTP redirects after a successful ". 61 - "POST. This can make it difficult to debug things which happen ". 62 - "while processing the POST, because service and profiling ". 63 - "information are lost. By setting this configuration option, ". 64 - "Phabricator will show a page instead of automatically ". 65 - "redirecting, allowing you to examine service and profiling ". 66 - "information. It also makes the UX awful, so you should only ". 67 - "enable it when debugging.")), 60 + 'Normally, Phabricator issues HTTP redirects after a successful '. 61 + 'POST. This can make it difficult to debug things which happen '. 62 + 'while processing the POST, because service and profiling '. 63 + 'information are lost. By setting this configuration option, '. 64 + 'Phabricator will show a page instead of automatically '. 65 + 'redirecting, allowing you to examine service and profiling '. 66 + 'information. It also makes the UX awful, so you should only '. 67 + 'enable it when debugging.')), 68 68 $this->newOption('debug.profile-rate', 'int', 0) 69 69 ->addExample(0, pht('No profiling')) 70 70 ->addExample(1, pht('Profile every request (slow)')) 71 71 ->addExample(1000, pht('Profile 0.1%% of all requests')) 72 - ->setSummary(pht("Automatically profile some percentage of pages.")) 72 + ->setSummary(pht('Automatically profile some percentage of pages.')) 73 73 ->setDescription( 74 74 pht( 75 75 "Normally, Phabricator profiles pages only when explicitly ". ··· 91 91 pht('Enable developer mode'), 92 92 pht('Disable developer mode'), 93 93 )) 94 - ->setSummary(pht("Enable verbose error reporting and disk reads.")) 94 + ->setSummary(pht('Enable verbose error reporting and disk reads.')) 95 95 ->setDescription( 96 96 pht( 97 - "This option enables verbose error reporting (stack traces, ". 98 - "error callouts) and forces disk reads of static assets on ". 99 - "every reload.")), 97 + 'This option enables verbose error reporting (stack traces, '. 98 + 'error callouts) and forces disk reads of static assets on '. 99 + 'every reload.')), 100 100 $this->newOption('celerity.minify', 'bool', true) 101 101 ->setBoolOptions( 102 102 array( 103 103 pht('Minify static resources.'), 104 104 pht("Don't minify static resources."), 105 105 )) 106 - ->setSummary(pht("Minify static Celerity resources.")) 106 + ->setSummary(pht('Minify static Celerity resources.')) 107 107 ->setDescription( 108 108 pht( 109 - "Minify static resources by removing whitespace and comments. You ". 110 - "should enable this in production, but disable it in ". 111 - "development.")), 109 + 'Minify static resources by removing whitespace and comments. You '. 110 + 'should enable this in production, but disable it in '. 111 + 'development.')), 112 112 $this->newOption('cache.enable-deflate', 'bool', true) 113 113 ->setBoolOptions( 114 114 array( 115 - pht("Enable deflate compression"), 116 - pht("Disable deflate compression"), 115 + pht('Enable deflate compression'), 116 + pht('Disable deflate compression'), 117 117 )) 118 118 ->setSummary( 119 - pht("Toggle gzdeflate()-based compression for some caches.")) 119 + pht('Toggle gzdeflate()-based compression for some caches.')) 120 120 ->setDescription( 121 121 pht( 122 - "Set this to false to disable the use of gzdeflate()-based ". 123 - "compression in some caches. This may give you less performant ". 124 - "(but more debuggable) caching.")), 122 + 'Set this to false to disable the use of gzdeflate()-based '. 123 + 'compression in some caches. This may give you less performant '. 124 + '(but more debuggable) caching.')), 125 125 ); 126 126 } 127 127 }
+3 -3
src/applications/config/option/PhabricatorDisqusConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Integration with Disqus"); 7 + return pht('Integration with Disqus'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Disqus authentication and integration options."); 11 + return pht('Disqus authentication and integration options.'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 return array( 16 16 $this->newOption('disqus.shortname', 'string', null) 17 - ->setSummary(pht("Shortname for Disqus comment widget.")) 17 + ->setSummary(pht('Shortname for Disqus comment widget.')) 18 18 ->setDescription( 19 19 pht( 20 20 "Website shortname to use for Disqus comment widget in Phame. ".
+9 -9
src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Extending Phabricator"); 7 + return pht('Extending Phabricator'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Make Phabricator even cooler!"); 11 + return pht('Make Phabricator even cooler!'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 return array( 16 16 $this->newOption('load-libraries', 'list<string>', array()) 17 17 ->setLocked(true) 18 - ->setSummary(pht("Paths to additional phutil libraries to load.")) 18 + ->setSummary(pht('Paths to additional phutil libraries to load.')) 19 19 ->addExample('/srv/our-libs/sekrit-phutil', pht('Valid Setting')), 20 20 $this->newOption('events.listeners', 'list<string>', array()) 21 21 ->setLocked(true) 22 22 ->setSummary( 23 - pht("Listeners receive callbacks when interesting things occur.")) 23 + pht('Listeners receive callbacks when interesting things occur.')) 24 24 ->setDescription( 25 25 pht( 26 - "You can respond to various application events by installing ". 27 - "listeners, which will receive callbacks when interesting things ". 28 - "occur. Specify a list of classes which extend ". 29 - "PhabricatorEventListener here.")) 26 + 'You can respond to various application events by installing '. 27 + 'listeners, which will receive callbacks when interesting things '. 28 + 'occur. Specify a list of classes which extend '. 29 + 'PhabricatorEventListener here.')) 30 30 ->addExample('MyEventListener', pht('Valid Setting')), 31 31 $this->newOption( 32 32 'aphront.default-application-configuration-class', ··· 35 35 ->setLocked(true) 36 36 ->setBaseClass('AphrontApplicationConfiguration') 37 37 // TODO: This could probably use some better documentation. 38 - ->setDescription(pht("Application configuration class.")), 38 + ->setDescription(pht('Application configuration class.')), 39 39 ); 40 40 } 41 41
+2 -2
src/applications/config/option/PhabricatorGarbageCollectorConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Garbage Collector"); 7 + return pht('Garbage Collector'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure the GC for old logs, caches, etc."); 11 + return pht('Configure the GC for old logs, caches, etc.'); 12 12 } 13 13 14 14 public function getOptions() {
+2 -2
src/applications/config/option/PhabricatorMailgunConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Integration with Mailgun"); 7 + return pht('Integration with Mailgun'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Mailgun integration."); 11 + return pht('Configure Mailgun integration.'); 12 12 } 13 13 14 14 public function getOptions() {
+12 -12
src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Mail"); 7 + return pht('Mail'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Mail."); 11 + return pht('Configure Mail.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 207 207 true) 208 208 ->setBoolOptions( 209 209 array( 210 - pht("Send Mail To Each Recipient"), 211 - pht("Send Mail To All Recipients"), 210 + pht('Send Mail To Each Recipient'), 211 + pht('Send Mail To All Recipients'), 212 212 )) 213 213 ->setSummary( 214 214 pht( ··· 219 219 $this->newOption('metamta.can-send-as-user', 'bool', false) 220 220 ->setBoolOptions( 221 221 array( 222 - pht("Send as User Taking Action"), 223 - pht("Send as Phabricator"), 222 + pht('Send as User Taking Action'), 223 + pht('Send as Phabricator'), 224 224 )) 225 225 ->setSummary( 226 226 pht( ··· 236 236 $this->newOption('metamta.reply.show-hints', 'bool', true) 237 237 ->setBoolOptions( 238 238 array( 239 - pht("Show Reply Handler Hints"), 240 - pht("No Reply Handler Hints"), 239 + pht('Show Reply Handler Hints'), 240 + pht('No Reply Handler Hints'), 241 241 )) 242 242 ->setSummary(pht('Show hints about reply handler actions in email.')) 243 243 ->setDescription($reply_hints_description), 244 244 $this->newOption('metamta.herald.show-hints', 'bool', true) 245 245 ->setBoolOptions( 246 246 array( 247 - pht("Show Herald Hints"), 248 - pht("No Herald Hints"), 247 + pht('Show Herald Hints'), 248 + pht('No Herald Hints'), 249 249 )) 250 250 ->setSummary(pht('Show hints about Herald rules in email.')) 251 251 ->setDescription($herald_hints_description), 252 252 $this->newOption('metamta.recipients.show-hints', 'bool', true) 253 253 ->setBoolOptions( 254 254 array( 255 - pht("Show Recipient Hints"), 256 - pht("No Recipient Hints"), 255 + pht('Show Recipient Hints'), 256 + pht('No Recipient Hints'), 257 257 )) 258 258 ->setSummary(pht('Show "To:" and "Cc:" footer hints in email.')) 259 259 ->setDescription($recipient_hints_description),
+15 -15
src/applications/config/option/PhabricatorMySQLConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("MySQL"); 7 + return pht('MySQL'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Database configuration."); 11 + return pht('Database configuration.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 16 16 $this->newOption('mysql.host', 'string', 'localhost') 17 17 ->setLocked(true) 18 18 ->setDescription( 19 - pht("MySQL database hostname.")) 19 + pht('MySQL database hostname.')) 20 20 ->addExample('localhost', pht('MySQL on this machine')) 21 21 ->addExample('db.example.com:3300', pht('Nonstandard port')), 22 22 $this->newOption('mysql.user', 'string', 'root') 23 23 ->setLocked(true) 24 24 ->setDescription( 25 - pht("MySQL username to use when connecting to the database.")), 25 + pht('MySQL username to use when connecting to the database.')), 26 26 $this->newOption('mysql.pass', 'string', null) 27 27 ->setHidden(true) 28 28 ->setDescription( 29 - pht("MySQL password to use when connecting to the database.")), 29 + pht('MySQL password to use when connecting to the database.')), 30 30 $this->newOption( 31 31 'mysql.configuration-provider', 32 32 'class', ··· 37 37 pht('Configure database configuration class.')) 38 38 ->setDescription( 39 39 pht( 40 - "Phabricator chooses which database to connect to through a ". 41 - "swappable configuration provider. You almost certainly do not ". 42 - "need to change this.")), 40 + 'Phabricator chooses which database to connect to through a '. 41 + 'swappable configuration provider. You almost certainly do not '. 42 + 'need to change this.')), 43 43 $this->newOption( 44 44 'mysql.implementation', 45 45 'class', ··· 52 52 pht('Configure database connection class.')) 53 53 ->setDescription( 54 54 pht( 55 - "Phabricator connects to MySQL through a swappable abstraction ". 56 - "layer. You can choose an alternate implementation by setting ". 57 - "this option. To provide your own implementation, extend ". 58 - "`AphrontMySQLDatabaseConnectionBase`. It is very unlikely that ". 59 - "you need to change this.")), 55 + 'Phabricator connects to MySQL through a swappable abstraction '. 56 + 'layer. You can choose an alternate implementation by setting '. 57 + 'this option. To provide your own implementation, extend '. 58 + '`AphrontMySQLDatabaseConnectionBase`. It is very unlikely that '. 59 + 'you need to change this.')), 60 60 $this->newOption('storage.default-namespace', 'string', 'phabricator') 61 61 ->setLocked(true) 62 62 ->setSummary( 63 - pht("The namespace that Phabricator databases should use.")) 63 + pht('The namespace that Phabricator databases should use.')) 64 64 ->setDescription( 65 65 pht( 66 66 "Phabricator puts databases in a namespace, which defaults to ". ··· 72 72 $this->newOption('mysql.port', 'string', null) 73 73 ->setLocked(true) 74 74 ->setDescription( 75 - pht("MySQL port to use when connecting to the database.")), 75 + pht('MySQL port to use when connecting to the database.')), 76 76 ); 77 77 } 78 78
+8 -8
src/applications/config/option/PhabricatorNotificationConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Notifications"); 7 + return pht('Notifications'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure real-time notifications."); 11 + return pht('Configure real-time notifications.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 16 16 $this->newOption('notification.enabled', 'bool', false) 17 17 ->setBoolOptions( 18 18 array( 19 - pht("Enable Real-Time Notifications"), 20 - pht("Disable Real-Time Notifications"), 19 + pht('Enable Real-Time Notifications'), 20 + pht('Disable Real-Time Notifications'), 21 21 )) 22 22 ->setSummary(pht('Enable real-time notifications.')) 23 23 ->setDescription( ··· 40 40 ->setSummary(pht('Drop permissions to a less-privileged user.')) 41 41 ->setDescription( 42 42 pht( 43 - "The notifcation server must be started as root so it can bind ". 44 - "to privileged ports, but if you specify a system user here it ". 45 - "will drop permissions to that user after binding to the ports ". 46 - "it needs.")), 43 + 'The notifcation server must be started as root so it can bind '. 44 + 'to privileged ports, but if you specify a system user here it '. 45 + 'will drop permissions to that user after binding to the ports '. 46 + 'it needs.')), 47 47 $this->newOption('notification.log', 'string', '/var/log/aphlict.log') 48 48 ->setDescription(pht('Location of the server log file.')), 49 49 $this->newOption(
+14 -14
src/applications/config/option/PhabricatorPHDConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Daemons"); 7 + return pht('Daemons'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options relating to PHD (daemons)."); 11 + return pht('Options relating to PHD (daemons).'); 12 12 } 13 13 14 14 public function getOptions() { ··· 16 16 $this->newOption('phd.pid-directory', 'string', '/var/tmp/phd/pid') 17 17 ->setDescription( 18 18 pht( 19 - "Directory that phd should use to track running daemons.")), 19 + 'Directory that phd should use to track running daemons.')), 20 20 $this->newOption('phd.log-directory', 'string', '/var/tmp/phd/log') 21 21 ->setDescription( 22 22 pht( 23 - "Directory that the daemons should use to store log files.")), 23 + 'Directory that the daemons should use to store log files.')), 24 24 $this->newOption('phd.start-taskmasters', 'int', 4) 25 - ->setSummary(pht("Number of TaskMaster daemons to start by default.")) 25 + ->setSummary(pht('Number of TaskMaster daemons to start by default.')) 26 26 ->setDescription( 27 27 pht( 28 28 "Number of 'TaskMaster' daemons that 'phd start' should start. ". ··· 31 31 $this->newOption('phd.verbose', 'bool', false) 32 32 ->setBoolOptions( 33 33 array( 34 - pht("Verbose mode"), 35 - pht("Normal mode"), 34 + pht('Verbose mode'), 35 + pht('Normal mode'), 36 36 )) 37 37 ->setSummary(pht("Launch daemons in 'verbose' mode by default.")) 38 38 ->setDescription( ··· 43 43 "also 'phd.trace'.")), 44 44 $this->newOption('phd.user', 'string', null) 45 45 ->setLocked(true) 46 - ->setSummary(pht("System user to run daemons as.")) 46 + ->setSummary(pht('System user to run daemons as.')) 47 47 ->setDescription( 48 48 pht( 49 - "Specify a system user to run the daemons as. Primarily, this ". 50 - "user will own the working copies of any repositories that ". 51 - "Phabricator imports or manages. This option is new and ". 52 - "experimental.")), 49 + 'Specify a system user to run the daemons as. Primarily, this '. 50 + 'user will own the working copies of any repositories that '. 51 + 'Phabricator imports or manages. This option is new and '. 52 + 'experimental.')), 53 53 $this->newOption('phd.trace', 'bool', false) 54 54 ->setBoolOptions( 55 55 array( 56 - pht("Trace mode"), 57 - pht("Normal mode"), 56 + pht('Trace mode'), 57 + pht('Normal mode'), 58 58 )) 59 59 ->setSummary(pht("Launch daemons in 'trace' mode by default.")) 60 60 ->setDescription(
+3 -3
src/applications/config/option/PhabricatorPHPMailerConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("PHPMailer"); 7 + return pht('PHPMailer'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure PHPMailer."); 11 + return pht('Configure PHPMailer.'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 return array( 16 16 $this->newOption('phpmailer.mailer', 'string', 'smtp') 17 17 ->setLocked(true) 18 - ->setSummary(pht("Configure mailer used by PHPMailer.")) 18 + ->setSummary(pht('Configure mailer used by PHPMailer.')) 19 19 ->setDescription( 20 20 pht( 21 21 "If you're using PHPMailer to send email, provide the mailer and ".
+7 -7
src/applications/config/option/PhabricatorRecaptchaConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Integration with Recaptcha"); 7 + return pht('Integration with Recaptcha'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Recaptcha captchas."); 11 + return pht('Configure Recaptcha captchas.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 17 17 $this->newOption('recaptcha.enabled', 'bool', false) 18 18 ->setBoolOptions( 19 19 array( 20 - pht("Enable Recaptcha"), 21 - pht("Disable Recaptcha"), 20 + pht('Enable Recaptcha'), 21 + pht('Disable Recaptcha'), 22 22 )) 23 23 ->setSummary(pht('Enable captchas with Recaptcha.')) 24 24 ->setDescription( 25 25 pht( 26 - "Enable recaptcha to require users solve captchas after a few ". 27 - "failed login attempts. This hinders brute-force attacks against ". 28 - "user passwords. For more information, see http://recaptcha.net/")), 26 + 'Enable recaptcha to require users solve captchas after a few '. 27 + 'failed login attempts. This hinders brute-force attacks against '. 28 + 'user passwords. For more information, see http://recaptcha.net/')), 29 29 $this->newOption('recaptcha.public-key', 'string', null) 30 30 ->setDescription( 31 31 pht('Recaptcha public key, obtained by signing up for Recaptcha.')),
+33 -33
src/applications/config/option/PhabricatorSecurityConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Security"); 7 + return pht('Security'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Security options."); 11 + return pht('Security options.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 17 17 return array( 18 18 $this->newOption('security.alternate-file-domain', 'string', null) 19 19 ->setLocked(true) 20 - ->setSummary(pht("Alternate domain to serve files from.")) 20 + ->setSummary(pht('Alternate domain to serve files from.')) 21 21 ->setDescription( 22 22 pht( 23 23 "IMPORTANT: By default, Phabricator serves files from the same ". ··· 46 46 ->setMasked(true) 47 47 ->setLocked(true) 48 48 ->setSummary( 49 - pht("Key for HMAC digests.")) 49 + pht('Key for HMAC digests.')) 50 50 ->setDescription( 51 51 pht( 52 - "Default key for HMAC digests where the key is not important ". 53 - "(i.e., the hash itself is secret). You can change this if you ". 54 - "want (to any other string), but doing so will break existing ". 55 - "sessions and CSRF tokens.")), 52 + 'Default key for HMAC digests where the key is not important '. 53 + '(i.e., the hash itself is secret). You can change this if you '. 54 + 'want (to any other string), but doing so will break existing '. 55 + 'sessions and CSRF tokens.')), 56 56 $this->newOption('security.require-https', 'bool', false) 57 57 ->setLocked(true) 58 58 ->setSummary( 59 - pht("Force users to connect via HTTPS instead of HTTP.")) 59 + pht('Force users to connect via HTTPS instead of HTTP.')) 60 60 ->setDescription( 61 61 pht( 62 62 "If the web server responds to both HTTP and HTTPS requests but ". ··· 105 105 ->setMasked(true) 106 106 ->setLocked(true) 107 107 ->setSummary( 108 - pht("Hashed with other inputs to generate CSRF tokens.")) 108 + pht('Hashed with other inputs to generate CSRF tokens.')) 109 109 ->setDescription( 110 110 pht( 111 - "This is hashed with other inputs to generate CSRF tokens. If ". 112 - "you want, you can change it to some other string which is ". 113 - "unique to your install. This will make your install more secure ". 114 - "in a vague, mostly theoretical way. But it will take you like 3 ". 115 - "seconds of mashing on your keyboard to set it up so you might ". 116 - "as well.")), 111 + 'This is hashed with other inputs to generate CSRF tokens. If '. 112 + 'you want, you can change it to some other string which is '. 113 + 'unique to your install. This will make your install more secure '. 114 + 'in a vague, mostly theoretical way. But it will take you like 3 '. 115 + 'seconds of mashing on your keyboard to set it up so you might '. 116 + 'as well.')), 117 117 $this->newOption( 118 118 'phabricator.mail-key', 119 119 'string', ··· 121 121 ->setMasked(true) 122 122 ->setLocked(true) 123 123 ->setSummary( 124 - pht("Hashed with other inputs to generate mail tokens.")) 124 + pht('Hashed with other inputs to generate mail tokens.')) 125 125 ->setDescription( 126 126 pht( 127 127 "This is hashed with other inputs to generate mail tokens. If ". ··· 138 138 'mailto' => true, 139 139 )) 140 140 ->setSummary( 141 - pht("Determines which URI protocols are auto-linked.")) 141 + pht('Determines which URI protocols are auto-linked.')) 142 142 ->setDescription( 143 143 pht( 144 144 "When users write comments which have URIs, they'll be ". ··· 187 187 'string', 188 188 'd9455ea150622ee044f7931dabfa52aa') 189 189 ->setSummary( 190 - pht("An input to the hash function when building resource hashes.")) 190 + pht('An input to the hash function when building resource hashes.')) 191 191 ->setDescription( 192 192 pht( 193 - "This value is an input to the hash function when building ". 194 - "resource hashes. It has no security value, but if you ". 195 - "accidentally poison user caches (by pushing a bad patch or ". 196 - "having something go wrong with a CDN, e.g.) you can change this ". 197 - "to something else and rebuild the Celerity map to break user ". 198 - "caches. Unless you are doing Celerity development, it is ". 199 - "exceptionally unlikely that you need to modify this.")), 193 + 'This value is an input to the hash function when building '. 194 + 'resource hashes. It has no security value, but if you '. 195 + 'accidentally poison user caches (by pushing a bad patch or '. 196 + 'having something go wrong with a CDN, e.g.) you can change this '. 197 + 'to something else and rebuild the Celerity map to break user '. 198 + 'caches. Unless you are doing Celerity development, it is '. 199 + 'exceptionally unlikely that you need to modify this.')), 200 200 $this->newOption('remarkup.enable-embedded-youtube', 'bool', false) 201 201 ->setBoolOptions( 202 202 array( 203 - pht("Embed YouTube videos"), 203 + pht('Embed YouTube videos'), 204 204 pht("Don't embed YouTube videos"), 205 205 )) 206 206 ->setSummary( 207 - pht("Determines whether or not YouTube videos get embedded.")) 207 + pht('Determines whether or not YouTube videos get embedded.')) 208 208 ->setDescription( 209 209 pht( 210 210 "If you enable this, linked YouTube videos will be embeded ". ··· 214 214 $this->newOption('security.allow-outbound-http', 'bool', true) 215 215 ->setBoolOptions( 216 216 array( 217 - pht("Allow"), 218 - pht("Disallow"), 217 + pht('Allow'), 218 + pht('Disallow'), 219 219 )) 220 220 ->setLocked(true) 221 221 ->setSummary( 222 - pht("Allow outbound HTTP requests")) 222 + pht('Allow outbound HTTP requests')) 223 223 ->setDescription( 224 224 pht( 225 - "If you enable this, you are allowing Phabricator to ". 226 - "potentially make requests to external servers.")), 225 + 'If you enable this, you are allowing Phabricator to '. 226 + 'potentially make requests to external servers.')), 227 227 ); 228 228 } 229 229
+2 -2
src/applications/config/option/PhabricatorSendGridConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Integration with SendGrid"); 7 + return pht('Integration with SendGrid'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure SendGrid integration."); 11 + return pht('Configure SendGrid integration.'); 12 12 } 13 13 14 14 public function getOptions() {
+22 -22
src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Syntax Highlighting"); 7 + return pht('Syntax Highlighting'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options relating to syntax highlighting source code."); 11 + return pht('Options relating to syntax highlighting source code.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 18 18 'class', 19 19 'PhutilDefaultSyntaxHighlighterEngine') 20 20 ->setBaseClass('PhutilSyntaxHighlighterEngine') 21 - ->setSummary(pht("Default non-pygments syntax highlighter engine.")) 21 + ->setSummary(pht('Default non-pygments syntax highlighter engine.')) 22 22 ->setDescription( 23 23 pht( 24 - "Phabricator can highlight PHP by default and use Pygments for ". 25 - "other languages if enabled. You can provide a custom ". 26 - "highlighter engine by extending class ". 27 - "PhutilSyntaxHighlighterEngine.")), 24 + 'Phabricator can highlight PHP by default and use Pygments for '. 25 + 'other languages if enabled. You can provide a custom '. 26 + 'highlighter engine by extending class '. 27 + 'PhutilSyntaxHighlighterEngine.')), 28 28 $this->newOption('pygments.enabled', 'bool', false) 29 29 ->setSummary( 30 - pht("Should Phabricator shell out to Pygments to highlight code?")) 30 + pht('Should Phabricator shell out to Pygments to highlight code?')) 31 31 ->setDescription( 32 32 pht( 33 33 "If you want syntax highlighting for other languages than PHP ". ··· 73 73 'yaml' => 'YAML', 74 74 )) 75 75 ->setSummary( 76 - pht("Set the language list which appears in dropdowns.")) 76 + pht('Set the language list which appears in dropdowns.')) 77 77 ->setDescription( 78 78 pht( 79 - "In places that we display a dropdown to syntax-highlight code, ". 80 - "this is where that list is defined.")), 79 + 'In places that we display a dropdown to syntax-highlight code, '. 80 + 'this is where that list is defined.')), 81 81 $this->newOption( 82 82 'syntax.filemap', 83 83 'wild', ··· 87 87 '@\.divinerconfig$@' => 'js', 88 88 )) 89 89 ->setSummary( 90 - pht("Override what language files (based on filename) highlight as.")) 90 + pht('Override what language files (based on filename) highlight as.')) 91 91 ->setDescription( 92 92 pht( 93 - "This is an override list of regular expressions which allows ". 94 - "you to choose what language files are highlighted as. If your ". 95 - "projects have certain rules about filenames or use unusual or ". 96 - "ambiguous language extensions, you can create a mapping here. ". 97 - "This is an ordered dictionary of regular expressions which will ". 98 - "be tested against the filename. They should map to either an ". 99 - "explicit language as a string value, or a numeric index into ". 100 - "the captured groups as an integer.")) 93 + 'This is an override list of regular expressions which allows '. 94 + 'you to choose what language files are highlighted as. If your '. 95 + 'projects have certain rules about filenames or use unusual or '. 96 + 'ambiguous language extensions, you can create a mapping here. '. 97 + 'This is an ordered dictionary of regular expressions which will '. 98 + 'be tested against the filename. They should map to either an '. 99 + 'explicit language as a string value, or a numeric index into '. 100 + 'the captured groups as an integer.')) 101 101 ->addExample('{"@\\.xyz$@": "php"}', pht('Highlight *.xyz as PHP.')) 102 102 ->addExample( 103 103 '{"@/httpd\\.conf@": "apacheconf"}', ··· 113 113 '10px "Menlo", "Consolas", "Monaco", monospace') 114 114 ->setLocked(true) 115 115 ->setSummary( 116 - pht("Default monospace font.")) 116 + pht('Default monospace font.')) 117 117 ->setDescription( 118 118 pht( 119 119 "Set the default monospaced font style for users who haven't set ". ··· 124 124 '11px "Menlo", "Consolas", "Monaco", monospace') 125 125 ->setLocked(true) 126 126 ->setSummary( 127 - pht("Default monospace font for clients on Windows.")) 127 + pht('Default monospace font for clients on Windows.')) 128 128 ->setDescription( 129 129 pht( 130 130 "Set the default monospaced font style for users who haven't set ".
+6 -6
src/applications/config/option/PhabricatorTranslationsConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Translations"); 7 + return pht('Translations'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options relating to translations."); 11 + return pht('Options relating to translations.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 18 18 'class', 19 19 'PhabricatorEnglishTranslation') 20 20 ->setBaseClass('PhabricatorTranslation') 21 - ->setSummary(pht("Translation class that should be used for strings.")) 21 + ->setSummary(pht('Translation class that should be used for strings.')) 22 22 ->setDescription( 23 23 pht( 24 - "This allows customizing texts used in Phabricator. The class ". 25 - "must extend PhabricatorTranslation.")) 24 + 'This allows customizing texts used in Phabricator. The class '. 25 + 'must extend PhabricatorTranslation.')) 26 26 ->addExample('PhabricatorEnglishTranslation', pht('Valid Setting')), 27 27 // TODO: This should be dict<string,string> I think, but that doesn't 28 28 // exist yet. 29 29 $this->newOption('translation.override', 'wild', array()) 30 - ->setSummary(pht("Override translations.")) 30 + ->setSummary(pht('Override translations.')) 31 31 ->setDescription( 32 32 pht( 33 33 "You can use 'translation.override' if you don't want to create ".
+2 -2
src/applications/config/option/PhabricatorUIConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("User Interface"); 7 + return pht('User Interface'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure the Phabricator UI, including colors."); 11 + return pht('Configure the Phabricator UI, including colors.'); 12 12 } 13 13 14 14 public function getOptions() {
+2 -2
src/applications/config/response/PhabricatorConfigResponse.php
··· 15 15 // We don't want to flood the console with html, just return a simple 16 16 // message for now. 17 17 return pht( 18 - "This install has a fatal setup error, access the internet web ". 19 - "version to view details and resolve it."); 18 + 'This install has a fatal setup error, access the internet web '. 19 + 'version to view details and resolve it.'); 20 20 } 21 21 22 22 $resources = $this->buildResources();
+18 -18
src/applications/config/view/PhabricatorSetupIssueView.php
··· 42 42 43 43 $commands = $issue->getCommands(); 44 44 if ($commands) { 45 - $run_these = pht("Run these %d command(s):", count($commands)); 45 + $run_these = pht('Run these %d command(s):', count($commands)); 46 46 $description[] = phutil_tag( 47 47 'div', 48 48 array( ··· 57 57 $extensions = $issue->getPHPExtensions(); 58 58 if ($extensions) { 59 59 $install_these = pht( 60 - "Install these %d PHP extension(s):", count($extensions)); 60 + 'Install these %d PHP extension(s):', count($extensions)); 61 61 62 62 $install_info = pht( 63 - "You can usually install a PHP extension using %s or %s. Common ". 64 - "package names are %s or %s. Try commands like these:", 63 + 'You can usually install a PHP extension using %s or %s. Common '. 64 + 'package names are %s or %s. Try commands like these:', 65 65 phutil_tag('tt', array(), 'apt-get'), 66 66 phutil_tag('tt', array(), 'yum'), 67 67 hsprintf('<tt>php-<em>%s</em></tt>', pht('extname')), ··· 82 82 "OS X, you might want to try Homebrew."); 83 83 84 84 $restart_info = pht( 85 - "After installing new PHP extensions, <strong>restart your webserver ". 86 - "for the changes to take effect</strong>.", 85 + 'After installing new PHP extensions, <strong>restart your webserver '. 86 + 'for the changes to take effect</strong>.', 87 87 hsprintf('')); 88 88 89 89 $description[] = phutil_tag( ··· 152 152 'p', 153 153 array(), 154 154 pht( 155 - "The current Phabricator configuration has these %d value(s):", 155 + 'The current Phabricator configuration has these %d value(s):', 156 156 count($configs))); 157 157 158 158 $options = PhabricatorApplicationConfigOptions::loadAllOptions(); ··· 180 180 'p', 181 181 array(), 182 182 pht( 183 - "To update these %d value(s), run these command(s) from the command ". 184 - "line:", 183 + 'To update these %d value(s), run these command(s) from the command '. 184 + 'line:', 185 185 count($configs))); 186 186 187 187 $update = array(); ··· 212 212 $update_info = phutil_tag( 213 213 'p', 214 214 array(), 215 - pht("You can update these %d value(s) here:", count($configs))); 215 + pht('You can update these %d value(s) here:', count($configs))); 216 216 } else { 217 217 $update_info = phutil_tag( 218 218 'p', 219 219 array(), 220 - pht("These %d configuration value(s) are related:", count($configs))); 220 + pht('These %d configuration value(s) are related:', count($configs))); 221 221 } 222 222 } else { 223 223 $update = null; ··· 243 243 'p', 244 244 array(), 245 245 pht( 246 - "The current PHP configuration has these %d value(s):", 246 + 'The current PHP configuration has these %d value(s):', 247 247 count($configs))); 248 248 249 249 $dict = array(); ··· 284 284 'p', 285 285 array(), 286 286 pht( 287 - "To update these %d value(s), edit your PHP configuration file.", 287 + 'To update these %d value(s), edit your PHP configuration file.', 288 288 count($configs))); 289 289 } else { 290 290 $info[] = phutil_tag( 291 291 'p', 292 292 array(), 293 293 pht( 294 - "To update these %d value(s), edit your PHP configuration file, ". 295 - "located here:", 294 + 'To update these %d value(s), edit your PHP configuration file, '. 295 + 'located here:', 296 296 count($configs))); 297 297 $info[] = phutil_tag( 298 298 'pre', ··· 305 305 'p', 306 306 array(), 307 307 pht( 308 - "PHP also loaded these configuration file(s):", 308 + 'PHP also loaded these configuration file(s):', 309 309 count($more_loc))); 310 310 $info[] = phutil_tag( 311 311 'pre', ··· 331 331 'p', 332 332 array(), 333 333 pht( 334 - "After editing the PHP configuration, <strong>restart your ". 335 - "webserver for the changes to take effect</strong>.", 334 + 'After editing the PHP configuration, <strong>restart your '. 335 + 'webserver for the changes to take effect</strong>.', 336 336 hsprintf(''))); 337 337 338 338 return phutil_tag(
+1 -1
src/applications/conpherence/mail/ConpherenceReplyHandler.php
··· 14 14 15 15 public function validateMailReceiver($mail_receiver) { 16 16 if (!($mail_receiver instanceof ConpherenceThread)) { 17 - throw new Exception("Mail receiver is not a ConpherenceThread!"); 17 + throw new Exception('Mail receiver is not a ConpherenceThread!'); 18 18 } 19 19 } 20 20
+1 -1
src/applications/conpherence/storage/ConpherenceThread.php
··· 194 194 } 195 195 196 196 public function describeAutomaticCapability($capability) { 197 - return pht("Participants in a thread can always view and edit it."); 197 + return pht('Participants in a thread can always view and edit it.'); 198 198 } 199 199 200 200 }
+1 -1
src/applications/countdown/view/PhabricatorCountdownView.php
··· 30 30 'class' => 'phabricator-timer-header', 31 31 ), 32 32 array( 33 - "C".$countdown->getID(), 33 + 'C'.$countdown->getID(), 34 34 ' ', 35 35 phutil_tag( 36 36 'a',
+1 -1
src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
··· 139 139 $status = pht('Cancelled'); 140 140 break; 141 141 default: 142 - throw new Exception("Unknown task status!"); 142 + throw new Exception('Unknown task status!'); 143 143 } 144 144 } else { 145 145 $status = pht('Queued');
+1 -1
src/applications/daemon/management/PhabricatorDaemonManagementListWorkflow.php
··· 17 17 $symbols = igroup($symbols, 'library'); 18 18 19 19 foreach ($symbols as $library => $symbol_list) { 20 - $console->writeOut(pht("Daemons in library __%s__:", $library)."\n"); 20 + $console->writeOut(pht('Daemons in library __%s__:', $library)."\n"); 21 21 foreach ($symbol_list as $symbol) { 22 22 $console->writeOut(" %s\n", $symbol['name']); 23 23 }
+1 -1
src/applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php
··· 17 17 if (!$daemons) { 18 18 $console->writeErr( 19 19 "%s\n", 20 - pht("There are no running Phabricator daemons.")); 20 + pht('There are no running Phabricator daemons.')); 21 21 return 1; 22 22 } 23 23
+3 -3
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
··· 273 273 $this->launchDaemon($name, $argv, $is_debug = false); 274 274 } 275 275 276 - $console->writeErr(pht("Done.")."\n"); 276 + $console->writeErr(pht('Done.')."\n"); 277 277 278 278 return 0; 279 279 } ··· 313 313 } 314 314 315 315 if (empty($running)) { 316 - $console->writeErr(pht("No daemons to kill.")."\n"); 316 + $console->writeErr(pht('No daemons to kill.')."\n"); 317 317 return 0; 318 318 } 319 319 ··· 324 324 325 325 $console->writeErr(pht("Stopping daemon '%s' (%s)...", $name, $pid)."\n"); 326 326 if (!$daemon->isRunning()) { 327 - $console->writeErr(pht("Daemon is not running.")."\n"); 327 + $console->writeErr(pht('Daemon is not running.')."\n"); 328 328 unset($running[$key]); 329 329 $daemon->updateStatus(PhabricatorDaemonLog::STATUS_EXITED); 330 330 } else {
+3 -3
src/applications/daemon/view/PhabricatorDaemonLogEventsView.php
··· 27 27 $rows = array(); 28 28 29 29 if (!$this->user) { 30 - throw new Exception("Call setUser() before rendering!"); 30 + throw new Exception('Call setUser() before rendering!'); 31 31 } 32 32 33 33 foreach ($this->events as $event) { ··· 61 61 62 62 if ($more_chars) { 63 63 $more = new PhutilNumber($more_chars); 64 - $more = pht("Show %d more character(s)...", $more); 64 + $more = pht('Show %d more character(s)...', $more); 65 65 } else if ($more_lines) { 66 66 $more = new PhutilNumber($more_lines); 67 - $more = pht("Show %d more line(s)...", $more); 67 + $more = pht('Show %d more line(s)...', $more); 68 68 } 69 69 70 70 if ($more) {
+2 -2
src/applications/daemon/view/PhabricatorDaemonLogListView.php
··· 14 14 $rows = array(); 15 15 16 16 if (!$this->user) { 17 - throw new Exception("Call setUser() before rendering!"); 17 + throw new Exception('Call setUser() before rendering!'); 18 18 } 19 19 20 20 $list = id(new PHUIObjectItemListView()) ··· 24 24 $epoch = $log->getDateCreated(); 25 25 26 26 $item = id(new PHUIObjectItemView()) 27 - ->setObjectName(pht("Daemon %s", $id)) 27 + ->setObjectName(pht('Daemon %s', $id)) 28 28 ->setHeader($log->getDaemon()) 29 29 ->setHref("/daemon/log/{$id}/") 30 30 ->addIcon('none', phabricator_datetime($epoch, $this->user));
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_close_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return pht("Close a Differential revision."); 7 + return pht('Close a Differential revision.'); 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return pht("Add a comment to a Differential revision."); 7 + return pht('Add a comment to a Differential revision.'); 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_creatediff_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Create a new Differential diff."; 7 + return 'Create a new Differential diff.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_createinline_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Add an inline comment to a Differential revision."; 7 + return 'Add an inline comment to a Differential revision.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_createrawdiff_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return pht("Create a new Differential diff from a raw diff source."); 7 + return pht('Create a new Differential diff from a raw diff source.'); 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_createrevision_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return pht("Create a new Differential revision."); 7 + return pht('Create a new Differential revision.'); 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_find_Method.php
··· 12 12 } 13 13 14 14 public function getMethodDescription() { 15 - return "Query Differential revisions which match certain criteria."; 15 + return 'Query Differential revisions which match certain criteria.'; 16 16 } 17 17 18 18 public function defineParamTypes() {
+2 -2
src/applications/differential/conduit/ConduitAPI_differential_finishpostponedlinters_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Update diff with new lint messages and mark postponed ". 8 - "linters as finished."; 7 + return 'Update diff with new lint messages and mark postponed '. 8 + 'linters as finished.'; 9 9 } 10 10 11 11 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_getalldiffs_Method.php
··· 13 13 } 14 14 15 15 public function getMethodDescription() { 16 - return "Load all diffs for given revisions from Differential."; 16 + return 'Load all diffs for given revisions from Differential.'; 17 17 } 18 18 19 19 public function defineParamTypes() {
+2 -2
src/applications/differential/conduit/ConduitAPI_differential_getcommitmessage_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Retrieve Differential commit messages or message templates."; 7 + return 'Retrieve Differential commit messages or message templates.'; 8 8 } 9 9 10 10 public function defineParamTypes() { ··· 185 185 186 186 $lines = explode("\n", $tip); 187 187 foreach ($lines as $key => $line) { 188 - $lines[$key] = "# ".$line; 188 + $lines[$key] = '# '.$line; 189 189 } 190 190 191 191 return implode("\n", $lines);
+2 -2
src/applications/differential/conduit/ConduitAPI_differential_getcommitpaths_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Query which paths should be included when committing a ". 8 - "Differential revision."; 7 + return 'Query which paths should be included when committing a '. 8 + 'Differential revision.'; 9 9 } 10 10 11 11 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_getrawdiff_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return pht("Retrieve a raw diff"); 7 + return pht('Retrieve a raw diff'); 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_getrevision_Method.php
··· 12 12 } 13 13 14 14 public function getMethodDescription() { 15 - return "Load the content of a revision from Differential."; 15 + return 'Load the content of a revision from Differential.'; 16 16 } 17 17 18 18 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_getrevisioncomments_Method.php
··· 12 12 } 13 13 14 14 public function getMethodDescription() { 15 - return "Retrieve Differential Revision Comments."; 15 + return 'Retrieve Differential Revision Comments.'; 16 16 } 17 17 18 18 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_parsecommitmessage_Method.php
··· 6 6 private $errors; 7 7 8 8 public function getMethodDescription() { 9 - return pht("Parse commit messages for Differential fields."); 9 + return pht('Parse commit messages for Differential fields.'); 10 10 } 11 11 12 12 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_query_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Query Differential revisions which match certain criteria."; 7 + return 'Query Differential revisions which match certain criteria.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_setdiffproperty_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Attach properties to Differential diffs."; 7 + return 'Attach properties to Differential diffs.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_updaterevision_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return pht("Update a Differential revision."); 7 + return pht('Update a Differential revision.'); 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/differential/conduit/ConduitAPI_differential_updateunitresults_Method.php
··· 4 4 extends ConduitAPI_differential_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Update arc unit results for a postponed test."; 7 + return 'Update arc unit results for a postponed test.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+44 -44
src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
··· 110 110 'thorough review. You can enable "!accept" by setting this '. 111 111 'option to true.')), 112 112 $this->newOption('differential.generated-paths', 'list<regex>', array()) 113 - ->setSummary(pht("File regexps to treat as automatically generated.")) 113 + ->setSummary(pht('File regexps to treat as automatically generated.')) 114 114 ->setDescription( 115 115 pht( 116 - "List of file regexps that should be treated as if they are ". 117 - "generated by an automatic process, and thus get hidden by ". 118 - "default in differential.")) 119 - ->addExample("/config\.h$/\n#/autobuilt/#", pht("Valid Setting")), 116 + 'List of file regexps that should be treated as if they are '. 117 + 'generated by an automatic process, and thus get hidden by '. 118 + 'default in differential.')) 119 + ->addExample("/config\.h$/\n#/autobuilt/#", pht('Valid Setting')), 120 120 $this->newOption('differential.sticky-accept', 'bool', true) 121 121 ->setBoolOptions( 122 122 array( 123 - pht("Accepts persist across updates"), 124 - pht("Accepts are reset by updates"), 123 + pht('Accepts persist across updates'), 124 + pht('Accepts are reset by updates'), 125 125 )) 126 126 ->setSummary( 127 127 pht('Should "Accepted" revisions remain "Accepted" after updates?')) ··· 139 139 $this->newOption('differential.allow-self-accept', 'bool', false) 140 140 ->setBoolOptions( 141 141 array( 142 - pht("Allow self-accept"), 143 - pht("Disallow self-accept"), 142 + pht('Allow self-accept'), 143 + pht('Disallow self-accept'), 144 144 )) 145 - ->setSummary(pht("Allows users to accept their own revisions.")) 145 + ->setSummary(pht('Allows users to accept their own revisions.')) 146 146 ->setDescription( 147 147 pht( 148 148 "If you set this to true, users can accept their own revisions. ". ··· 153 153 $this->newOption('differential.always-allow-close', 'bool', false) 154 154 ->setBoolOptions( 155 155 array( 156 - pht("Allow any user"), 157 - pht("Restrict to submitter"), 156 + pht('Allow any user'), 157 + pht('Restrict to submitter'), 158 158 )) 159 - ->setSummary(pht("Allows any user to close accepted revisions.")) 159 + ->setSummary(pht('Allows any user to close accepted revisions.')) 160 160 ->setDescription( 161 161 pht( 162 - "If you set this to true, any user can close any revision so ". 163 - "long as it has been accepted. This can be useful depending on ". 164 - "your development model. For example, github-style pull requests ". 165 - "where the reviewer is often the actual committer can benefit ". 166 - "from turning this option to true. If false, only the submitter ". 167 - "can close a revision.")), 162 + 'If you set this to true, any user can close any revision so '. 163 + 'long as it has been accepted. This can be useful depending on '. 164 + 'your development model. For example, github-style pull requests '. 165 + 'where the reviewer is often the actual committer can benefit '. 166 + 'from turning this option to true. If false, only the submitter '. 167 + 'can close a revision.')), 168 168 $this->newOption('differential.always-allow-abandon', 'bool', false) 169 169 ->setBoolOptions( 170 170 array( ··· 179 179 $this->newOption('differential.allow-reopen', 'bool', false) 180 180 ->setBoolOptions( 181 181 array( 182 - pht("Enable reopen"), 183 - pht("Disable reopen"), 182 + pht('Enable reopen'), 183 + pht('Disable reopen'), 184 184 )) 185 - ->setSummary(pht("Allows any user to reopen a closed revision.")) 185 + ->setSummary(pht('Allows any user to reopen a closed revision.')) 186 186 ->setDescription( 187 - pht("If you set this to true, any user can reopen a revision so ". 188 - "long as it has been closed. This can be useful if a revision ". 189 - "is accidentally closed or if a developer changes his or her ". 190 - "mind after closing a revision. If it is false, reopening ". 191 - "is not allowed.")), 187 + pht('If you set this to true, any user can reopen a revision so '. 188 + 'long as it has been closed. This can be useful if a revision '. 189 + 'is accidentally closed or if a developer changes his or her '. 190 + 'mind after closing a revision. If it is false, reopening '. 191 + 'is not allowed.')), 192 192 $this->newOption('differential.close-on-accept', 'bool', false) 193 193 ->setBoolOptions( 194 194 array( ··· 216 216 "'fresh'?")) 217 217 ->setDescription( 218 218 pht( 219 - "Revisions newer than this number of days are marked as fresh in ". 220 - "Action Required and Revisions Waiting on You views. Only work ". 221 - "days (not weekends and holidays) are included. Set to 0 to ". 222 - "disable this feature.")), 219 + 'Revisions newer than this number of days are marked as fresh in '. 220 + 'Action Required and Revisions Waiting on You views. Only work '. 221 + 'days (not weekends and holidays) are included. Set to 0 to '. 222 + 'disable this feature.')), 223 223 $this->newOption('differential.days-stale', 'int', 3) 224 224 ->setSummary( 225 225 pht("After this many days, a revision will be considered 'stale'.")) ··· 250 250 false) 251 251 ->setBoolOptions( 252 252 array( 253 - pht("Attach Patches"), 254 - pht("Do Not Attach Patches"), 253 + pht('Attach Patches'), 254 + pht('Do Not Attach Patches'), 255 255 )) 256 - ->setSummary(pht("Attach patches to email, as text attachments.")) 256 + ->setSummary(pht('Attach patches to email, as text attachments.')) 257 257 ->setDescription( 258 258 pht( 259 - "If you set this to true, Phabricator will attach patches to ". 260 - "Differential mail (as text attachments). This will not work if ". 261 - "you are using SendGrid as your mail adapter.")), 259 + 'If you set this to true, Phabricator will attach patches to '. 260 + 'Differential mail (as text attachments). This will not work if '. 261 + 'you are using SendGrid as your mail adapter.')), 262 262 $this->newOption( 263 263 'metamta.differential.inline-patches', 264 264 'int', 265 265 0) 266 - ->setSummary(pht("Inline patches in email, as body text.")) 266 + ->setSummary(pht('Inline patches in email, as body text.')) 267 267 ->setDescription( 268 268 pht( 269 269 "To include patches inline in email bodies, set this to a ". ··· 284 284 false) 285 285 ->setBoolOptions( 286 286 array( 287 - pht("Show context"), 288 - pht("Do not show context"), 287 + pht('Show context'), 288 + pht('Do not show context'), 289 289 )) 290 - ->setSummary(pht("Show diff context around inline comments in email.")) 290 + ->setSummary(pht('Show diff context around inline comments in email.')) 291 291 ->setDescription( 292 292 pht( 293 - "Normally, inline comments in emails are shown with a file and ". 294 - "line but without any diff context. Enabling this option adds ". 295 - "diff context.")), 293 + 'Normally, inline comments in emails are shown with a file and '. 294 + 'line but without any diff context. Enabling this option adds '. 295 + 'diff context.')), 296 296 ); 297 297 } 298 298
+3 -3
src/applications/differential/controller/DifferentialDiffCreateController.php
··· 20 20 21 21 if (!strlen($diff)) { 22 22 $errors[] = pht( 23 - "You can not create an empty diff. Copy/paste a diff, or upload a ". 24 - "diff file."); 23 + 'You can not create an empty diff. Copy/paste a diff, or upload a '. 24 + 'diff file.'); 25 25 $e_diff = pht('Required'); 26 26 $e_file = pht('Required'); 27 27 } ··· 79 79 ->appendChild( 80 80 id(new AphrontFormSubmitControl()) 81 81 ->addCancelButton($cancel_uri) 82 - ->setValue(pht("Create Diff"))); 82 + ->setValue(pht('Create Diff'))); 83 83 84 84 $form_box = id(new PHUIObjectBoxView()) 85 85 ->setHeaderText(pht('Create New Diff'))
+3 -3
src/applications/differential/controller/DifferentialInlineCommentEditController.php
··· 22 22 ->executeOne(); 23 23 24 24 if (!$revision) { 25 - throw new Exception("Invalid revision ID!"); 25 + throw new Exception('Invalid revision ID!'); 26 26 } 27 27 28 28 if (!id(new DifferentialChangeset())->load($changeset_id)) { 29 - throw new Exception("Invalid changeset ID!"); 29 + throw new Exception('Invalid changeset ID!'); 30 30 } 31 31 32 32 return id(new DifferentialInlineComment()) ··· 46 46 47 47 $inline = $this->loadComment($id); 48 48 if (!$this->canEditInlineComment($user, $inline)) { 49 - throw new Exception("That comment is not editable!"); 49 + throw new Exception('That comment is not editable!'); 50 50 } 51 51 return $inline; 52 52 }
+1 -1
src/applications/differential/controller/DifferentialRevisionEditController.php
··· 49 49 } 50 50 if ($diff->getRevisionID()) { 51 51 // TODO: Redirect? 52 - throw new Exception("This diff is already attached to a revision!"); 52 + throw new Exception('This diff is already attached to a revision!'); 53 53 } 54 54 } else { 55 55 $diff = null;
+7 -7
src/applications/differential/controller/DifferentialRevisionLandController.php
··· 40 40 $text = ''; 41 41 try { 42 42 $response = $this->attemptLand($revision, $request); 43 - $title = pht("Success!"); 44 - $text = pht("Revision was successfully landed."); 43 + $title = pht('Success!'); 44 + $text = pht('Revision was successfully landed.'); 45 45 } catch (Exception $ex) { 46 - $title = pht("Failed to land revision"); 46 + $title = pht('Failed to land revision'); 47 47 if ($ex instanceof PhutilProxyException) { 48 48 $text = hsprintf( 49 49 '%s:<br><pre>%s</pre>', ··· 76 76 if (is_string($is_disabled)) { 77 77 $explain = $is_disabled; 78 78 } else { 79 - $explain = pht("This action is not currently enabled."); 79 + $explain = pht('This action is not currently enabled.'); 80 80 } 81 81 $dialog = id(new AphrontDialogView()) 82 82 ->setUser($viewer) ··· 97 97 98 98 $dialog = id(new AphrontDialogView()) 99 99 ->setUser($viewer) 100 - ->setTitle(pht("Land Revision %s?", $revision_id)) 100 + ->setTitle(pht('Land Revision %s?', $revision_id)) 101 101 ->appendChild($prompt) 102 102 ->setSubmitURI($request->getRequestURI()) 103 103 ->addSubmitButton(pht('Land it!')) ··· 109 109 private function attemptLand($revision, $request) { 110 110 $status = $revision->getStatus(); 111 111 if ($status != ArcanistDifferentialRevisionStatus::ACCEPTED) { 112 - throw new Exception("Only Accepted revisions can be landed."); 112 + throw new Exception('Only Accepted revisions can be landed.'); 113 113 } 114 114 115 115 $repository = $revision->getRepository(); 116 116 117 117 if ($repository === null) { 118 - throw new Exception("revision is not attached to a repository."); 118 + throw new Exception('revision is not attached to a repository.'); 119 119 } 120 120 121 121 $can_push = PhabricatorPolicyFilter::hasCapability(
+1 -1
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 39 39 40 40 if (!$diffs) { 41 41 throw new Exception( 42 - "This revision has no diffs. Something has gone quite wrong."); 42 + 'This revision has no diffs. Something has gone quite wrong.'); 43 43 } 44 44 45 45 $revision->attachActiveDiff(last($diffs));
+2 -2
src/applications/differential/customfield/DifferentialJIRAIssuesField.php
··· 183 183 $type, 184 184 pht('Invalid'), 185 185 pht( 186 - "Some JIRA issues could not be loaded. They may not exist, or ". 187 - "you may not have permission to view them: %s", 186 + 'Some JIRA issues could not be loaded. They may not exist, or '. 187 + 'you may not have permission to view them: %s', 188 188 $bad), 189 189 $xaction); 190 190 }
+3 -3
src/applications/differential/customfield/DifferentialLintField.php
··· 128 128 $other_line = idx($location, 'line'); 129 129 $locations[] = 130 130 idx($location, 'path', $path). 131 - ($other_line ? ":{$other_line}" : ""); 131 + ($other_line ? ":{$other_line}" : ''); 132 132 } 133 - $description .= "\nOther locations: ".implode(", ", $locations); 133 + $description .= "\nOther locations: ".implode(', ', $locations); 134 134 } 135 135 136 136 if (strlen($description)) { ··· 231 231 } 232 232 } 233 233 234 - return "Show Full Lint Results (".implode(', ', $show).")"; 234 + return 'Show Full Lint Results ('.implode(', ', $show).')'; 235 235 } 236 236 237 237 public function getWarningsForDetailView() {
+2 -2
src/applications/differential/customfield/DifferentialTitleField.php
··· 110 110 if (!strlen($value)) { 111 111 throw new DifferentialFieldValidationException( 112 112 pht( 113 - "You must provide a revision title in the first line ". 114 - "of your commit message.")); 113 + 'You must provide a revision title in the first line '. 114 + 'of your commit message.')); 115 115 } 116 116 117 117 if (preg_match('/^<<.*>>$/', $value)) {
+1 -1
src/applications/differential/customfield/DifferentialUnitField.php
··· 200 200 } 201 201 } 202 202 203 - return "Show Full Unit Results (".implode(', ', $show).")"; 203 + return 'Show Full Unit Results ('.implode(', ', $show).')'; 204 204 } 205 205 206 206 public function getWarningsForDetailView() {
+30 -30
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 857 857 858 858 if ($revision_status == $status_closed) { 859 859 return pht( 860 - "You can not commandeer this revision because it has already been ". 861 - "closed."); 860 + 'You can not commandeer this revision because it has already been '. 861 + 'closed.'); 862 862 } 863 863 break; 864 864 865 865 case DifferentialAction::ACTION_ABANDON: 866 866 if (!$actor_is_author && !$always_allow_abandon) { 867 867 return pht( 868 - "You can not abandon this revision because you do not own it. ". 869 - "You can only abandon revisions you own."); 868 + 'You can not abandon this revision because you do not own it. '. 869 + 'You can only abandon revisions you own.'); 870 870 } 871 871 872 872 if ($revision_status == $status_closed) { 873 873 return pht( 874 - "You can not abandon this revision because it has already been ". 875 - "closed."); 874 + 'You can not abandon this revision because it has already been '. 875 + 'closed.'); 876 876 } 877 877 878 878 // NOTE: Abandons of already-abandoned revisions are treated as no-op ··· 883 883 case DifferentialAction::ACTION_RECLAIM: 884 884 if (!$actor_is_author) { 885 885 return pht( 886 - "You can not reclaim this revision because you do not own ". 887 - "it. You can only reclaim revisions you own."); 886 + 'You can not reclaim this revision because you do not own '. 887 + 'it. You can only reclaim revisions you own.'); 888 888 } 889 889 890 890 if ($revision_status == $status_closed) { 891 891 return pht( 892 - "You can not reclaim this revision because it has already been ". 893 - "closed."); 892 + 'You can not reclaim this revision because it has already been '. 893 + 'closed.'); 894 894 } 895 895 896 896 // NOTE: Reclaims of other non-abandoned revisions are treated as no-op ··· 913 913 case DifferentialAction::ACTION_RETHINK: 914 914 if (!$actor_is_author) { 915 915 return pht( 916 - "You can not plan changes to this revision because you do not ". 917 - "own it. To plan changes to a revision, you must be its owner."); 916 + 'You can not plan changes to this revision because you do not '. 917 + 'own it. To plan changes to a revision, you must be its owner.'); 918 918 } 919 919 920 920 switch ($revision_status) { ··· 928 928 break; 929 929 case ArcanistDifferentialRevisionStatus::ABANDONED: 930 930 return pht( 931 - "You can not plan changes to this revision because it has ". 932 - "been abandoned."); 931 + 'You can not plan changes to this revision because it has '. 932 + 'been abandoned.'); 933 933 case ArcanistDifferentialRevisionStatus::CLOSED: 934 934 return pht( 935 - "You can not plan changes to this revision because it has ". 936 - "already been closed."); 935 + 'You can not plan changes to this revision because it has '. 936 + 'already been closed.'); 937 937 default: 938 938 throw new Exception( 939 939 pht( ··· 947 947 case DifferentialAction::ACTION_REQUEST: 948 948 if (!$actor_is_author) { 949 949 return pht( 950 - "You can not request review of this revision because you do ". 951 - "not own it. To request review of a revision, you must be its ". 952 - "owner."); 950 + 'You can not request review of this revision because you do '. 951 + 'not own it. To request review of a revision, you must be its '. 952 + 'owner.'); 953 953 } 954 954 955 955 switch ($revision_status) { ··· 963 963 break; 964 964 case ArcanistDifferentialRevisionStatus::ABANDONED: 965 965 return pht( 966 - "You can not request review of this revision because it has ". 967 - "been abandoned. Instead, reclaim it."); 966 + 'You can not request review of this revision because it has '. 967 + 'been abandoned. Instead, reclaim it.'); 968 968 case ArcanistDifferentialRevisionStatus::CLOSED: 969 969 return pht( 970 - "You can not request review of this revision because it has ". 971 - "already been closed."); 970 + 'You can not request review of this revision because it has '. 971 + 'already been closed.'); 972 972 default: 973 973 throw new Exception( 974 974 pht( ··· 987 987 if (!$this->getIsCloseByCommit()) { 988 988 if (!$actor_is_author && !$always_allow_close) { 989 989 return pht( 990 - "You can not close this revision because you do not own it. To ". 991 - "close a revision, you must be its owner."); 990 + 'You can not close this revision because you do not own it. To '. 991 + 'close a revision, you must be its owner.'); 992 992 } 993 993 994 994 if ($revision_status != $status_accepted) { 995 995 return pht( 996 - "You can not close this revision because it has not been ". 997 - "accepted. You can only close accepted revisions."); 996 + 'You can not close this revision because it has not been '. 997 + 'accepted. You can only close accepted revisions.'); 998 998 } 999 999 } 1000 1000 break; ··· 1321 1321 if (!$show_context) { 1322 1322 $result[] = "{$file}:{$range} {$inline_content}"; 1323 1323 } else { 1324 - $result[] = "================"; 1325 - $result[] = "Comment at: " . $file . ":" . $range; 1324 + $result[] = '================'; 1325 + $result[] = 'Comment at: ' . $file . ':' . $range; 1326 1326 $result[] = $hunk_parser->makeContextDiff( 1327 1327 $changeset->getHunks(), 1328 1328 $comment->getIsNewFile(), 1329 1329 $comment->getLineNumber(), 1330 1330 $comment->getLineLength(), 1331 1331 1); 1332 - $result[] = "----------------"; 1332 + $result[] = '----------------'; 1333 1333 1334 1334 $result[] = $inline_content; 1335 1335 $result[] = null;
+2 -2
src/applications/differential/landing/DifferentialLandingStrategy.php
··· 44 44 45 45 $status = $revision->getStatus(); 46 46 if ($status != ArcanistDifferentialRevisionStatus::ACCEPTED) { 47 - return pht("Only Accepted revisions can be landed."); 47 + return pht('Only Accepted revisions can be landed.'); 48 48 } 49 49 50 50 if (!PhabricatorPolicyFilter::hasCapability( 51 51 $viewer, 52 52 $repository, 53 53 DiffusionCapabilityPush::CAPABILITY)) { 54 - return pht("You do not have permissions to push to this repository."); 54 + return pht('You do not have permissions to push to this repository.'); 55 55 } 56 56 57 57 return false;
+2 -2
src/applications/differential/landing/DifferentialLandingToGitHub.php
··· 88 88 $github_repo); 89 89 90 90 $workspace->execxLocal( 91 - "push %P HEAD:master", 91 + 'push %P HEAD:master', 92 92 new PhutilOpaqueEnvelope($remote)); 93 93 } 94 94 ··· 99 99 $this->account = id(new PhabricatorExternalAccountQuery()) 100 100 ->setViewer($viewer) 101 101 ->withUserPHIDs(array($viewer->getPHID())) 102 - ->withAccountTypes(array("github")) 102 + ->withAccountTypes(array('github')) 103 103 ->withAccountDomains(array($repo_domain)) 104 104 ->executeOne(); 105 105
+2 -2
src/applications/differential/landing/DifferentialLandingToHostedGit.php
··· 56 56 . "0000000000000000000000000000000000000000.." 57 57 . "0000000000000000000000000000000000000000\n"; 58 58 if (strpos($raw_diff, $missing_binary) !== false) { 59 - throw new Exception("Patch is missing content for a binary file"); 59 + throw new Exception('Patch is missing content for a binary file'); 60 60 } 61 61 62 62 $future = $workspace->execFutureLocal('apply --index -'); ··· 102 102 ArcanistRepositoryAPI $workspace, 103 103 PhabricatorUser $user) { 104 104 105 - $workspace->execxLocal("push origin HEAD:master"); 105 + $workspace->execxLocal('push origin HEAD:master'); 106 106 } 107 107 108 108 public function createMenuItem(
+1 -1
src/applications/differential/landing/DifferentialLandingToHostedMercurial.php
··· 90 90 ArcanistRepositoryAPI $workspace, 91 91 PhabricatorUser $user) { 92 92 93 - $workspace->execxLocal("push -b default"); 93 + $workspace->execxLocal('push -b default'); 94 94 } 95 95 96 96 public function createMenuItem(
+2 -2
src/applications/differential/mail/DifferentialReplyHandler.php
··· 11 11 12 12 public function validateMailReceiver($mail_receiver) { 13 13 if (!($mail_receiver instanceof DifferentialRevision)) { 14 - throw new Exception("Receiver is not a DifferentialRevision!"); 14 + throw new Exception('Receiver is not a DifferentialRevision!'); 15 15 } 16 16 } 17 17 ··· 71 71 $text .= implode(', ', $modified_commands); 72 72 } 73 73 74 - $text .= "."; 74 + $text .= '.'; 75 75 76 76 return $text; 77 77 }
+2 -2
src/applications/differential/parser/DifferentialChangesetParser.php
··· 990 990 for ($ii = $range_end; $ii >= $range_start; $ii--) { 991 991 // We need to expand tabs to process mixed indenting and to round 992 992 // correctly later. 993 - $line = str_replace("\t", " ", $this->new[$ii]['text']); 993 + $line = str_replace("\t", ' ', $this->new[$ii]['text']); 994 994 $trimmed = ltrim($line); 995 995 if ($trimmed != '') { 996 996 // We round down to flatten "/**" and " *". ··· 1043 1043 PhabricatorInlineCommentInterface $comment) { 1044 1044 1045 1045 if (!$this->isCommentVisibleOnRenderedDiff($comment)) { 1046 - throw new Exception("Comment is not visible on changeset!"); 1046 + throw new Exception('Comment is not visible on changeset!'); 1047 1047 } 1048 1048 1049 1049 $changeset_id = $comment->getChangesetID();
+27 -27
src/applications/differential/parser/DifferentialHunkParser.php
··· 428 428 if (isset($line[0])) { 429 429 $char = $line[0]; 430 430 switch ($char) { 431 - case " ": 431 + case ' ': 432 432 $line_type_map[$line_index] = null; 433 433 $line_text[$line_index] = substr($line, 1); 434 434 break; ··· 442 442 $line_type_map[$line_index] = null; 443 443 $line_text[$line_index] = $line; 444 444 break; 445 - case "+": 446 - case "-": 447 - case "\\": 445 + case '+': 446 + case '-': 447 + case '\\': 448 448 $line_type_map[$line_index] = $char; 449 449 $line_text[$line_index] = substr($line, 1); 450 450 break; ··· 602 602 $start = $start - $add_context; 603 603 $end = $end + $add_context; 604 604 $hunk_content = array(); 605 - $hunk_pos = array( "-" => 0, "+" => 0 ); 606 - $hunk_offset = array( "-" => null, "+" => null ); 607 - $hunk_last = array( "-" => null, "+" => null ); 605 + $hunk_pos = array( '-' => 0, '+' => 0 ); 606 + $hunk_offset = array( '-' => null, '+' => null ); 607 + $hunk_last = array( '-' => null, '+' => null ); 608 608 foreach (explode("\n", $hunk->getChanges()) as $line) { 609 - $in_common = strncmp($line, " ", 1) === 0; 610 - $in_old = strncmp($line, "-", 1) === 0 || $in_common; 611 - $in_new = strncmp($line, "+", 1) === 0 || $in_common; 609 + $in_common = strncmp($line, ' ', 1) === 0; 610 + $in_old = strncmp($line, '-', 1) === 0 || $in_common; 611 + $in_new = strncmp($line, '+', 1) === 0 || $in_common; 612 612 $in_selected = strncmp($line, $prefix, 1) === 0; 613 613 $skip = !$in_selected && !$in_common; 614 614 if ($hunk_pos[$prefix] <= $end) { ··· 616 616 if (!$skip || ($hunk_pos[$prefix] != $start && 617 617 $hunk_pos[$prefix] != $end)) { 618 618 if ($in_old) { 619 - if ($hunk_offset["-"] === null) { 620 - $hunk_offset["-"] = $hunk_pos["-"]; 619 + if ($hunk_offset['-'] === null) { 620 + $hunk_offset['-'] = $hunk_pos['-']; 621 621 } 622 - $hunk_last["-"] = $hunk_pos["-"]; 622 + $hunk_last['-'] = $hunk_pos['-']; 623 623 } 624 624 if ($in_new) { 625 - if ($hunk_offset["+"] === null) { 626 - $hunk_offset["+"] = $hunk_pos["+"]; 625 + if ($hunk_offset['+'] === null) { 626 + $hunk_offset['+'] = $hunk_pos['+']; 627 627 } 628 - $hunk_last["+"] = $hunk_pos["+"]; 628 + $hunk_last['+'] = $hunk_pos['+']; 629 629 } 630 630 631 631 $hunk_content[] = $line; 632 632 } 633 633 } 634 - if ($in_old) { ++$hunk_pos["-"]; } 635 - if ($in_new) { ++$hunk_pos["+"]; } 634 + if ($in_old) { ++$hunk_pos['-']; } 635 + if ($in_new) { ++$hunk_pos['+']; } 636 636 } 637 637 } 638 - if ($hunk_offset["-"] !== null || $hunk_offset["+"] !== null) { 639 - $header = "@@"; 640 - if ($hunk_offset["-"] !== null) { 641 - $header .= " -" . ($hunk->getOldOffset() + $hunk_offset["-"]) . 642 - "," . ($hunk_last["-"] - $hunk_offset["-"] + 1); 638 + if ($hunk_offset['-'] !== null || $hunk_offset['+'] !== null) { 639 + $header = '@@'; 640 + if ($hunk_offset['-'] !== null) { 641 + $header .= ' -' . ($hunk->getOldOffset() + $hunk_offset['-']) . 642 + ',' . ($hunk_last['-'] - $hunk_offset['-'] + 1); 643 643 } 644 - if ($hunk_offset["+"] !== null) { 645 - $header .= " +" . ($hunk->getNewOffset() + $hunk_offset["+"]) . 646 - "," . ($hunk_last["+"] - $hunk_offset["+"] + 1); 644 + if ($hunk_offset['+'] !== null) { 645 + $header .= ' +' . ($hunk->getNewOffset() + $hunk_offset['+']) . 646 + ',' . ($hunk_last['+'] - $hunk_offset['+'] + 1); 647 647 } 648 - $header .= " @@"; 648 + $header .= ' @@'; 649 649 $context[] = $header; 650 650 $context[] = implode("\n", $hunk_content); 651 651 }
+3 -3
src/applications/differential/parser/__tests__/DifferentialCustomFieldRevertsParserTestCase.php
··· 42 42 ), 43 43 ), 44 44 45 - "Reverts 123" => array( 45 + 'Reverts 123' => array( 46 46 array( 47 47 'match' => 'Reverts 123', 48 48 'prefix' => 'Reverts', ··· 54 54 ), 55 55 56 56 57 - "Reverts r123" => array( 57 + 'Reverts r123' => array( 58 58 array( 59 59 'match' => 'Reverts r123', 60 60 'prefix' => 'Reverts', ··· 78 78 79 79 "This doesn't revert anything" => array(), 80 80 'nonrevert of r11' => array(), 81 - "fixed a bug" => array(), 81 + 'fixed a bug' => array(), 82 82 ); 83 83 84 84 foreach ($map as $input => $expect) {
+4 -4
src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php
··· 46 46 47 47 public function testOneLineOldComment() { 48 48 $parser = new DifferentialHunkParser(); 49 - $hunks = $this->createSingleChange(1, 0, "-a"); 49 + $hunks = $this->createSingleChange(1, 0, '-a'); 50 50 $context = $parser->makeContextDiff( 51 51 $hunks, 52 52 0, ··· 58 58 59 59 public function testOneLineNewComment() { 60 60 $parser = new DifferentialHunkParser(); 61 - $hunks = $this->createSingleChange(0, 1, "+a"); 61 + $hunks = $this->createSingleChange(0, 1, '+a'); 62 62 $context = $parser->makeContextDiff( 63 63 $hunks, 64 64 1, ··· 70 70 71 71 public function testCannotFindContext() { 72 72 $parser = new DifferentialHunkParser(); 73 - $hunks = $this->createSingleChange(0, 1, "+a"); 73 + $hunks = $this->createSingleChange(0, 1, '+a'); 74 74 $context = $parser->makeContextDiff( 75 75 $hunks, 76 76 1, 77 77 2, 78 78 0, 79 79 0); 80 - $this->assertEqual("", $context); 80 + $this->assertEqual('', $context); 81 81 } 82 82 83 83 public function testOverlapFromStartOfHunk() {
+1 -1
src/applications/differential/query/DifferentialRevisionQuery.php
··· 889 889 case self::ORDER_PATH_MODIFIED: 890 890 if (!$this->pathIDs) { 891 891 throw new Exception( 892 - "To use ORDER_PATH_MODIFIED, you must specify withPath()."); 892 + 'To use ORDER_PATH_MODIFIED, you must specify withPath().'); 893 893 } 894 894 return 'p.epoch'; 895 895 default:
+1 -1
src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
··· 71 71 $new_file = null, 72 72 $id = 0, 73 73 $vs = 0) { 74 - throw new Exception("Not implemented!"); 74 + throw new Exception('Not implemented!'); 75 75 } 76 76 77 77 }
+1 -1
src/applications/differential/render/DifferentialChangesetTestRenderer.php
··· 80 80 $new_file = null, 81 81 $id = 0, 82 82 $vs = 0) { 83 - throw new Exception("Not implemented!"); 83 + throw new Exception('Not implemented!'); 84 84 } 85 85 86 86 }
+2 -2
src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
··· 94 94 ), 95 95 ), 96 96 $is_first_block 97 - ? pht("Show First 20 Lines") 97 + ? pht('Show First 20 Lines') 98 98 : pht("\xE2\x96\xB2 Show 20 Lines")); 99 99 } 100 100 ··· 130 130 ), 131 131 ), 132 132 $is_last_block 133 - ? pht("Show Last 20 Lines") 133 + ? pht('Show Last 20 Lines') 134 134 : pht("\xE2\x96\xBC Show 20 Lines")); 135 135 } 136 136
+1 -1
src/applications/differential/storage/DifferentialReviewer.php
··· 41 41 42 42 $viewer_phid = $viewer->getPHID(); 43 43 if (!array_key_exists($viewer_phid, $this->authority)) { 44 - throw new Exception("You must attachAuthority() first!"); 44 + throw new Exception('You must attachAuthority() first!'); 45 45 } 46 46 return $this->authority[$viewer_phid]; 47 47 }
+2 -2
src/applications/differential/storage/__tests__/DifferentialHunkTestCase.php
··· 29 29 $hunk->setNewOffset(11); 30 30 31 31 $this->assertEqual("a\n", $hunk->makeOldFile()); 32 - $this->assertEqual("a", $hunk->makeNewFile()); 33 - $this->assertEqual(array(11 => "a"), $hunk->getAddedLines()); 32 + $this->assertEqual('a', $hunk->makeNewFile()); 33 + $this->assertEqual(array(11 => 'a'), $hunk->getAddedLines()); 34 34 35 35 } 36 36
+1 -2
src/applications/differential/view/DifferentialDiffTableOfContentsView.php
··· 136 136 $pchar = 137 137 ($changeset->getOldProperties() === $changeset->getNewProperties()) 138 138 ? '' 139 - : phutil_tag('span', array('title' => pht('Properties Changed')), 'M') 140 - ; 139 + : phutil_tag('span', array('title' => pht('Properties Changed')), 'M'); 141 140 142 141 $fname = $changeset->getFilename(); 143 142 $cov = $this->renderCoverage($coverage, $fname);
+2 -2
src/applications/differential/view/DifferentialInlineCommentEditView.php
··· 42 42 43 43 public function render() { 44 44 if (!$this->uri) { 45 - throw new Exception("Call setSubmitURI() before render()!"); 45 + throw new Exception('Call setSubmitURI() before render()!'); 46 46 } 47 47 if (!$this->user) { 48 - throw new Exception("Call setUser() before render()!"); 48 + throw new Exception('Call setUser() before render()!'); 49 49 } 50 50 51 51 $content = phabricator_form(
+1 -1
src/applications/differential/view/DifferentialLocalCommitsView.php
··· 19 19 public function render() { 20 20 $user = $this->user; 21 21 if (!$user) { 22 - throw new Exception("Call setUser() before render()-ing this view."); 22 + throw new Exception('Call setUser() before render()-ing this view.'); 23 23 } 24 24 25 25 $local = $this->localCommits;
+1 -1
src/applications/differential/view/DifferentialRevisionListView.php
··· 54 54 55 55 $user = $this->user; 56 56 if (!$user) { 57 - throw new Exception("Call setUser() before render()!"); 57 + throw new Exception('Call setUser() before render()!'); 58 58 } 59 59 60 60 $fresh = PhabricatorEnv::getEnvConfig('differential.days-fresh');
+4 -4
src/applications/differential/view/DifferentialTransactionView.php
··· 104 104 $inlines[] = $xaction; 105 105 break; 106 106 default: 107 - throw new Exception("Unknown grouped transaction type!"); 107 + throw new Exception('Unknown grouped transaction type!'); 108 108 } 109 109 } 110 110 ··· 149 149 $comment_id = $comment->getID(); 150 150 151 151 $item['href'] = 152 - "/D".$revision_id. 153 - "?id=".$changeset_diff_id. 154 - "#inline-".$comment_id; 152 + '/D'.$revision_id. 153 + '?id='.$changeset_diff_id. 154 + '#inline-'.$comment_id; 155 155 } 156 156 157 157 $items[] = $item;
+1 -1
src/applications/diffusion/conduit/ConduitAPI_diffusion_existsquery_Method.php
··· 7 7 extends ConduitAPI_diffusion_abstractquery_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Determine if code exists in a version control system."; 10 + return 'Determine if code exists in a version control system.'; 11 11 } 12 12 13 13 public function defineReturnType() {
+1 -1
src/applications/diffusion/conduit/ConduitAPI_diffusion_findsymbols_Method.php
··· 7 7 extends ConduitAPI_diffusion_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Retrieve Diffusion symbol information."; 10 + return 'Retrieve Diffusion symbol information.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/diffusion/conduit/ConduitAPI_diffusion_getlintmessages_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return "Get lint messages for existing code."; 14 + return 'Get lint messages for existing code.'; 15 15 } 16 16 17 17 public function defineParamTypes() {
+1 -1
src/applications/diffusion/conduit/ConduitAPI_diffusion_getrecentcommitsbypath_Method.php
··· 9 9 const DEFAULT_LIMIT = 10; 10 10 11 11 public function getMethodDescription() { 12 - return "Get commit identifiers for recent commits affecting a given path."; 12 + return 'Get commit identifiers for recent commits affecting a given path.'; 13 13 } 14 14 15 15 public function defineParamTypes() {
+1 -1
src/applications/diffusion/conduit/ConduitAPI_diffusion_historyquery_Method.php
··· 66 66 $hash_list = array(); 67 67 $parent_map = array(); 68 68 foreach ($lines as $line) { 69 - list($hash, $parents) = explode(":", $line); 69 + list($hash, $parents) = explode(':', $line); 70 70 $hash_list[] = $hash; 71 71 $parent_map[$hash] = preg_split('/\s+/', $parents); 72 72 }
+4 -4
src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
··· 38 38 false) 39 39 ->setBoolOptions( 40 40 array( 41 - pht("Attach Patches"), 42 - pht("Do Not Attach Patches"), 41 + pht('Attach Patches'), 42 + pht('Do Not Attach Patches'), 43 43 )) 44 44 ->setDescription(pht( 45 45 'Set this to true if you want patches to be attached to commit '. ··· 61 61 false) 62 62 ->setBoolOptions( 63 63 array( 64 - pht("Enable Closing Audits"), 65 - pht("Disable Closing Audits"), 64 + pht('Enable Closing Audits'), 65 + pht('Disable Closing Audits'), 66 66 )) 67 67 ->setDescription(pht('Controls whether Author can Close Audits.')), 68 68
+7 -7
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 125 125 switch ($follow) { 126 126 case 'first': 127 127 $notice->appendChild( 128 - pht("Unable to continue tracing the history of this file because ". 129 - "this commit is the first commit in the repository.")); 128 + pht('Unable to continue tracing the history of this file because '. 129 + 'this commit is the first commit in the repository.')); 130 130 break; 131 131 case 'created': 132 132 $notice->appendChild( 133 - pht("Unable to continue tracing the history of this file because ". 134 - "this commit created the file.")); 133 + pht('Unable to continue tracing the history of this file because '. 134 + 'this commit created the file.')); 135 135 break; 136 136 } 137 137 $content[] = $notice; ··· 210 210 211 211 if (!$show_color) { 212 212 $style = 213 - "border: none; width: 100%; height: 80em; font-family: monospace"; 213 + 'border: none; width: 100%; height: 80em; font-family: monospace'; 214 214 if (!$show_blame) { 215 215 $corpus = phutil_tag( 216 216 'textarea', ··· 228 228 $rev = $rev_list[$k]; 229 229 $author = $blame_dict[$rev]['author']; 230 230 $rows[] = 231 - sprintf("%-10s %-20s %s", substr($rev, 0, 7), $author, $line); 231 + sprintf('%-10s %-20s %s', substr($rev, 0, 7), $author, $line); 232 232 } 233 233 234 234 $corpus = phutil_tag( ··· 256 256 $corpus_table = javelin_tag( 257 257 'table', 258 258 array( 259 - 'class' => "diffusion-source remarkup-code PhabricatorMonospaced", 259 + 'class' => 'diffusion-source remarkup-code PhabricatorMonospaced', 260 260 'sigil' => 'phabricator-source', 261 261 ), 262 262 $rows);
+3 -3
src/applications/diffusion/controller/DiffusionCommitController.php
··· 247 247 248 248 $change_panel = new PHUIObjectBoxView(); 249 249 $header = new PHUIHeaderView(); 250 - $header->setHeader("Changes (".number_format($count).")"); 250 + $header->setHeader('Changes ('.number_format($count).')'); 251 251 $change_panel->setID('toc'); 252 252 if ($count > self::CHANGES_LIMIT && !$show_all_details) { 253 253 ··· 264 264 ->setSeverity(AphrontErrorView::SEVERITY_WARNING) 265 265 ->setTitle('Very Large Commit') 266 266 ->appendChild( 267 - pht("This commit is very large. Load each file individually.")); 267 + pht('This commit is very large. Load each file individually.')); 268 268 269 269 $change_panel->setErrorView($warning_view); 270 270 $header->addActionLink($button); ··· 288 288 $vcs_supports_directory_changes = false; 289 289 break; 290 290 default: 291 - throw new Exception("Unknown VCS."); 291 + throw new Exception('Unknown VCS.'); 292 292 } 293 293 294 294 $references = array();
+2 -2
src/applications/diffusion/controller/DiffusionController.php
··· 11 11 12 12 protected function getDiffusionRequest() { 13 13 if (!$this->diffusionRequest) { 14 - throw new Exception("No Diffusion request object!"); 14 + throw new Exception('No Diffusion request object!'); 15 15 } 16 16 return $this->diffusionRequest; 17 17 } ··· 104 104 $crumb = new PhabricatorCrumbView(); 105 105 if ($spec['commit']) { 106 106 $crumb->setName( 107 - pht("Tags for %s", 'r'.$callsign.$stable_commit)); 107 + pht('Tags for %s', 'r'.$callsign.$stable_commit)); 108 108 $crumb->setHref($drequest->generateURI( 109 109 array( 110 110 'action' => 'commit',
+3 -3
src/applications/diffusion/controller/DiffusionExternalController.php
··· 76 76 ->appendChild(phutil_tag( 77 77 'p', 78 78 array(), 79 - pht("This external (%s) does not appear in any tracked ". 80 - "repository. It may exist in an untracked repository that ". 81 - "Diffusion does not know about.", $desc))); 79 + pht('This external (%s) does not appear in any tracked '. 80 + 'repository. It may exist in an untracked repository that '. 81 + 'Diffusion does not know about.', $desc))); 82 82 } else if (count($commits) == 1) { 83 83 $commit = head($commits); 84 84 $repo = $repositories[$commit->getRepositoryID()];
+3 -3
src/applications/diffusion/controller/DiffusionInlineCommentController.php
··· 19 19 'phid = %s', 20 20 $commit_phid); 21 21 if (!$commit) { 22 - throw new Exception("Invalid commit ID!"); 22 + throw new Exception('Invalid commit ID!'); 23 23 } 24 24 25 25 // TODO: Write a real PathQuery object? ··· 31 31 $path_id); 32 32 33 33 if (!$path) { 34 - throw new Exception("Invalid path ID!"); 34 + throw new Exception('Invalid path ID!'); 35 35 } 36 36 37 37 return id(new PhabricatorAuditInlineComment()) ··· 49 49 50 50 $inline = $this->loadComment($id); 51 51 if (!$this->canEditInlineComment($user, $inline)) { 52 - throw new Exception("That comment is not editable!"); 52 + throw new Exception('That comment is not editable!'); 53 53 } 54 54 return $inline; 55 55 }
+2 -2
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 290 290 ->setIconFont('fa-fork'); 291 291 292 292 $button = new PHUIButtonView(); 293 - $button->setText(pht("Show All Branches")); 293 + $button->setText(pht('Show All Branches')); 294 294 $button->setTag('a'); 295 295 $button->setIcon($icon); 296 296 $button->setHref($drequest->generateURI( ··· 362 362 ->setIconFont('fa-tag'); 363 363 364 364 $button = new PHUIButtonView(); 365 - $button->setText(pht("Show All Tags")); 365 + $button->setText(pht('Show All Tags')); 366 366 $button->setTag('a'); 367 367 $button->setIcon($icon); 368 368 $button->setHref($drequest->generateURI(
+6 -6
src/applications/diffusion/controller/DiffusionRepositoryCreateController.php
··· 43 43 $cancel_uri = $this->getApplicationURI('new/'); 44 44 break; 45 45 default: 46 - throw new Exception("Invalid edit operation!"); 46 + throw new Exception('Invalid edit operation!'); 47 47 } 48 48 49 49 $form = id(new PHUIPagedFormView()) ··· 432 432 $is_mercurial = true; 433 433 break; 434 434 default: 435 - throw new Exception("Unsupported VCS!"); 435 + throw new Exception('Unsupported VCS!'); 436 436 } 437 437 438 438 $has_local = ($is_git || $is_mercurial); ··· 478 478 "repository, use the //Import Only// option at the end of this ". 479 479 "workflow.)"); 480 480 } else { 481 - throw new Exception("Unsupported VCS!"); 481 + throw new Exception('Unsupported VCS!'); 482 482 } 483 483 484 484 $page->addRemarkupInstructions($instructions, 'remoteURI'); ··· 492 492 if (!strlen($v_remote)) { 493 493 $c_remote->setError(pht('Required')); 494 494 $page->addPageError( 495 - pht("You must specify a URI.")); 495 + pht('You must specify a URI.')); 496 496 } else { 497 497 $proto = $this->getRemoteURIProtocol($v_remote); 498 498 ··· 623 623 'accessed over the `file://` protocol. Continue to the next step.'), 624 624 'credential'); 625 625 } else { 626 - throw new Exception("Unknown URI protocol!"); 626 + throw new Exception('Unknown URI protocol!'); 627 627 } 628 628 629 629 if ($provides_type) { ··· 735 735 ->setUser($viewer) 736 736 ->addRemarkupInstructions( 737 737 pht( 738 - "Select access policies for this repository.")) 738 + 'Select access policies for this repository.')) 739 739 ->addControl($view_policy) 740 740 ->addControl($edit_policy) 741 741 ->addControl($push_policy);
+4 -4
src/applications/diffusion/controller/DiffusionServeController.php
··· 16 16 // We get this initially for `info/refs`. 17 17 // Git also gives us a User-Agent like "git/1.8.2.3". 18 18 $vcs = PhabricatorRepositoryType::REPOSITORY_TYPE_GIT; 19 - } else if (strncmp($user_agent, "git/", 4) === 0) { 19 + } else if (strncmp($user_agent, 'git/', 4) === 0) { 20 20 $vcs = PhabricatorRepositoryType::REPOSITORY_TYPE_GIT; 21 21 } else if ($content_type == 'application/x-git-upload-pack-request') { 22 22 // We get this for `git-upload-pack`. ··· 305 305 // resolve the binary first. 306 306 $bin = Filesystem::resolveBinary('git-http-backend'); 307 307 if (!$bin) { 308 - throw new Exception("Unable to find `git-http-backend` in PATH!"); 308 + throw new Exception('Unable to find `git-http-backend` in PATH!'); 309 309 } 310 310 311 311 $env = array( ··· 448 448 449 449 $bin = Filesystem::resolveBinary('hg'); 450 450 if (!$bin) { 451 - throw new Exception("Unable to find `hg` in PATH!"); 451 + throw new Exception('Unable to find `hg` in PATH!'); 452 452 } 453 453 454 454 $env = $this->getCommonEnvironment($viewer); ··· 502 502 // "Why would you do this?". 503 503 504 504 $args_raw = array(); 505 - for ($ii = 1; ; $ii++) { 505 + for ($ii = 1;; $ii++) { 506 506 $header = 'HTTP_X_HGARG_'.$ii; 507 507 if (!array_key_exists($header, $_SERVER)) { 508 508 break;
+1 -1
src/applications/diffusion/controller/DiffusionSymbolController.php
··· 136 136 '', 137 137 )); 138 138 $table->setNoDataString( 139 - pht("No matching symbol could be found in any indexed project.")); 139 + pht('No matching symbol could be found in any indexed project.')); 140 140 141 141 $panel = new AphrontPanelView(); 142 142 $panel->setHeader(pht('Similar Symbols'));
+1 -1
src/applications/diffusion/data/DiffusionRepositoryTag.php
··· 72 72 73 73 public function getMessage() { 74 74 if ($this->message === false) { 75 - throw new Exception("Message is not attached!"); 75 + throw new Exception('Message is not attached!'); 76 76 } 77 77 return $this->message; 78 78 }
+2 -2
src/applications/diffusion/engine/DiffusionCommitHookEngine.php
··· 610 610 if (!$err) { 611 611 // This hook ran OK, but echo its output in case there was something 612 612 // informative. 613 - $console->writeOut("%s", $stdout); 614 - $console->writeErr("%s", $stderr); 613 + $console->writeOut('%s', $stdout); 614 + $console->writeErr('%s', $stderr); 615 615 continue; 616 616 } 617 617
+1 -1
src/applications/diffusion/query/DiffusionCommitQuery.php
··· 135 135 public function getIdentifierMap() { 136 136 if ($this->identifierMap === null) { 137 137 throw new Exception( 138 - "You must execute() the query before accessing the identifier map."); 138 + 'You must execute() the query before accessing the identifier map.'); 139 139 } 140 140 return $this->identifierMap; 141 141 }
+2 -2
src/applications/diffusion/query/DiffusionLintCountQuery.php
··· 23 23 24 24 public function execute() { 25 25 if (!$this->paths) { 26 - throw new Exception(pht("Call withPaths() before execute()!")); 26 + throw new Exception(pht('Call withPaths() before execute()!')); 27 27 } 28 28 29 29 if (!$this->branchIDs) { 30 - throw new Exception(pht("Call withBranchIDs() before execute()!")); 30 + throw new Exception(pht('Call withBranchIDs() before execute()!')); 31 31 } 32 32 33 33 $conn_r = id(new PhabricatorRepositoryCommit())->establishConnection('r');
+1 -1
src/applications/diffusion/query/DiffusionQuery.php
··· 32 32 33 33 $name = idx($map, $repository->getVersionControlSystem()); 34 34 if (!$name) { 35 - throw new Exception("Unsupported VCS!"); 35 + throw new Exception('Unsupported VCS!'); 36 36 } 37 37 38 38 $class = str_replace('Diffusion', 'Diffusion'.$name, $base_class);
+2 -2
src/applications/diffusion/query/DiffusionSymbolQuery.php
··· 119 119 public function execute() { 120 120 if ($this->name && $this->namePrefix) { 121 121 throw new Exception( 122 - "You can not set both a name and a name prefix!"); 122 + 'You can not set both a name and a name prefix!'); 123 123 } else if (!$this->name && !$this->namePrefix) { 124 124 throw new Exception( 125 - "You must set a name or a name prefix!"); 125 + 'You must set a name or a name prefix!'); 126 126 } 127 127 128 128 $symbol = new PhabricatorRepositorySymbol();
+1 -1
src/applications/diffusion/query/filecontent/DiffusionFileContentQuery.php
··· 28 28 if ($try_encoding) { 29 29 $this->fileContent->setCorpus( 30 30 phutil_utf8_convert( 31 - $this->fileContent->getCorpus(), "UTF-8", $try_encoding)); 31 + $this->fileContent->getCorpus(), 'UTF-8', $try_encoding)); 32 32 } 33 33 34 34 return $this->fileContent;
+3 -3
src/applications/diffusion/query/filecontent/DiffusionSvnFileContentQuery.php
··· 26 26 // nuked; Diffusion will think it still exists and try to grab content 27 27 // at HEAD. 28 28 throw new Exception( 29 - "Failed to retrieve file content from Subversion. The file may ". 30 - "have been recently deleted, or the Diffusion cache may be out of ". 31 - "date."); 29 + 'Failed to retrieve file content from Subversion. The file may '. 30 + 'have been recently deleted, or the Diffusion cache may be out of '. 31 + 'date.'); 32 32 } else { 33 33 throw $ex; 34 34 }
+3 -3
src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php
··· 25 25 $repository = $this->getRepository(); 26 26 27 27 if ($this->isTag && $this->isOriginBranch) { 28 - throw new Exception("Specify tags or origin branches, not both!"); 28 + throw new Exception('Specify tags or origin branches, not both!'); 29 29 } else if ($this->isTag) { 30 30 $prefix = 'refs/tags/'; 31 31 } else if ($this->isOriginBranch) { ··· 36 36 $prefix = 'refs/remotes/'.$remote.'/'; 37 37 } 38 38 } else { 39 - throw new Exception("Specify tags or origin branches!"); 39 + throw new Exception('Specify tags or origin branches!'); 40 40 } 41 41 42 42 $order = '-creatordate'; ··· 114 114 $fields[$key] = '%('.$field.')'; 115 115 } 116 116 117 - return implode("%01", $fields); 117 + return implode('%01', $fields); 118 118 } 119 119 120 120 /**
+1 -1
src/applications/diffusion/query/lowlevel/DiffusionLowLevelQuery.php
··· 17 17 18 18 public function execute() { 19 19 if (!$this->getRepository()) { 20 - throw new Exception("Call setRepository() before execute()!"); 20 + throw new Exception('Call setRepository() before execute()!'); 21 21 } 22 22 23 23 return $this->executeQuery();
+2 -2
src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php
··· 31 31 $result = $this->resolveSubversionRefs(); 32 32 break; 33 33 default: 34 - throw new Exception("Unsupported repository type!"); 34 + throw new Exception('Unsupported repository type!'); 35 35 } 36 36 37 37 return $result; ··· 46 46 47 47 $lines = explode("\n", rtrim($stdout, "\n")); 48 48 if (count($lines) !== count($this->refs)) { 49 - throw new Exception("Unexpected line count from `git cat-file`!"); 49 + throw new Exception('Unexpected line count from `git cat-file`!'); 50 50 } 51 51 52 52 $hits = array();
+1 -1
src/applications/diffusion/query/rawdiff/DiffusionGitRawDiffQuery.php
··· 28 28 $path = nonempty($drequest->getPath(), '.'); 29 29 30 30 $future = $repository->getLocalCommandFuture( 31 - "diff %C %s %s -- %s", 31 + 'diff %C %s %s -- %s', 32 32 $options, 33 33 $against, 34 34 $commit,
+1 -1
src/applications/diffusion/request/DiffusionGitRequest.php
··· 17 17 if ($this->repository) { 18 18 return $this->repository->getDefaultBranch(); 19 19 } 20 - throw new Exception("Unable to determine branch!"); 20 + throw new Exception('Unable to determine branch!'); 21 21 } 22 22 23 23 protected function getResolvableBranchName($branch) {
+1 -1
src/applications/diffusion/request/DiffusionMercurialRequest.php
··· 19 19 return $this->repository->getDefaultBranch(); 20 20 } 21 21 22 - throw new Exception("Unable to determine branch!"); 22 + throw new Exception('Unable to determine branch!'); 23 23 } 24 24 25 25 }
+2 -2
src/applications/diffusion/request/DiffusionRequest.php
··· 163 163 $class = idx($map, $repository->getVersionControlSystem()); 164 164 165 165 if (!$class) { 166 - throw new Exception("Unknown version control system!"); 166 + throw new Exception('Unknown version control system!'); 167 167 } 168 168 169 169 $object = new $class(); ··· 665 665 // Prevent any hyjinx since we're ultimately shipping this to the 666 666 // filesystem under a lot of workflows. 667 667 if ($part == '..') { 668 - throw new Exception("Invalid path URI."); 668 + throw new Exception('Invalid path URI.'); 669 669 } 670 670 } 671 671
+2 -2
src/applications/diffusion/ssh/DiffusionSSHMercurialServeWorkflow.php
··· 32 32 $args = $this->getArgs(); 33 33 34 34 if (!$args->getArg('stdio')) { 35 - throw new Exception("Expected `hg ... --stdio`!"); 35 + throw new Exception('Expected `hg ... --stdio`!'); 36 36 } 37 37 38 38 if ($args->getArg('command') !== array('serve')) { 39 - throw new Exception("Expected `hg ... serve`!"); 39 + throw new Exception('Expected `hg ... serve`!'); 40 40 } 41 41 42 42 $command = csprintf('hg -R %s serve --stdio', $repository->getLocalPath());
+1 -1
src/applications/diffusion/ssh/DiffusionSSHSubversionServeWorkflow.php
··· 35 35 protected function executeRepositoryOperations() { 36 36 $args = $this->getArgs(); 37 37 if (!$args->getArg('tunnel')) { 38 - throw new Exception("Expected `svnserve -t`!"); 38 + throw new Exception('Expected `svnserve -t`!'); 39 39 } 40 40 41 41 $command = csprintf(
+2 -2
src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
··· 8 8 9 9 public function getRepository() { 10 10 if (!$this->repository) { 11 - throw new Exception("Call loadRepository() before getRepository()!"); 11 + throw new Exception('Call loadRepository() before getRepository()!'); 12 12 } 13 13 return $this->repository; 14 14 } ··· 62 62 'Unrecognized repository path "%s". Expected a path like '. 63 63 '"%s".', 64 64 $path, 65 - "/diffusion/X/")); 65 + '/diffusion/X/')); 66 66 } 67 67 68 68 $callsign = $matches[1];
+3 -3
src/applications/diffusion/view/DiffusionCommentView.php
··· 114 114 $actions = array(); 115 115 if ($action == PhabricatorAuditActionConstants::ADD_CCS) { 116 116 $rendered_ccs = $this->renderHandleList($added_ccs); 117 - $actions[] = pht("%s added CCs: %s.", $author_link, $rendered_ccs); 117 + $actions[] = pht('%s added CCs: %s.', $author_link, $rendered_ccs); 118 118 } else if ($action == PhabricatorAuditActionConstants::ADD_AUDITORS) { 119 119 $rendered_auditors = $this->renderHandleList($added_auditors); 120 120 $actions[] = pht( 121 - "%s added auditors: %s.", 121 + '%s added auditors: %s.', 122 122 $author_link, 123 123 $rendered_auditors); 124 124 } else { 125 - $actions[] = hsprintf("%s %s this commit.", $author_link, $verb); 125 + $actions[] = hsprintf('%s %s this commit.', $author_link, $verb); 126 126 } 127 127 128 128 foreach ($actions as $key => $action) {
+3 -3
src/applications/diffusion/view/DiffusionEmptyResultView.php
··· 32 32 $title = pht('Path Does Not Exist'); 33 33 // TODO: Under git, this error message should be more specific. It 34 34 // may exist on some other branch. 35 - $body = pht("This path does not exist anywhere."); 35 + $body = pht('This path does not exist anywhere.'); 36 36 $severity = AphrontErrorView::SEVERITY_ERROR; 37 37 break; 38 38 case DiffusionBrowseResultSet::REASON_IS_EMPTY: ··· 54 54 55 55 $title = pht('Path Was Deleted'); 56 56 $body = pht( 57 - "This path does not exist at %s. It was deleted in %s and last %s ". 58 - "at %s.", 57 + 'This path does not exist at %s. It was deleted in %s and last %s '. 58 + 'at %s.', 59 59 $commit, 60 60 self::linkCommit($drequest->getRepository(), $deleted), 61 61 $browse,
+5 -5
src/applications/diviner/atom/DivinerAtom.php
··· 95 95 96 96 public function getDocblockText() { 97 97 if ($this->docblockText === null) { 98 - throw new Exception("Call setDocblockRaw() before getDocblockText()!"); 98 + throw new Exception('Call setDocblockRaw() before getDocblockText()!'); 99 99 } 100 100 return $this->docblockText; 101 101 } 102 102 103 103 public function getDocblockMeta() { 104 104 if ($this->docblockMeta === null) { 105 - throw new Exception("Call setDocblockRaw() before getDocblockMeta()!"); 105 + throw new Exception('Call setDocblockRaw() before getDocblockMeta()!'); 106 106 } 107 107 return $this->docblockMeta; 108 108 } ··· 248 248 249 249 public function setParentHash($parent_hash) { 250 250 if ($this->parentHash) { 251 - throw new Exception("Atom already has a parent!"); 251 + throw new Exception('Atom already has a parent!'); 252 252 } 253 253 $this->parentHash = $parent_hash; 254 254 return $this; ··· 260 260 261 261 public function setParent(DivinerAtom $atom) { 262 262 if ($this->parentHash) { 263 - throw new Exception("Parent hash has already been computed!"); 263 + throw new Exception('Parent hash has already been computed!'); 264 264 } 265 265 $this->parent = $atom; 266 266 return $this; ··· 275 275 276 276 public function addChild(DivinerAtom $atom) { 277 277 if ($this->childHashes) { 278 - throw new Exception("Child hashes have already been computed!"); 278 + throw new Exception('Child hashes have already been computed!'); 279 279 } 280 280 281 281 $atom->setParent($this);
+1 -1
src/applications/diviner/atomizer/DivinerArticleAtomizer.php
··· 16 16 $title = idx($meta, 'title'); 17 17 if (!strlen($title)) { 18 18 $title = pht('Untitled Article "%s"', basename($file_name)); 19 - $atom->addWarning("Article has no @title!"); 19 + $atom->addWarning('Article has no @title!'); 20 20 $atom->setDocblockMetaValue('title', $title); 21 21 } 22 22
+2 -2
src/applications/diviner/publisher/DivinerPublisher.php
··· 74 74 $shash = $atom->getRef()->toHash(); 75 75 76 76 if (empty($this->symbolReverseMap[$shash])) { 77 - throw new Exception("Atom has no symbol map entry!"); 77 + throw new Exception('Atom has no symbol map entry!'); 78 78 } 79 79 80 80 $hashes = $this->symbolReverseMap[$shash]; ··· 107 107 $index++; 108 108 } 109 109 110 - throw new Exception("Expected to find atom while disambiguating!"); 110 + throw new Exception('Expected to find atom while disambiguating!'); 111 111 } 112 112 113 113
+3 -3
src/applications/diviner/workflow/DivinerAtomizeWorkflow.php
··· 36 36 37 37 $atomizer_class = $args->getArg('atomizer'); 38 38 if (!$atomizer_class) { 39 - throw new Exception("Specify an atomizer class with --atomizer."); 39 + throw new Exception('Specify an atomizer class with --atomizer.'); 40 40 } 41 41 42 42 $symbols = id(new PhutilSymbolLoader()) ··· 54 54 55 55 $files = $args->getArg('files'); 56 56 if (!$files) { 57 - throw new Exception("Specify one or more files to atomize."); 57 + throw new Exception('Specify one or more files to atomize.'); 58 58 } 59 59 60 60 $file_atomizer = new DivinerFileAtomizer(); ··· 98 98 $all_atoms[] = $file_atoms; 99 99 100 100 if (count($file_atoms) !== 1) { 101 - throw new Exception("Expected exactly one atom from file atomizer."); 101 + throw new Exception('Expected exactly one atom from file atomizer.'); 102 102 } 103 103 $file_atom = head($file_atoms); 104 104
+3 -3
src/applications/diviner/workflow/DivinerGenerateWorkflow.php
··· 192 192 193 193 if ($futures) { 194 194 $this->resolveAtomizerFutures($futures, $file_hashes); 195 - $this->log(pht("Atomization complete.")); 195 + $this->log(pht('Atomization complete.')); 196 196 } else { 197 - $this->log(pht("Atom cache is up to date, no files to atomize.")); 197 + $this->log(pht('Atom cache is up to date, no files to atomize.')); 198 198 } 199 199 200 - $this->log(pht("Writing atom cache.")); 200 + $this->log(pht('Writing atom cache.')); 201 201 202 202 $this->getAtomCache()->saveAtoms(); 203 203
+1 -1
src/applications/diviner/workflow/DivinerWorkflow.php
··· 20 20 protected function readBookConfiguration($book_path) { 21 21 if ($book_path === null) { 22 22 throw new PhutilArgumentUsageException( 23 - "Specify a Diviner book configuration file with --book."); 23 + 'Specify a Diviner book configuration file with --book.'); 24 24 } 25 25 26 26 $book_data = Filesystem::readFile($book_path);
+1 -1
src/applications/doorkeeper/engine/DoorkeeperObjectRef.php
··· 30 30 public function getExternalObject() { 31 31 if (!$this->externalObject) { 32 32 throw new Exception( 33 - "Call attachExternalObject() before getExternalObject()!"); 33 + 'Call attachExternalObject() before getExternalObject()!'); 34 34 } 35 35 return $this->externalObject; 36 36 }
+6 -6
src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Integration with Asana"); 7 + return pht('Integration with Asana'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Asana integration options."); 11 + return pht('Asana integration options.'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 return array( 16 16 $this->newOption('asana.workspace-id', 'string', null) 17 - ->setSummary(pht("Asana Workspace ID to publish into.")) 17 + ->setSummary(pht('Asana Workspace ID to publish into.')) 18 18 ->setDescription( 19 19 pht( 20 20 'To enable synchronization into Asana, enter an Asana Workspace '. ··· 22 22 "\n\n". 23 23 "NOTE: This feature is new and experimental.")), 24 24 $this->newOption('asana.project-ids', 'wild', null) 25 - ->setSummary(pht("Optional Asana projects to use as application tags.")) 25 + ->setSummary(pht('Optional Asana projects to use as application tags.')) 26 26 ->setDescription( 27 27 pht( 28 28 'When Phabricator creates tasks in Asana, it can add the tasks '. ··· 83 83 } 84 84 85 85 $out = array(); 86 - $out[] = pht("| Workspace ID | Workspace Name |"); 87 - $out[] = "| ------------ | -------------- |"; 86 + $out[] = pht('| Workspace ID | Workspace Name |'); 87 + $out[] = '| ------------ | -------------- |'; 88 88 foreach ($workspaces as $workspace) { 89 89 $out[] = sprintf('| `%s` | `%s` |', $workspace['id'], $workspace['name']); 90 90 }
+1 -1
src/applications/doorkeeper/worker/DoorkeeperFeedWorkerAsana.php
··· 143 143 144 144 $this->makeAsanaAPICall( 145 145 $oauth_token, 146 - "tasks/".$parent_ref->getObjectID(), 146 + 'tasks/'.$parent_ref->getObjectID(), 147 147 'PUT', 148 148 $main_data); 149 149 } else {
+3 -3
src/applications/drydock/blueprint/DrydockBlueprintImplementation.php
··· 45 45 protected function getInstance() { 46 46 if (!$this->instance) { 47 47 throw new Exception( 48 - "Attach the blueprint instance to the implementation."); 48 + 'Attach the blueprint instance to the implementation.'); 49 49 } 50 50 51 51 return $this->instance; ··· 279 279 $lease->saveTransaction(); 280 280 281 281 if (!$released) { 282 - throw new Exception("Unable to release lease: lease not active!"); 282 + throw new Exception('Unable to release lease: lease not active!'); 283 283 } 284 284 285 285 } ··· 444 444 445 445 if (($this->activeResource !== null) || 446 446 ($this->activeLease !== null)) { 447 - throw new Exception("There is already an active resource or lease!"); 447 + throw new Exception('There is already an active resource or lease!'); 448 448 } 449 449 450 450 $this->activeResource = $resource;
+2 -2
src/applications/drydock/blueprint/DrydockLocalHostBlueprintImplementation.php
··· 43 43 $resource = $this->newResourceTemplate('Host (localhost)'); 44 44 $resource->setStatus(DrydockResourceStatus::STATUS_OPEN); 45 45 $resource->setAttribute('path', $path); 46 - $resource->setAttribute('remote', "false"); 47 - $resource->setAttribute('preallocated', "false"); 46 + $resource->setAttribute('remote', 'false'); 47 + $resource->setAttribute('preallocated', 'false'); 48 48 $resource->save(); 49 49 50 50 return $resource;
+1 -1
src/applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php
··· 53 53 case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: 54 54 break; 55 55 default: 56 - throw new Exception("Unsupported VCS!"); 56 + throw new Exception('Unsupported VCS!'); 57 57 } 58 58 59 59 // TODO: Policy stuff here too.
+1 -1
src/applications/drydock/interface/command/DrydockSSHCommandInterface.php
··· 17 17 18 18 if ($credential->getProvidesType() !== 19 19 PassphraseCredentialTypeSSHPrivateKey::PROVIDES_TYPE) { 20 - throw new Exception("Only private key credentials are supported."); 20 + throw new Exception('Only private key credentials are supported.'); 21 21 } 22 22 23 23 $this->passphraseSSHKey = PassphraseSSHKey::loadFromPHID(
+3 -3
src/applications/drydock/interface/filesystem/DrydockSFTPFilesystemInterface.php
··· 17 17 18 18 if ($credential->getProvidesType() !== 19 19 PassphraseCredentialTypeSSHPrivateKey::PROVIDES_TYPE) { 20 - throw new Exception("Only private key credentials are supported."); 20 + throw new Exception('Only private key credentials are supported.'); 21 21 } 22 22 23 23 $this->passphraseSSHKey = PassphraseSSHKey::loadFromPHID( ··· 39 39 public function readFile($path) { 40 40 $target = new TempFile(); 41 41 $future = $this->getExecFuture($path); 42 - $future->write(csprintf("get %s %s", $path, $target)); 42 + $future->write(csprintf('get %s %s', $path, $target)); 43 43 $future->resolvex(); 44 44 return Filesystem::readFile($target); 45 45 } ··· 58 58 $source = new TempFile(); 59 59 Filesystem::writeFile($source, $data); 60 60 $future = $this->getExecFuture($path); 61 - $future->write(csprintf("put %s %s", $source, $path)); 61 + $future->write(csprintf('put %s %s', $source, $path)); 62 62 $future->resolvex(); 63 63 } 64 64
+1 -1
src/applications/drydock/management/DrydockManagementCloseWorkflow.php
··· 22 22 $ids = $args->getArg('ids'); 23 23 if (!$ids) { 24 24 throw new PhutilArgumentUsageException( 25 - "Specify one or more resource IDs to close."); 25 + 'Specify one or more resource IDs to close.'); 26 26 } 27 27 28 28 $viewer = $this->getViewer();
+3 -3
src/applications/drydock/management/DrydockManagementCreateResourceWorkflow.php
··· 33 33 $resource_name = $args->getArg('name'); 34 34 if (!$resource_name) { 35 35 throw new PhutilArgumentUsageException( 36 - "Specify a resource name with `--name`."); 36 + 'Specify a resource name with `--name`.'); 37 37 } 38 38 39 39 $blueprint_id = $args->getArg('blueprint'); 40 40 if (!$blueprint_id) { 41 41 throw new PhutilArgumentUsageException( 42 - "Specify a blueprint ID with `--blueprint`."); 42 + 'Specify a blueprint ID with `--blueprint`.'); 43 43 } 44 44 45 45 $attributes = $args->getArg('attributes'); ··· 57 57 ->executeOne(); 58 58 if (!$blueprint) { 59 59 throw new PhutilArgumentUsageException( 60 - "Specified blueprint does not exist."); 60 + 'Specified blueprint does not exist.'); 61 61 } 62 62 63 63 $resource = id(new DrydockResource())
+1 -1
src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
··· 28 28 $resource_type = $args->getArg('type'); 29 29 if (!$resource_type) { 30 30 throw new PhutilArgumentUsageException( 31 - "Specify a resource type with `--type`."); 31 + 'Specify a resource type with `--type`.'); 32 32 } 33 33 34 34 $attributes = $args->getArg('attributes');
+1 -1
src/applications/drydock/management/DrydockManagementReleaseWorkflow.php
··· 22 22 $ids = $args->getArg('ids'); 23 23 if (!$ids) { 24 24 throw new PhutilArgumentUsageException( 25 - "Specify one or more lease IDs to release."); 25 + 'Specify one or more lease IDs to release.'); 26 26 } 27 27 28 28 $viewer = $this->getViewer();
+7 -7
src/applications/drydock/storage/DrydockLease.php
··· 85 85 public function queueForActivation() { 86 86 if ($this->getID()) { 87 87 throw new Exception( 88 - "Only new leases may be queued for activation!"); 88 + 'Only new leases may be queued for activation!'); 89 89 } 90 90 91 91 $this->setStatus(DrydockLeaseStatus::STATUS_PENDING); ··· 128 128 private function assertActive() { 129 129 if (!$this->isActive()) { 130 130 throw new Exception( 131 - "Lease is not active! You can not interact with resources through ". 132 - "an inactive lease."); 131 + 'Lease is not active! You can not interact with resources through '. 132 + 'an inactive lease.'); 133 133 } 134 134 } 135 135 ··· 149 149 unset($unresolved[$key]); 150 150 break; 151 151 case DrydockLeaseStatus::STATUS_RELEASED: 152 - throw new Exception("Lease has already been released!"); 152 + throw new Exception('Lease has already been released!'); 153 153 case DrydockLeaseStatus::STATUS_EXPIRED: 154 - throw new Exception("Lease has already expired!"); 154 + throw new Exception('Lease has already expired!'); 155 155 case DrydockLeaseStatus::STATUS_BROKEN: 156 - throw new Exception("Lease has been broken!"); 156 + throw new Exception('Lease has been broken!'); 157 157 case DrydockLeaseStatus::STATUS_PENDING: 158 158 case DrydockLeaseStatus::STATUS_ACQUIRING: 159 159 break; 160 160 default: 161 - throw new Exception("Unknown status??"); 161 + throw new Exception('Unknown status??'); 162 162 } 163 163 } 164 164
+2 -2
src/applications/drydock/worker/DrydockAllocatorWorker.php
··· 19 19 ->executeOne(); 20 20 if (!$lease) { 21 21 throw new PhabricatorWorkerPermanentFailureException( 22 - pht("No such lease %d!", $this->getTaskData())); 22 + pht('No such lease %d!', $this->getTaskData())); 23 23 } 24 24 $this->lease = $lease; 25 25 } ··· 170 170 // and then switch them to "OPEN" only after the allocating lease gets 171 171 // its grubby mitts on the resource. This might make more sense but 172 172 // is a bit messy. 173 - throw new Exception("Lost an allocation race?"); 173 + throw new Exception('Lost an allocation race?'); 174 174 } 175 175 } 176 176
+1 -1
src/applications/fact/controller/PhabricatorFactChartController.php
··· 32 32 33 33 if (!$points) { 34 34 // NOTE: Raphael crashes Safari if you hand it series with no points. 35 - throw new Exception("No data to show!"); 35 + throw new Exception('No data to show!'); 36 36 } 37 37 38 38 // Limit amount of data passed to browser.
+2 -2
src/applications/fact/daemon/PhabricatorFactDaemon.php
··· 15 15 } 16 16 $this->processAggregates(); 17 17 18 - $this->log("Zzz..."); 18 + $this->log('Zzz...'); 19 19 $this->sleep(60 * 5); 20 20 } 21 21 } ··· 91 91 } 92 92 93 93 public function processAggregates() { 94 - $this->log("Processing aggregates."); 94 + $this->log('Processing aggregates.'); 95 95 96 96 $facts = $this->computeAggregateFacts(); 97 97 $this->updateAggregateFacts($facts);
+3 -3
src/applications/fact/management/PhabricatorFactManagementCursorsWorkflow.php
··· 31 31 'name = %s', 32 32 $name); 33 33 if ($cursor) { 34 - $console->writeOut("%s\n", pht("Resetting cursor %s...", $name)); 34 + $console->writeOut("%s\n", pht('Resetting cursor %s...', $name)); 35 35 $cursor->delete(); 36 36 } else { 37 37 $console->writeErr( 38 38 "%s\n", 39 - pht("Cursor %s does not exist or is already reset.", $name)); 39 + pht('Cursor %s does not exist or is already reset.', $name)); 40 40 } 41 41 } 42 42 return 0; ··· 44 44 45 45 $iterator_map = PhabricatorFactDaemon::getAllApplicationIterators(); 46 46 if (!$iterator_map) { 47 - $console->writeErr("%s\n", pht("No cursors.")); 47 + $console->writeErr("%s\n", pht('No cursors.')); 48 48 return 0; 49 49 } 50 50
+2 -2
src/applications/feed/PhabricatorFeedStoryPublisher.php
··· 65 65 public function publish() { 66 66 $class = $this->storyType; 67 67 if (!$class) { 68 - throw new Exception("Call setStoryType() before publishing!"); 68 + throw new Exception('Call setStoryType() before publishing!'); 69 69 } 70 70 71 71 if (!class_exists($class)) { ··· 140 140 141 141 if (!$this->primaryObjectPHID) { 142 142 throw new Exception( 143 - "You must call setPrimaryObjectPHID() if you setSubscribedPHIDs()!"); 143 + 'You must call setPrimaryObjectPHID() if you setSubscribedPHIDs()!'); 144 144 } 145 145 146 146 $notif = new PhabricatorFeedStoryNotification();
+1 -1
src/applications/feed/conduit/ConduitAPI_feed_publish_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return "Publish a story to the feed."; 14 + return 'Publish a story to the feed.'; 15 15 } 16 16 17 17 public function defineParamTypes() {
+1 -1
src/applications/feed/conduit/ConduitAPI_feed_query_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return "Query the feed for stories"; 14 + return 'Query the feed for stories'; 15 15 } 16 16 17 17 private function getDefaultLimit() {
+4 -4
src/applications/feed/management/PhabricatorFeedManagementRepublishWorkflow.php
··· 26 26 $key = $args->getArg('key'); 27 27 if (count($key) < 1) { 28 28 throw new PhutilArgumentUsageException( 29 - pht("Specify a story key to republish.")); 29 + pht('Specify a story key to republish.')); 30 30 } else if (count($key) > 1) { 31 31 throw new PhutilArgumentUsageException( 32 - pht("Specify exactly one story key to republish.")); 32 + pht('Specify exactly one story key to republish.')); 33 33 } 34 34 $key = head($key); 35 35 ··· 43 43 pht('No story exists with key "%s"!', $key)); 44 44 } 45 45 46 - $console->writeOut("%s\n", pht("Republishing story...")); 46 + $console->writeOut("%s\n", pht('Republishing story...')); 47 47 48 48 PhabricatorWorker::setRunAllTasksInProcess(true); 49 49 ··· 53 53 'key' => $key, 54 54 )); 55 55 56 - $console->writeOut("%s\n", pht("Done.")); 56 + $console->writeOut("%s\n", pht('Done.')); 57 57 58 58 return 0; 59 59 }
+1 -1
src/applications/feed/story/PhabricatorFeedStory.php
··· 163 163 public function getPrimaryObject() { 164 164 $phid = $this->getPrimaryObjectPHID(); 165 165 if (!$phid) { 166 - throw new Exception("Story has no primary object!"); 166 + throw new Exception('Story has no primary object!'); 167 167 } 168 168 return $this->getObject($phid); 169 169 }
+1 -1
src/applications/feed/story/PhabricatorFeedStoryAggregate.php
··· 68 68 69 69 final public function getNotificationAggregations() { 70 70 throw new Exception( 71 - "You can not get aggregations for an aggregate story."); 71 + 'You can not get aggregations for an aggregate story.'); 72 72 } 73 73 74 74 }
+2 -2
src/applications/feed/story/PhabricatorFeedStoryCommit.php
··· 38 38 39 39 if ($author) { 40 40 $title = pht( 41 - "%s committed %s (authored by %s)", 41 + '%s committed %s (authored by %s)', 42 42 $committer, 43 43 $commit, 44 44 $author); 45 45 } else { 46 46 $title = pht( 47 - "%s committed %s", 47 + '%s committed %s', 48 48 $committer, 49 49 $commit); 50 50 }
+5 -5
src/applications/files/PhabricatorImageTransformer.php
··· 388 388 $text_height = abs($bbox[3] - $bbox[5]); 389 389 $text_width = abs($bbox[0] - $bbox[2]); 390 390 return array( 391 - "doesfit" => ($text_height * 1.05 <= imagesy($img) / 2 391 + 'doesfit' => ($text_height * 1.05 <= imagesy($img) / 2 392 392 && $text_width * 1.05 <= imagesx($img)), 393 - "txtwidth" => $text_width, 394 - "txtheight" => $text_height, 395 - "imgwidth" => imagesx($img), 396 - "imgheight" => imagesy($img), 393 + 'txtwidth' => $text_width, 394 + 'txtheight' => $text_height, 395 + 'imgwidth' => imagesx($img), 396 + 'imgheight' => imagesy($img), 397 397 ); 398 398 } 399 399
+1 -1
src/applications/files/conduit/ConduitAPI_file_download_Method.php
··· 7 7 extends ConduitAPI_file_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Download a file from the server."; 10 + return 'Download a file from the server.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/files/conduit/ConduitAPI_file_info_Method.php
··· 6 6 final class ConduitAPI_file_info_Method extends ConduitAPI_file_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Get information about a file."; 9 + return 'Get information about a file.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+1 -1
src/applications/files/conduit/ConduitAPI_file_upload_Method.php
··· 6 6 final class ConduitAPI_file_upload_Method extends ConduitAPI_file_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Upload a file to the server."; 9 + return 'Upload a file to the server.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+1 -1
src/applications/files/conduit/ConduitAPI_file_uploadhash_Method.php
··· 6 6 final class ConduitAPI_file_uploadhash_Method extends ConduitAPI_file_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Upload a file to the server using content hash."; 9 + return 'Upload a file to the server using content hash.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+11 -11
src/applications/files/config/PhabricatorFilesConfigOptions.php
··· 7 7 extends PhabricatorApplicationConfigOptions { 8 8 9 9 public function getName() { 10 - return pht("Files"); 10 + return pht('Files'); 11 11 } 12 12 13 13 public function getDescription() { 14 - return pht("Configure files and file storage."); 14 + return pht('Configure files and file storage.'); 15 15 } 16 16 17 17 public function getOptions() { ··· 146 146 ->setSummary(pht('Storage engine selector.')) 147 147 ->setDescription( 148 148 pht( 149 - "Phabricator uses a storage engine selector to choose which ". 150 - "storage engine to use when writing file data. If you add new ". 151 - "storage engines or want to provide very custom rules (e.g., ". 152 - "write images to one storage engine and other files to a ". 153 - "different one), you can provide an alternate implementation ". 154 - "here. The default engine will use choose MySQL, Local Disk, and ". 155 - "S3, in that order, if they have valid configurations above and ". 156 - "a file fits within configured limits.")), 149 + 'Phabricator uses a storage engine selector to choose which '. 150 + 'storage engine to use when writing file data. If you add new '. 151 + 'storage engines or want to provide very custom rules (e.g., '. 152 + 'write images to one storage engine and other files to a '. 153 + 'different one), you can provide an alternate implementation '. 154 + 'here. The default engine will use choose MySQL, Local Disk, and '. 155 + 'S3, in that order, if they have valid configurations above and '. 156 + 'a file fits within configured limits.')), 157 157 $this->newOption('storage.upload-size-limit', 'string', null) 158 158 ->setSummary( 159 159 pht('Limit to users in interfaces which allow uploading.')) ··· 173 173 "limit.\n\n". 174 174 "Specify this limit in bytes, or using a 'K', 'M', or 'G' ". 175 175 "suffix.")) 176 - ->addExample('10M', pht("Allow Uploads 10MB or Smaller")), 176 + ->addExample('10M', pht('Allow Uploads 10MB or Smaller')), 177 177 $this->newOption( 178 178 'metamta.files.public-create-email', 179 179 'string',
+1 -1
src/applications/files/controller/PhabricatorFileInfoController.php
··· 41 41 if ($ttl !== null) { 42 42 $ttl_tag = id(new PHUITagView()) 43 43 ->setType(PHUITagView::TYPE_OBJECT) 44 - ->setName(pht("Temporary")); 44 + ->setName(pht('Temporary')); 45 45 $header->addTag($ttl_tag); 46 46 } 47 47
+1 -1
src/applications/files/controller/PhabricatorFileTransformController.php
··· 119 119 $suffix = '60x45'; 120 120 break; 121 121 default: 122 - throw new Exception("Unsupported transformation type!"); 122 + throw new Exception('Unsupported transformation type!'); 123 123 } 124 124 125 125 $path = celerity_get_resource_uri(
+4 -4
src/applications/files/engineselector/PhabricatorDefaultFileStorageEngineSelector.php
··· 42 42 // a little vague ("No valid storage engines"). Since this is a default 43 43 // case, throw a more specific exception. 44 44 throw new Exception( 45 - "This file exceeds the configured MySQL storage engine filesize ". 46 - "limit, but no other storage engines are configured. Increase the ". 47 - "MySQL storage engine limit or configure a storage engine suitable ". 48 - "for larger files."); 45 + 'This file exceeds the configured MySQL storage engine filesize '. 46 + 'limit, but no other storage engines are configured. Increase the '. 47 + 'MySQL storage engine limit or configure a storage engine suitable '. 48 + 'for larger files.'); 49 49 } 50 50 51 51 return $engines;
+7 -7
src/applications/files/exception/PhabricatorFileUploadException.php
··· 8 8 "Uploaded file is too large: file is larger than the ". 9 9 "'upload_max_filesize' setting in php.ini.", 10 10 UPLOAD_ERR_FORM_SIZE => 11 - "File is too large.", 11 + 'File is too large.', 12 12 UPLOAD_ERR_PARTIAL => 13 - "File was only partially transferred, upload did not complete.", 13 + 'File was only partially transferred, upload did not complete.', 14 14 UPLOAD_ERR_NO_FILE => 15 - "No file was uploaded.", 15 + 'No file was uploaded.', 16 16 UPLOAD_ERR_NO_TMP_DIR => 17 - "Unable to write file: temporary directory does not exist.", 17 + 'Unable to write file: temporary directory does not exist.', 18 18 UPLOAD_ERR_CANT_WRITE => 19 - "Unable to write file: failed to write to temporary directory.", 19 + 'Unable to write file: failed to write to temporary directory.', 20 20 UPLOAD_ERR_EXTENSION => 21 - "Unable to upload: a PHP extension stopped the upload.", 21 + 'Unable to upload: a PHP extension stopped the upload.', 22 22 23 23 -1000 => 24 24 "Uploaded file exceeds limit in Phabricator ". 25 25 "'storage.upload-size-limit' configuration.", 26 26 ); 27 27 28 - $message = idx($map, $code, "Upload failed: unknown error."); 28 + $message = idx($map, $code, 'Upload failed: unknown error.'); 29 29 parent::__construct($message, $code); 30 30 } 31 31 }
+1 -1
src/applications/files/management/PhabricatorFilesManagementEnginesWorkflow.php
··· 15 15 16 16 $engines = PhabricatorFile::buildAllEngines(); 17 17 if (!$engines) { 18 - throw new Exception("No storage engines are available."); 18 + throw new Exception('No storage engines are available.'); 19 19 } 20 20 21 21 foreach ($engines as $engine) {
+4 -4
src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php
··· 35 35 $engine_id = $args->getArg('engine'); 36 36 if (!$engine_id) { 37 37 throw new PhutilArgumentUsageException( 38 - "Specify an engine to migrate to with `--engine`. ". 39 - "Use `files engines` to get a list of engines."); 38 + 'Specify an engine to migrate to with `--engine`. '. 39 + 'Use `files engines` to get a list of engines.'); 40 40 } 41 41 42 42 $engine = PhabricatorFile::buildEngine($engine_id); ··· 44 44 $iterator = $this->buildIterator($args); 45 45 if (!$iterator) { 46 46 throw new PhutilArgumentUsageException( 47 - "Either specify a list of files to migrate, or use `--all` ". 48 - "to migrate all files."); 47 + 'Either specify a list of files to migrate, or use `--all` '. 48 + 'to migrate all files.'); 49 49 } 50 50 51 51 $is_dry_run = $args->getArg('dry-run');
+2 -2
src/applications/files/management/PhabricatorFilesManagementPurgeWorkflow.php
··· 30 30 $iterator = $this->buildIterator($args); 31 31 if (!$iterator) { 32 32 throw new PhutilArgumentUsageException( 33 - "Either specify a list of files to purge, or use `--all` ". 34 - "to purge all files."); 33 + 'Either specify a list of files to purge, or use `--all` '. 34 + 'to purge all files.'); 35 35 } 36 36 37 37 $is_dry_run = $args->getArg('dry-run');
+3 -3
src/applications/files/management/PhabricatorFilesManagementRebuildWorkflow.php
··· 38 38 $iterator = $this->buildIterator($args); 39 39 if (!$iterator) { 40 40 throw new PhutilArgumentUsageException( 41 - "Either specify a list of files to update, or use `--all` ". 42 - "to update all files."); 41 + 'Either specify a list of files to update, or use `--all` '. 42 + 'to update all files.'); 43 43 } 44 44 45 45 $update = array( ··· 116 116 } 117 117 118 118 $console->writeOut( 119 - "%s: Updating metadata... ", 119 + '%s: Updating metadata... ', 120 120 $fid); 121 121 122 122 try {
+1 -1
src/applications/files/management/PhabricatorFilesManagementWorkflow.php
··· 9 9 if ($args->getArg('all')) { 10 10 if ($names) { 11 11 throw new PhutilArgumentUsageException( 12 - "Specify either a list of files or `--all`, but not both."); 12 + 'Specify either a list of files or `--all`, but not both.'); 13 13 } 14 14 return new LiskMigrationIterator(new PhabricatorFile()); 15 15 }
+12 -12
src/applications/files/storage/PhabricatorFile.php
··· 61 61 62 62 public static function readUploadedFileData($spec) { 63 63 if (!$spec) { 64 - throw new Exception("No file was uploaded!"); 64 + throw new Exception('No file was uploaded!'); 65 65 } 66 66 67 67 $err = idx($spec, 'error'); ··· 72 72 $tmp_name = idx($spec, 'tmp_name'); 73 73 $is_valid = @is_uploaded_file($tmp_name); 74 74 if (!$is_valid) { 75 - throw new Exception("File is not an uploaded file."); 75 + throw new Exception('File is not an uploaded file.'); 76 76 } 77 77 78 78 $file_data = Filesystem::readFile($tmp_name); 79 79 $file_size = idx($spec, 'size'); 80 80 81 81 if (strlen($file_data) != $file_size) { 82 - throw new Exception("File size disagrees with uploaded size."); 82 + throw new Exception('File size disagrees with uploaded size.'); 83 83 } 84 84 85 85 self::validateFileSize(strlen($file_data)); ··· 214 214 215 215 assert_instances_of($engines, 'PhabricatorFileStorageEngine'); 216 216 if (!$engines) { 217 - throw new Exception("No valid storage engines are available!"); 217 + throw new Exception('No valid storage engines are available!'); 218 218 } 219 219 220 220 $file = new PhabricatorFile(); ··· 248 248 249 249 if (!$data_handle) { 250 250 throw new PhutilAggregateException( 251 - "All storage engines failed to write file:", 251 + 'All storage engines failed to write file:', 252 252 $exceptions); 253 253 } 254 254 ··· 368 368 public static function newFromFileDownload($uri, array $params = array()) { 369 369 // Make sure we're allowed to make a request first 370 370 if (!PhabricatorEnv::getEnvConfig('security.allow-outbound-http')) { 371 - throw new Exception("Outbound HTTP requests are disabled!"); 371 + throw new Exception('Outbound HTTP requests are disabled!'); 372 372 } 373 373 374 374 $uri = new PhutilURI($uri); ··· 484 484 $data = $data; 485 485 break; 486 486 default: 487 - throw new Exception("Unknown storage format."); 487 + throw new Exception('Unknown storage format.'); 488 488 } 489 489 490 490 return $data; ··· 493 493 public function getViewURI() { 494 494 if (!$this->getPHID()) { 495 495 throw new Exception( 496 - "You must save a file before you can generate a view URI."); 496 + 'You must save a file before you can generate a view URI.'); 497 497 } 498 498 499 499 $name = phutil_escape_uri($this->getName()); ··· 694 694 public function updateDimensions($save = true) { 695 695 if (!$this->isViewableImage()) { 696 696 throw new Exception( 697 - "This file is not a viewable image."); 697 + 'This file is not a viewable image.'); 698 698 } 699 699 700 - if (!function_exists("imagecreatefromstring")) { 700 + if (!function_exists('imagecreatefromstring')) { 701 701 throw new Exception( 702 - "Cannot retrieve image information."); 702 + 'Cannot retrieve image information.'); 703 703 } 704 704 705 705 $data = $this->loadFileData(); ··· 707 707 $img = imagecreatefromstring($data); 708 708 if ($img === false) { 709 709 throw new Exception( 710 - "Error when decoding image."); 710 + 'Error when decoding image.'); 711 711 } 712 712 713 713 $this->metadata[self::METADATA_IMAGE_WIDTH] = imagesx($img);
+2 -2
src/applications/flag/conduit/ConduitAPI_flag_delete_Method.php
··· 6 6 final class ConduitAPI_flag_delete_Method extends ConduitAPI_flag_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Clear a flag."; 9 + return 'Clear a flag.'; 10 10 } 11 11 12 12 public function defineParamTypes() { ··· 39 39 if ($flag->getOwnerPHID() != $request->getUser()->getPHID()) { 40 40 throw new ConduitException('ERR_WRONG_USER'); 41 41 } 42 - } elseif ($object) { 42 + } else if ($object) { 43 43 $flag = id(new PhabricatorFlag())->loadOneWhere( 44 44 'objectPHID = %s AND ownerPHID = %s', 45 45 $object,
+1 -1
src/applications/flag/conduit/ConduitAPI_flag_edit_Method.php
··· 6 6 final class ConduitAPI_flag_edit_Method extends ConduitAPI_flag_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Create or modify a flag."; 9 + return 'Create or modify a flag.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+1 -1
src/applications/flag/conduit/ConduitAPI_flag_query_Method.php
··· 6 6 final class ConduitAPI_flag_query_Method extends ConduitAPI_flag_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Query flag markers."; 9 + return 'Query flag markers.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+3 -3
src/applications/flag/controller/PhabricatorFlagEditController.php
··· 45 45 $dialog = new AphrontDialogView(); 46 46 $dialog->setUser($user); 47 47 48 - $dialog->setTitle(pht("Flag %s", $type_name)); 48 + $dialog->setTitle(pht('Flag %s', $type_name)); 49 49 50 50 require_celerity_resource('phabricator-flag-css'); 51 51 ··· 56 56 if ($is_new) { 57 57 $form 58 58 ->appendChild(hsprintf( 59 - "<p>%s</p><br />", 59 + '<p>%s</p><br />', 60 60 pht('You can flag this %s if you want to remember to look '. 61 61 'at it later.', 62 62 $type_name))); ··· 85 85 86 86 $dialog->addCancelButton($handle->getURI()); 87 87 $dialog->addSubmitButton( 88 - $is_new ? pht("Create Flag") : pht('Save')); 88 + $is_new ? pht('Create Flag') : pht('Save')); 89 89 90 90 return id(new AphrontDialogResponse())->setDialog($dialog); 91 91 }
+1 -1
src/applications/harbormaster/controller/HarbormasterBuildViewController.php
··· 23 23 return new Aphront404Response(); 24 24 } 25 25 26 - $title = pht("Build %d", $id); 26 + $title = pht('Build %d', $id); 27 27 28 28 $header = id(new PHUIHeaderView()) 29 29 ->setHeader($title)
+1 -1
src/applications/harbormaster/controller/HarbormasterBuildableViewController.php
··· 36 36 37 37 $build_list = $this->buildBuildList($buildable); 38 38 39 - $title = pht("Buildable %d", $id); 39 + $title = pht('Buildable %d', $id); 40 40 41 41 $header = id(new PHUIHeaderView()) 42 42 ->setHeader($title)
+1 -1
src/applications/harbormaster/controller/HarbormasterPlanEditController.php
··· 97 97 } else { 98 98 $id = $plan->getID(); 99 99 $crumbs->addTextCrumb( 100 - pht("Plan %d", $id), 100 + pht('Plan %d', $id), 101 101 $this->getApplicationURI("plan/{$id}/")); 102 102 $crumbs->addTextCrumb(pht('Edit')); 103 103 }
+6 -6
src/applications/harbormaster/controller/HarbormasterPlanViewController.php
··· 34 34 ->setTransactions($xactions) 35 35 ->setShouldTerminate(true); 36 36 37 - $title = pht("Plan %d", $id); 37 + $title = pht('Plan %d', $id); 38 38 39 39 $header = id(new PHUIHeaderView()) 40 40 ->setHeader($title) ··· 48 48 $this->buildPropertyLists($box, $plan, $actions); 49 49 50 50 $crumbs = $this->buildApplicationCrumbs(); 51 - $crumbs->addTextCrumb(pht("Plan %d", $id)); 51 + $crumbs->addTextCrumb(pht('Plan %d', $id)); 52 52 53 53 list($step_list, $has_any_conflicts) = $this->buildStepList($plan); 54 54 ··· 122 122 ->addSigil('harbormaster-build-step-delete') 123 123 ->setWorkflow(true) 124 124 ->setRenderNameAsTooltip(true) 125 - ->setName(pht("Delete")) 125 + ->setName(pht('Delete')) 126 126 ->setHref( 127 - $this->getApplicationURI("step/delete/".$step->getID()."/"))); 127 + $this->getApplicationURI('step/delete/'.$step->getID().'/'))); 128 128 $step_list->addItem($item); 129 129 continue; 130 130 } 131 131 $item = id(new PHUIObjectItemView()) 132 - ->setObjectName("Step ".$i++) 132 + ->setObjectName('Step '.$i++) 133 133 ->setHeader($implementation->getName()); 134 134 135 135 $item->addAttribute($implementation->getDescription()); ··· 157 157 ->setWorkflow(true) 158 158 ->setDisabled(!$can_edit) 159 159 ->setHref( 160 - $this->getApplicationURI("step/delete/".$step->getID()."/"))); 160 + $this->getApplicationURI('step/delete/'.$step->getID().'/'))); 161 161 162 162 $inputs = $step->getStepImplementation()->getArtifactInputs(); 163 163 $outputs = $step->getStepImplementation()->getArtifactOutputs();
+1 -1
src/applications/harbormaster/controller/HarbormasterStepDeleteController.php
··· 23 23 ->withIDs(array($id)) 24 24 ->executeOne(); 25 25 if ($step === null) { 26 - throw new Exception("Build step not found!"); 26 + throw new Exception('Build step not found!'); 27 27 } 28 28 29 29 $plan_id = $step->getBuildPlan()->getID();
+2 -2
src/applications/harbormaster/step/HarbormasterCommandBuildStepImplementation.php
··· 38 38 39 39 $future = $interface->getExecFuture('%C', $command); 40 40 41 - $log_stdout = $build->createLog($build_target, "remote", "stdout"); 42 - $log_stderr = $build->createLog($build_target, "remote", "stderr"); 41 + $log_stdout = $build->createLog($build_target, 'remote', 'stdout'); 42 + $log_stderr = $build->createLog($build_target, 'remote', 'stderr'); 43 43 44 44 $start_stdout = $log_stdout->start(); 45 45 $start_stderr = $log_stderr->start();
+1 -1
src/applications/harbormaster/step/HarbormasterPublishFragmentBuildStepImplementation.php
··· 47 47 PhabricatorPolicies::getMostOpenPolicy(), 48 48 PhabricatorPolicies::POLICY_USER); 49 49 } else { 50 - if ($file->getMimeType() === "application/zip") { 50 + if ($file->getMimeType() === 'application/zip') { 51 51 $fragment->updateFromZIP(PhabricatorUser::getOmnipotentUser(), $file); 52 52 } else { 53 53 $fragment->updateFromFile(PhabricatorUser::getOmnipotentUser(), $file);
+2 -2
src/applications/harbormaster/step/HarbormasterWaitForPreviousBuildStepImplementation.php
··· 28 28 // finished. 29 29 $plan = $build->getBuildPlan(); 30 30 31 - $log = $build->createLog($build_target, "waiting", "blockers"); 31 + $log = $build->createLog($build_target, 'waiting', 'blockers'); 32 32 $log_start = $log->start(); 33 33 34 34 $blockers = $this->getBlockers($object, $plan, $build); 35 35 if ($blockers) { 36 - $log->append("Blocked by: ".implode(",", $blockers)."\n"); 36 + $log->append("Blocked by: ".implode(',', $blockers)."\n"); 37 37 } 38 38 $log->finalize($log_start); 39 39
+1 -1
src/applications/harbormaster/storage/build/HarbormasterBuild.php
··· 176 176 array($name)) 177 177 ->executeOne(); 178 178 if ($artifact === null) { 179 - throw new Exception("Artifact not found!"); 179 + throw new Exception('Artifact not found!'); 180 180 } 181 181 return $artifact; 182 182 }
+8 -8
src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php
··· 60 60 case self::TYPE_HOST: 61 61 $leases = id(new DrydockLeaseQuery()) 62 62 ->setViewer($viewer) 63 - ->withIDs(array($data["drydock-lease"])) 63 + ->withIDs(array($data['drydock-lease'])) 64 64 ->execute(); 65 - $lease = $leases[$data["drydock-lease"]]; 65 + $lease = $leases[$data['drydock-lease']]; 66 66 67 67 return id(new PHUIObjectItemView()) 68 68 ->setObjectName(pht('Drydock Lease')) ··· 76 76 public function loadDrydockLease() { 77 77 if ($this->getArtifactType() !== self::TYPE_HOST) { 78 78 throw new Exception( 79 - "`loadDrydockLease` may only be called on host artifacts."); 79 + '`loadDrydockLease` may only be called on host artifacts.'); 80 80 } 81 81 82 82 $data = $this->getArtifactData(); ··· 86 86 $lease = id(new DrydockLease())->load( 87 87 $data['drydock-lease']); 88 88 if ($lease === null) { 89 - throw new Exception("Associated Drydock lease not found!"); 89 + throw new Exception('Associated Drydock lease not found!'); 90 90 } 91 91 $resource = id(new DrydockResource())->load( 92 92 $lease->getResourceID()); 93 93 if ($resource === null) { 94 - throw new Exception("Associated Drydock resource not found!"); 94 + throw new Exception('Associated Drydock resource not found!'); 95 95 } 96 96 $lease->attachResource($resource); 97 97 ··· 101 101 public function loadPhabricatorFile() { 102 102 if ($this->getArtifactType() !== self::TYPE_FILE) { 103 103 throw new Exception( 104 - "`loadPhabricatorFile` may only be called on file artifacts."); 104 + '`loadPhabricatorFile` may only be called on file artifacts.'); 105 105 } 106 106 107 107 $data = $this->getArtifactData(); 108 108 109 109 // The data for TYPE_FILE is an array with a single PHID in it. 110 - $phid = $data["filePHID"]; 110 + $phid = $data['filePHID']; 111 111 112 112 $file = id(new PhabricatorFileQuery()) 113 113 ->setViewer(PhabricatorUser::getOmnipotentUser()) 114 114 ->withPHIDs(array($phid)) 115 115 ->executeOne(); 116 116 if ($file === null) { 117 - throw new Exception("Associated file not found!"); 117 + throw new Exception('Associated file not found!'); 118 118 } 119 119 return $file; 120 120 }
+8 -8
src/applications/harbormaster/storage/build/HarbormasterBuildLog.php
··· 53 53 54 54 public function start() { 55 55 if ($this->getLive()) { 56 - throw new Exception("Live logging has already started for this log."); 56 + throw new Exception('Live logging has already started for this log.'); 57 57 } 58 58 59 59 $this->setLive(1); ··· 64 64 65 65 public function append($content) { 66 66 if (!$this->getLive()) { 67 - throw new Exception("Start logging before appending data to the log."); 67 + throw new Exception('Start logging before appending data to the log.'); 68 68 } 69 69 if (strlen($content) === 0) { 70 70 return; ··· 97 97 'LIMIT 1', 98 98 $this->getID()); 99 99 if (count($result) === 0 || 100 - $result[0]["size"] + strlen($content) > self::CHUNK_BYTE_LIMIT || 101 - $result[0]["encoding"] !== self::ENCODING_TEXT) { 100 + $result[0]['size'] + strlen($content) > self::CHUNK_BYTE_LIMIT || 101 + $result[0]['encoding'] !== self::ENCODING_TEXT) { 102 102 103 103 // We must insert a new chunk because the data we are appending 104 104 // won't fit into the existing one, or we don't have any existing ··· 122 122 'WHERE id = %d', 123 123 $content, 124 124 $content, 125 - $result[0]["id"]); 125 + $result[0]['id']); 126 126 } 127 127 } 128 128 129 129 public function finalize($start = 0) { 130 130 if (!$this->getLive()) { 131 - throw new Exception("Start logging before finalizing it."); 131 + throw new Exception('Start logging before finalizing it.'); 132 132 } 133 133 134 134 // TODO: Encode the log contents in a gzipped format. ··· 157 157 'ORDER BY id ASC', 158 158 $this->getID()); 159 159 160 - $content = ""; 160 + $content = ''; 161 161 foreach ($result as $row) { 162 - $content .= $row["chunk"]; 162 + $content .= $row['chunk']; 163 163 } 164 164 return $content; 165 165 }
+11 -11
src/applications/herald/adapter/HeraldAdapter.php
··· 242 242 self::FIELD_CONTENT_SOURCE => pht('Content Source'), 243 243 self::FIELD_ALWAYS => pht('Always'), 244 244 self::FIELD_AUTHOR_PROJECTS => pht("Author's projects"), 245 - self::FIELD_PROJECTS => pht("Projects"), 245 + self::FIELD_PROJECTS => pht('Projects'), 246 246 self::FIELD_PUSHER => pht('Pusher'), 247 247 self::FIELD_PUSHER_PROJECTS => pht("Pusher's projects"), 248 248 self::FIELD_DIFFERENTIAL_REVISION => pht('Differential revision'), ··· 437 437 case self::CONDITION_IS_ANY: 438 438 if (!is_array($condition_value)) { 439 439 throw new HeraldInvalidConditionException( 440 - "Expected condition value to be an array."); 440 + 'Expected condition value to be an array.'); 441 441 } 442 442 $condition_value = array_fuse($condition_value); 443 443 return isset($condition_value[$field_value]); 444 444 case self::CONDITION_IS_NOT_ANY: 445 445 if (!is_array($condition_value)) { 446 446 throw new HeraldInvalidConditionException( 447 - "Expected condition value to be an array."); 447 + 'Expected condition value to be an array.'); 448 448 } 449 449 $condition_value = array_fuse($condition_value); 450 450 return !isset($condition_value[$field_value]); 451 451 case self::CONDITION_INCLUDE_ALL: 452 452 if (!is_array($field_value)) { 453 453 throw new HeraldInvalidConditionException( 454 - "Object produced non-array value!"); 454 + 'Object produced non-array value!'); 455 455 } 456 456 if (!is_array($condition_value)) { 457 457 throw new HeraldInvalidConditionException( 458 - "Expected condition value to be an array."); 458 + 'Expected condition value to be an array.'); 459 459 } 460 460 461 461 $have = array_select_keys(array_fuse($field_value), $condition_value); ··· 486 486 $result = @preg_match($condition_value . 'S', $value); 487 487 if ($result === false) { 488 488 throw new HeraldInvalidConditionException( 489 - "Regular expression is not valid!"); 489 + 'Regular expression is not valid!'); 490 490 } 491 491 if ($result) { 492 492 return true; ··· 501 501 $regexp_pair = json_decode($condition_value, true); 502 502 if (!is_array($regexp_pair)) { 503 503 throw new HeraldInvalidConditionException( 504 - "Regular expression pair is not valid JSON!"); 504 + 'Regular expression pair is not valid JSON!'); 505 505 } 506 506 if (count($regexp_pair) != 2) { 507 507 throw new HeraldInvalidConditionException( 508 - "Regular expression pair is not a pair!"); 508 + 'Regular expression pair is not a pair!'); 509 509 } 510 510 511 511 $key_regexp = array_shift($regexp_pair); ··· 515 515 $key_matches = @preg_match($key_regexp, $key); 516 516 if ($key_matches === false) { 517 517 throw new HeraldInvalidConditionException( 518 - "First regular expression is invalid!"); 518 + 'First regular expression is invalid!'); 519 519 } 520 520 if ($key_matches) { 521 521 $value_matches = @preg_match($value_regexp, $value); 522 522 if ($value_matches === false) { 523 523 throw new HeraldInvalidConditionException( 524 - "Second regular expression is invalid!"); 524 + 'Second regular expression is invalid!'); 525 525 } 526 526 if ($value_matches) { 527 527 return true; ··· 534 534 $rule = $engine->getRule($condition_value); 535 535 if (!$rule) { 536 536 throw new HeraldInvalidConditionException( 537 - "Condition references a rule which does not exist!"); 537 + 'Condition references a rule which does not exist!'); 538 538 } 539 539 540 540 $is_not = ($condition_type == self::CONDITION_NOT_RULE);
+1 -1
src/applications/herald/adapter/HeraldCommitAdapter.php
··· 269 269 ); 270 270 $requests = id(new PhabricatorRepositoryAuditRequest()) 271 271 ->loadAllWhere( 272 - "commitPHID = %s AND auditStatus IN (%Ls)", 272 + 'commitPHID = %s AND auditStatus IN (%Ls)', 273 273 $this->commit->getPHID(), 274 274 $status_arr); 275 275
+9 -9
src/applications/herald/controller/HeraldRuleController.php
··· 92 92 if ($rule->getConfigVersion() > $local_version) { 93 93 throw new Exception( 94 94 pht( 95 - "This rule was created with a newer version of Herald. You can not ". 96 - "view or edit it in this older version. Upgrade your Phabricator ". 97 - "deployment.")); 95 + 'This rule was created with a newer version of Herald. You can not '. 96 + 'view or edit it in this older version. Upgrade your Phabricator '. 97 + 'deployment.')); 98 98 } 99 99 100 100 // Upgrade rule version to our version, since we might add newly-defined ··· 165 165 ->appendChild( 166 166 id(new AphrontFormMarkupControl()) 167 167 ->setValue(pht( 168 - "This %s rule triggers for %s.", 168 + 'This %s rule triggers for %s.', 169 169 phutil_tag('strong', array(), $rule_type_name), 170 170 phutil_tag('strong', array(), $content_type_name)))) 171 171 ->appendChild($trigger_object_control) ··· 256 256 $errors = array(); 257 257 258 258 if (!strlen($rule->getName())) { 259 - $e_name = pht("Required"); 260 - $errors[] = pht("Rule must have a name."); 259 + $e_name = pht('Required'); 260 + $errors[] = pht('Rule must have a name.'); 261 261 } 262 262 263 263 $data = json_decode($request->getStr('rule'), true); 264 264 if (!is_array($data) || 265 265 !$data['conditions'] || 266 266 !$data['actions']) { 267 - throw new Exception("Failed to decode rule data."); 267 + throw new Exception('Failed to decode rule data.'); 268 268 } 269 269 270 270 $conditions = array(); ··· 336 336 $rule->saveTransaction(); 337 337 338 338 } catch (AphrontQueryDuplicateKeyException $ex) { 339 - $e_name = pht("Not Unique"); 340 - $errors[] = pht("Rule name is not unique. Choose a unique name."); 339 + $e_name = pht('Not Unique'); 340 + $errors[] = pht('Rule name is not unique. Choose a unique name.'); 341 341 } 342 342 } 343 343
+1 -1
src/applications/herald/controller/HeraldTestConsoleController.php
··· 48 48 $adapter = id(new HeraldPholioMockAdapter()) 49 49 ->setMock($object); 50 50 } else { 51 - throw new Exception("Can not build adapter for object!"); 51 + throw new Exception('Can not build adapter for object!'); 52 52 } 53 53 54 54 $rules = id(new HeraldRuleQuery())
+2 -2
src/applications/herald/controller/HeraldTranscriptController.php
··· 60 60 // table, and then filter this earlier (and thus raise a better error). 61 61 // For now, just block access so we don't violate policies. 62 62 throw new Exception( 63 - pht("This transcript has an invalid or inaccessible adapter.")); 63 + pht('This transcript has an invalid or inaccessible adapter.')); 64 64 } 65 65 66 66 $this->adapter = HeraldAdapter::getAdapterForContentType($object_type); ··· 361 361 $target[$k] = $handles[$phid]->getName(); 362 362 } 363 363 } 364 - $target = implode(", ", $target); 364 + $target = implode(', ', $target); 365 365 } else { 366 366 $target = '<empty>'; 367 367 }
+15 -15
src/applications/herald/engine/HeraldEngine.php
··· 79 79 ->setRuleName($rule->getName()) 80 80 ->setRuleOwner($rule->getAuthorPHID()) 81 81 ->setReason( 82 - "This rule is only supposed to be repeated a single time, ". 83 - "and it has already been applied."); 82 + 'This rule is only supposed to be repeated a single time, '. 83 + 'and it has already been applied.'); 84 84 $this->transcript->addRuleTranscript($xscript); 85 85 $rule_matches = false; 86 86 } else { ··· 243 243 $local_version = id(new HeraldRule())->getConfigVersion(); 244 244 if ($rule->getConfigVersion() > $local_version) { 245 245 $reason = pht( 246 - "Rule could not be processed, it was created with a newer version ". 247 - "of Herald."); 246 + 'Rule could not be processed, it was created with a newer version '. 247 + 'of Herald.'); 248 248 $result = false; 249 249 } else if (!$conditions) { 250 250 $reason = pht( 251 - "Rule failed automatically because it has no conditions."); 251 + 'Rule failed automatically because it has no conditions.'); 252 252 $result = false; 253 253 } else if (!$rule->hasValidAuthor()) { 254 254 $reason = pht( 255 - "Rule failed automatically because its owner is invalid ". 256 - "or disabled."); 255 + 'Rule failed automatically because its owner is invalid '. 256 + 'or disabled.'); 257 257 $result = false; 258 258 } else if (!$this->canAuthorViewObject($rule, $object)) { 259 259 $reason = pht( 260 - "Rule failed automatically because it is a personal rule and its ". 261 - "owner can not see the object."); 260 + 'Rule failed automatically because it is a personal rule and its '. 261 + 'owner can not see the object.'); 262 262 $result = false; 263 263 } else if (!$this->canRuleApplyToObject($rule, $object)) { 264 264 $reason = pht( 265 - "Rule failed automatically because it is an object rule which is ". 266 - "not relevant for this object."); 265 + 'Rule failed automatically because it is an object rule which is '. 266 + 'not relevant for this object.'); 267 267 $result = false; 268 268 } else { 269 269 foreach ($conditions as $condition) { 270 270 $match = $this->doesConditionMatch($rule, $condition, $object); 271 271 272 272 if (!$all && $match) { 273 - $reason = "Any condition matched."; 273 + $reason = 'Any condition matched.'; 274 274 $result = true; 275 275 break; 276 276 } 277 277 278 278 if ($all && !$match) { 279 - $reason = "Not all conditions matched."; 279 + $reason = 'Not all conditions matched.'; 280 280 $result = false; 281 281 break; 282 282 } ··· 284 284 285 285 if ($result === null) { 286 286 if ($all) { 287 - $reason = "All conditions matched."; 287 + $reason = 'All conditions matched.'; 288 288 $result = true; 289 289 } else { 290 - $reason = "No conditions matched."; 290 + $reason = 'No conditions matched.'; 291 291 $result = false; 292 292 } 293 293 }
+2 -2
src/applications/herald/storage/HeraldRule.php
··· 128 128 assert_instances_of($children, 'HeraldDAO'); 129 129 130 130 if (!$this->getID()) { 131 - throw new Exception("Save rule before saving children."); 131 + throw new Exception('Save rule before saving children.'); 132 132 } 133 133 134 134 foreach ($children as $child) { ··· 245 245 if ($this->isPersonalRule()) { 246 246 return pht("A personal rule's owner can always view and edit it."); 247 247 } else if ($this->isObjectRule()) { 248 - return pht("Object rules inherit the policies of their objects."); 248 + return pht('Object rules inherit the policies of their objects.'); 249 249 } 250 250 251 251 return null;
+1 -1
src/applications/legalpad/mail/LegalpadReplyHandler.php
··· 7 7 8 8 public function validateMailReceiver($mail_receiver) { 9 9 if (!($mail_receiver instanceof LegalpadDocument)) { 10 - throw new Exception("Mail receiver is not a LegalpadDocument!"); 10 + throw new Exception('Mail receiver is not a LegalpadDocument!'); 11 11 } 12 12 } 13 13
+4 -4
src/applications/lipsum/generator/PhabricatorTestDataGenerator.php
··· 9 9 public function loadOneRandom($classname) { 10 10 try { 11 11 return newv($classname, array()) 12 - ->loadOneWhere("1 = 1 ORDER BY RAND() LIMIT 1"); 12 + ->loadOneWhere('1 = 1 ORDER BY RAND() LIMIT 1'); 13 13 } catch (PhutilMissingSymbolException $ex) { 14 14 throw new PhutilMissingSymbolException( 15 - "Unable to load symbol ".$classname.": this class does not exit."); 15 + 'Unable to load symbol '.$classname.': this class does not exit.'); 16 16 } 17 17 } 18 18 19 19 20 20 public function loadPhabrictorUserPHID() { 21 - return $this->loadOneRandom("PhabricatorUser")->getPHID(); 21 + return $this->loadOneRandom('PhabricatorUser')->getPHID(); 22 22 } 23 23 24 24 public function loadPhabrictorUser() { 25 - return $this->loadOneRandom("PhabricatorUser"); 25 + return $this->loadOneRandom('PhabricatorUser'); 26 26 } 27 27 28 28 }
+4 -4
src/applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php
··· 26 26 echo "\t".$typetmp."\n"; 27 27 } 28 28 echo "\n"; 29 - $prompt = "Are you sure you want to generate lots of test data?"; 29 + $prompt = 'Are you sure you want to generate lots of test data?'; 30 30 if (!phutil_console_confirm($prompt, $default_no = true)) { 31 31 return; 32 32 } 33 33 $argv = $args->getArg('args'); 34 34 if (count($argv) == 0 || 35 - (count($argv) == 1 && $argv[0] == "all")) { 35 + (count($argv) == 1 && $argv[0] == 'all')) { 36 36 $this->infinitelyGenerate($supported_types); 37 37 } else { 38 38 $new_supported_types = array(); ··· 56 56 echo "None of the input types were supported.\n"; 57 57 return; 58 58 } 59 - echo "GENERATING: "; 60 - echo strtoupper(implode(" , ", array_keys($supported_types))); 59 + echo 'GENERATING: '; 60 + echo strtoupper(implode(' , ', array_keys($supported_types))); 61 61 echo "\n"; 62 62 while (true) { 63 63 $type = $supported_types[array_rand($supported_types)];
+1 -1
src/applications/macro/conduit/ConduitAPI_macro_query_Method.php
··· 6 6 final class ConduitAPI_macro_query_Method extends ConduitAPI_macro_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Retrieve image macro information."; 9 + return 'Retrieve image macro information.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+2 -2
src/applications/macro/config/PhabricatorMacroConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Macro"); 7 + return pht('Macro'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Macro."); 11 + return pht('Configure Macro.'); 12 12 } 13 13 14 14 public function getOptions() {
+2 -2
src/applications/macro/controller/PhabricatorMacroMemeController.php
··· 31 31 32 32 $upper_text = strtoupper($upper_text); 33 33 $lower_text = strtoupper($lower_text); 34 - $mixed_text = md5($upper_text).":".md5($lower_text); 35 - $hash = "meme".hash("sha256", $mixed_text); 34 + $mixed_text = md5($upper_text).':'.md5($lower_text); 35 + $hash = 'meme'.hash('sha256', $mixed_text); 36 36 $xform = id(new PhabricatorTransformedFile()) 37 37 ->loadOneWhere('originalphid=%s and transform=%s', 38 38 $file->getPHID(), $hash);
+2 -2
src/applications/macro/mail/PhabricatorMacroReplyHandler.php
··· 4 4 5 5 public function validateMailReceiver($mail_receiver) { 6 6 if (!($mail_receiver instanceof PhabricatorFileImageMacro)) { 7 - throw new Exception("Mail receiver is not a PhabricatorFileImageMacro!"); 7 + throw new Exception('Mail receiver is not a PhabricatorFileImageMacro!'); 8 8 } 9 9 } 10 10 ··· 26 26 if ($this->supportsReplies()) { 27 27 // TODO: Implement. 28 28 return null; 29 - return pht("Reply to comment."); 29 + return pht('Reply to comment.'); 30 30 } else { 31 31 return null; 32 32 }
+1 -1
src/applications/macro/query/PhabricatorMacroSearchEngine.php
··· 78 78 $status = $saved_query->getParameter('status'); 79 79 $names = implode(', ', $saved_query->getParameter('names', array())); 80 80 $like = $saved_query->getParameter('nameLike'); 81 - $color = $saved_query->getParameter('flagColor', "-1"); 81 + $color = $saved_query->getParameter('flagColor', '-1'); 82 82 83 83 $form 84 84 ->appendChild(
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_createtask_Method.php
··· 7 7 extends ConduitAPI_maniphest_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Create a new Maniphest task."; 10 + return 'Create a new Maniphest task.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_find_Method.php
··· 17 17 } 18 18 19 19 public function getMethodDescription() { 20 - return "Deprecated alias of maniphest.query"; 20 + return 'Deprecated alias of maniphest.query'; 21 21 } 22 22 23 23 }
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_gettasktransactions_Method.php
··· 7 7 extends ConduitAPI_maniphest_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Retrieve Maniphest Task Transactions."; 10 + return 'Retrieve Maniphest Task Transactions.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_info_Method.php
··· 8 8 9 9 10 10 public function getMethodDescription() { 11 - return "Retrieve information about a Maniphest task, given its id."; 11 + return 'Retrieve information about a Maniphest task, given its id.'; 12 12 } 13 13 14 14 public function defineParamTypes() {
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_query_Method.php
··· 12 12 13 13 14 14 public function getMethodDescription() { 15 - return "Execute complex searches for Maniphest tasks."; 15 + return 'Execute complex searches for Maniphest tasks.'; 16 16 } 17 17 18 18 public function defineParamTypes() {
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_querystatuses_Method.php
··· 4 4 extends ConduitAPI_maniphest_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Retrieve information about possible Maniphest Task status values."; 7 + return 'Retrieve information about possible Maniphest Task status values.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+1 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_update_Method.php
··· 7 7 extends ConduitAPI_maniphest_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Update an existing Maniphest task."; 10 + return 'Update an existing Maniphest task.'; 11 11 } 12 12 13 13 public function defineErrorTypes() {
+6 -6
src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Maniphest"); 7 + return pht('Maniphest'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Maniphest."); 11 + return pht('Configure Maniphest.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 215 215 216 216 return array( 217 217 $this->newOption('maniphest.custom-field-definitions', 'wild', array()) 218 - ->setSummary(pht("Custom Maniphest fields.")) 218 + ->setSummary(pht('Custom Maniphest fields.')) 219 219 ->setDescription( 220 220 pht( 221 221 'Array of custom fields for Maniphest tasks. For details on '. ··· 228 228 pht('Valid Setting')), 229 229 $this->newOption('maniphest.fields', $custom_field_type, $default_fields) 230 230 ->setCustomData(id(new ManiphestTask())->getCustomFieldBaseClass()) 231 - ->setDescription(pht("Select and reorder task fields.")), 231 + ->setDescription(pht('Select and reorder task fields.')), 232 232 $this->newOption('maniphest.priorities', 'wild', $priority_defaults) 233 - ->setSummary(pht("Configure Maniphest priority names.")) 233 + ->setSummary(pht('Configure Maniphest priority names.')) 234 234 ->setDescription( 235 235 pht( 236 236 'Allows you to edit or override the default priorities available '. ··· 252 252 ->setDescription($status_description) 253 253 ->addExample($status_example, pht('Minimal Valid Config')), 254 254 $this->newOption('maniphest.default-priority', 'int', 90) 255 - ->setSummary(pht("Default task priority for create flows.")) 255 + ->setSummary(pht('Default task priority for create flows.')) 256 256 ->setDescription( 257 257 pht( 258 258 "What should the default task priority be in create flows? See ".
+2 -2
src/applications/maniphest/controller/ManiphestExportController.php
··· 88 88 ->appendChild( 89 89 id(new AphrontFormSelectControl()) 90 90 ->setLabel(pht('Format:')) 91 - ->setName("excel-format") 91 + ->setName('excel-format') 92 92 ->setOptions($export_formats)); 93 93 94 94 $dialog->appendChild($form); ··· 98 98 return id(new AphrontDialogResponse())->setDialog($dialog); 99 99 } 100 100 101 - $format = idx($formats, $request->getStr("excel-format")); 101 + $format = idx($formats, $request->getStr('excel-format')); 102 102 if ($format === null) { 103 103 throw new Exception('Excel format object not found.'); 104 104 }
+8 -8
src/applications/maniphest/controller/ManiphestReportController.php
··· 245 245 246 246 if ($handle) { 247 247 $inst = pht( 248 - "NOTE: This table reflects tasks currently in ". 249 - "the project. If a task was opened in the past but added to ". 250 - "the project recently, it is counted on the day it was ". 251 - "opened, not the day it was categorized. If a task was part ". 252 - "of this project in the past but no longer is, it is not ". 253 - "counted at all."); 254 - $header = pht("Task Burn Rate for Project %s", $handle->renderLink()); 248 + 'NOTE: This table reflects tasks currently in '. 249 + 'the project. If a task was opened in the past but added to '. 250 + 'the project recently, it is counted on the day it was '. 251 + 'opened, not the day it was categorized. If a task was part '. 252 + 'of this project in the past but no longer is, it is not '. 253 + 'counted at all.'); 254 + $header = pht('Task Burn Rate for Project %s', $handle->renderLink()); 255 255 $caption = phutil_tag('p', array(), $inst); 256 256 } else { 257 - $header = pht("Task Burn Rate for All Tasks"); 257 + $header = pht('Task Burn Rate for All Tasks'); 258 258 $caption = null; 259 259 } 260 260
+1 -1
src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php
··· 61 61 public function getProjectPHIDs() { 62 62 $projects = array(); 63 63 for ($i = 0; $i < rand(1, 4);$i++) { 64 - $project = $this->loadOneRandom("PhabricatorProject"); 64 + $project = $this->loadOneRandom('PhabricatorProject'); 65 65 if ($project) { 66 66 $projects[] = $project->getPHID(); 67 67 }
+3 -3
src/applications/maniphest/mail/ManiphestReplyHandler.php
··· 7 7 8 8 public function validateMailReceiver($mail_receiver) { 9 9 if (!($mail_receiver instanceof ManiphestTask)) { 10 - throw new Exception("Mail receiver is not a ManiphestTask!"); 10 + throw new Exception('Mail receiver is not a ManiphestTask!'); 11 11 } 12 12 } 13 13 ··· 28 28 public function getReplyHandlerInstructions() { 29 29 if ($this->supportsReplies()) { 30 30 return pht( 31 - "Reply to comment or attach files, or !close, !claim, ". 32 - "!unsubscribe or !assign <username>."); 31 + 'Reply to comment or attach files, or !close, !claim, '. 32 + '!unsubscribe or !assign <username>.'); 33 33 } else { 34 34 return null; 35 35 }
+1 -1
src/applications/metamta/adapter/PhabricatorMailImplementationSendGridAdapter.php
··· 147 147 } 148 148 149 149 if ($response['message'] !== 'success') { 150 - $errors = implode(";", $response['errors']); 150 + $errors = implode(';', $response['errors']); 151 151 throw new Exception("Request failed with errors: {$errors}."); 152 152 } 153 153
+1 -1
src/applications/metamta/contentsource/PhabricatorContentSourceView.php
··· 24 24 return phutil_tag( 25 25 'span', 26 26 array( 27 - 'class' => "phabricator-content-source-view", 27 + 'class' => 'phabricator-content-source-view', 28 28 ), 29 29 "Via {$type}"); 30 30 }
+3 -3
src/applications/metamta/management/PhabricatorMailManagementListInboundWorkflow.php
··· 8 8 ->setName('list-inbound') 9 9 ->setSynopsis('List inbound messages received by Phabricator.') 10 10 ->setExamples( 11 - "**list-inbound**") 11 + '**list-inbound**') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 29 29 $args->getArg('limit')); 30 30 31 31 if (!$mails) { 32 - $console->writeErr("%s\n", pht("No received mail.")); 32 + $console->writeErr("%s\n", pht('No received mail.')); 33 33 return 0; 34 34 } 35 35 ··· 45 45 $console->writeOut( 46 46 "%s\n", 47 47 sprintf( 48 - "% 8d %-16s %-20s %s", 48 + '% 8d %-16s %-20s %s', 49 49 $mail->getID(), 50 50 $mail->getAuthorPHID() 51 51 ? $handles[$mail->getAuthorPHID()]->getName()
+3 -3
src/applications/metamta/management/PhabricatorMailManagementListOutboundWorkflow.php
··· 8 8 ->setName('list-outbound') 9 9 ->setSynopsis('List outbound messages sent by Phabricator.') 10 10 ->setExamples( 11 - "**list-outbound**") 11 + '**list-outbound**') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 29 29 $args->getArg('limit')); 30 30 31 31 if (!$mails) { 32 - $console->writeErr("%s\n", pht("No sent mail.")); 32 + $console->writeErr("%s\n", pht('No sent mail.')); 33 33 return 0; 34 34 } 35 35 ··· 37 37 $console->writeOut( 38 38 "%s\n", 39 39 sprintf( 40 - "% 8d %-8s %s", 40 + '% 8d %-8s %s', 41 41 $mail->getID(), 42 42 PhabricatorMetaMTAMail::getReadableStatus($mail->getStatus()), 43 43 $mail->getSubject()));
+2 -2
src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php
··· 11 11 'Simulate receiving mail. This is primarily useful if you are '. 12 12 'developing new mail receivers.')) 13 13 ->setExamples( 14 - "**receive-test** --as alincoln --to D123 < body.txt") 14 + '**receive-test** --as alincoln --to D123 < body.txt') 15 15 ->setArguments( 16 16 array( 17 17 array( ··· 136 136 137 137 $console->writeErr( 138 138 "%s\n\n phabricator/ $ ./bin/mail show-inbound --id %d\n\n", 139 - pht("Mail received! You can view details by running this command:"), 139 + pht('Mail received! You can view details by running this command:'), 140 140 $received->getID()); 141 141 } 142 142
+2 -2
src/applications/metamta/management/PhabricatorMailManagementResendWorkflow.php
··· 8 8 ->setName('resend') 9 9 ->setSynopsis('Send mail again.') 10 10 ->setExamples( 11 - "**resend** --id 1 --id 2") 11 + '**resend** --id 1 --id 2') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 38 38 $missing = array_diff_key($ids, $messages); 39 39 if ($missing) { 40 40 throw new PhutilArgumentUsageException( 41 - "Some specified messages do not exist: ". 41 + 'Some specified messages do not exist: '. 42 42 implode(', ', array_keys($missing))); 43 43 } 44 44 }
+2 -2
src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php
··· 11 11 'Simulate sending mail. This may be useful to test your mail '. 12 12 'configuration, or while developing new mail adapters.')) 13 13 ->setExamples( 14 - "**send-test** --to alincoln --subject hi < body.txt") 14 + '**send-test** --to alincoln --subject hi < body.txt') 15 15 ->setArguments( 16 16 array( 17 17 array( ··· 139 139 140 140 $console->writeErr( 141 141 "%s\n\n phabricator/ $ ./bin/mail show-outbound --id %d\n\n", 142 - pht("Mail sent! You can view details by running this command:"), 142 + pht('Mail sent! You can view details by running this command:'), 143 143 $mail->getID()); 144 144 } 145 145
+2 -2
src/applications/metamta/management/PhabricatorMailManagementShowInboundWorkflow.php
··· 8 8 ->setName('show-inbound') 9 9 ->setSynopsis('Show diagnostic details about inbound mail.') 10 10 ->setExamples( 11 - "**show-inbound** --id 1 --id 2") 11 + '**show-inbound** --id 1 --id 2') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 38 38 $missing = array_diff_key($ids, $messages); 39 39 if ($missing) { 40 40 throw new PhutilArgumentUsageException( 41 - "Some specified messages do not exist: ". 41 + 'Some specified messages do not exist: '. 42 42 implode(', ', array_keys($missing))); 43 43 } 44 44 }
+2 -2
src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php
··· 8 8 ->setName('show-outbound') 9 9 ->setSynopsis('Show diagnostic details about outbound mail.') 10 10 ->setExamples( 11 - "**show-outbound** --id 1 --id 2") 11 + '**show-outbound** --id 1 --id 2') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 38 38 $missing = array_diff_key($ids, $messages); 39 39 if ($missing) { 40 40 throw new PhutilArgumentUsageException( 41 - "Some specified messages do not exist: ". 41 + 'Some specified messages do not exist: '. 42 42 implode(', ', array_keys($missing))); 43 43 } 44 44 }
+2 -2
src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
··· 8 8 foreach ($bodies as $body) { 9 9 $parser = new PhabricatorMetaMTAEmailBodyParser(); 10 10 $stripped = $parser->stripTextBody($body); 11 - $this->assertEqual("OKAY", $stripped); 11 + $this->assertEqual('OKAY', $stripped); 12 12 } 13 13 } 14 14 ··· 42 42 43 43 $parser = new PhabricatorMetaMTAEmailBodyParser(); 44 44 $stripped = $parser->stripTextBody($body); 45 - $this->assertEqual("On which horse shall you ride?", $stripped); 45 + $this->assertEqual('On which horse shall you ride?', $stripped); 46 46 } 47 47 48 48 private function getEmailBodiesWithFullCommands() {
+8 -8
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 332 332 333 333 if (!$force_send) { 334 334 if ($this->getStatus() != self::STATUS_QUEUE) { 335 - throw new Exception("Trying to send an already-sent mail!"); 335 + throw new Exception('Trying to send an already-sent mail!'); 336 336 } 337 337 } 338 338 ··· 411 411 list($header_key, $header_value) = $pair; 412 412 413 413 // NOTE: If we have \n in a header, SES rejects the email. 414 - $header_value = str_replace("\n", " ", $header_value); 414 + $header_value = str_replace("\n", ' ', $header_value); 415 415 416 416 $mailer->addHeader($header_key, $header_value); 417 417 } ··· 554 554 if (!$add_to && !$add_cc) { 555 555 $this->setStatus(self::STATUS_VOID); 556 556 $this->setMessage( 557 - "Message has no valid recipients: all To/Cc are disabled, invalid, ". 558 - "or configured not to receive this mail."); 557 + 'Message has no valid recipients: all To/Cc are disabled, invalid, '. 558 + 'or configured not to receive this mail.'); 559 559 return $this->save(); 560 560 } 561 561 ··· 651 651 652 652 public static function getReadableStatus($status_code) { 653 653 static $readable = array( 654 - self::STATUS_QUEUE => "Queued for Delivery", 655 - self::STATUS_FAIL => "Delivery Failed", 656 - self::STATUS_SENT => "Sent", 657 - self::STATUS_VOID => "Void", 654 + self::STATUS_QUEUE => 'Queued for Delivery', 655 + self::STATUS_FAIL => 'Delivery Failed', 656 + self::STATUS_SENT => 'Sent', 657 + self::STATUS_VOID => 'Void', 658 658 ); 659 659 $status_code = coalesce($status_code, '?'); 660 660 return idx($readable, $status_code, $status_code);
+2 -2
src/applications/metamta/storage/__tests__/PhabricatorMetaMTAMailTestCase.php
··· 164 164 $expect_references = true; 165 165 } 166 166 167 - $case = "<message-id = ".($supports_message_id ? 'Y' : 'N').", ". 168 - "first = ".($is_first_mail ? 'Y' : 'N').">"; 167 + $case = '<message-id = '.($supports_message_id ? 'Y' : 'N').', '. 168 + 'first = '.($is_first_mail ? 'Y' : 'N').'>'; 169 169 170 170 $this->assertTrue( 171 171 isset($dict['Thread-Index']),
+4 -4
src/applications/metamta/view/__tests__/PhabricatorMetaMTAMailBodyTestCase.php
··· 66 66 $env->overrideEnvConfig('metamta.reply.show-hints', $reply_hints); 67 67 68 68 $body = new PhabricatorMetaMTAMailBody(); 69 - $body->addRawSection("salmon"); 70 - $body->addTextSection("HEADER", "bass\ntrout\n"); 71 - $body->addHeraldSection("/xscript/"); 72 - $body->addReplySection("pike"); 69 + $body->addRawSection('salmon'); 70 + $body->addTextSection('HEADER', "bass\ntrout\n"); 71 + $body->addHeraldSection('/xscript/'); 72 + $body->addReplySection('pike'); 73 73 74 74 $this->assertEqual($expect, $body->render()); 75 75 }
+3 -3
src/applications/notification/PhabricatorNotificationQuery.php
··· 47 47 48 48 protected function loadPage() { 49 49 if (!$this->userPHID) { 50 - throw new Exception("Call setUser() before executing the query"); 50 + throw new Exception('Call setUser() before executing the query'); 51 51 } 52 52 53 53 $story_table = new PhabricatorFeedStoryData(); ··· 57 57 58 58 $data = queryfx_all( 59 59 $conn, 60 - "SELECT story.*, notif.hasViewed FROM %T notif 60 + 'SELECT story.*, notif.hasViewed FROM %T notif 61 61 JOIN %T story ON notif.chronologicalKey = story.chronologicalKey 62 62 %Q 63 63 ORDER BY notif.chronologicalKey DESC 64 - %Q", 64 + %Q', 65 65 $notification_table->getTableName(), 66 66 $story_table->getTableName(), 67 67 $this->buildWhereClause($conn),
+2 -2
src/applications/notification/controller/PhabricatorNotificationClearController.php
··· 29 29 if ($is_serious) { 30 30 $dialog->appendChild( 31 31 pht( 32 - "All unread notifications will be marked as read. You can not ". 33 - "undo this action.")); 32 + 'All unread notifications will be marked as read. You can not '. 33 + 'undo this action.')); 34 34 } else { 35 35 $dialog->appendChild( 36 36 pht(
+2 -2
src/applications/notification/controller/PhabricatorNotificationStatusController.php
··· 9 9 $status = $this->renderServerStatus($status); 10 10 } catch (Exception $ex) { 11 11 $status = new AphrontErrorView(); 12 - $status->setTitle("Notification Server Issue"); 12 + $status->setTitle('Notification Server Issue'); 13 13 $status->appendChild(hsprintf( 14 14 'Unable to determine server status. This probably means the server '. 15 15 'is not in great shape. The specific issue encountered was:'. ··· 66 66 ->setTag('a') 67 67 ->setWorkflow(true) 68 68 ->setText(pht('Send Test Notification')) 69 - ->setHref($this->getApplicationURI("test/")) 69 + ->setHref($this->getApplicationURI('test/')) 70 70 ->setIcon($test_icon); 71 71 72 72 $header = id(new PHUIHeaderView())
+2 -2
src/applications/notification/storage/PhabricatorFeedStoryNotification.php
··· 25 25 26 26 queryfx( 27 27 $conn, 28 - "UPDATE %T 28 + 'UPDATE %T 29 29 SET hasViewed = 1 30 30 WHERE userPHID = %s 31 31 AND primaryObjectPHID = %s 32 - AND hasViewed = 0", 32 + AND hasViewed = 0', 33 33 $notification_table->getTableName(), 34 34 $user->getPHID(), 35 35 $object_phid);
+2 -2
src/applications/owners/config/PhabricatorOwnersConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Owners"); 7 + return pht('Owners'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Owners."); 11 + return pht('Configure Owners.'); 12 12 } 13 13 14 14 public function getOptions() {
+1 -1
src/applications/owners/controller/PhabricatorOwnersDetailController.php
··· 224 224 $nav, 225 225 ), 226 226 array( 227 - 'title' => pht("Package %s", $package->getName()), 227 + 'title' => pht('Package %s', $package->getName()), 228 228 'device' => true, 229 229 )); 230 230 }
+1 -1
src/applications/owners/mail/OwnersPackageReplyHandler.php
··· 3 3 final class OwnersPackageReplyHandler extends PhabricatorMailReplyHandler { 4 4 public function validateMailReceiver($mail_receiver) { 5 5 if (!($mail_receiver instanceof PhabricatorOwnersPackage)) { 6 - throw new Exception("Receiver is not a PhabricatorOwnersPackage!"); 6 + throw new Exception('Receiver is not a PhabricatorOwnersPackage!'); 7 7 } 8 8 } 9 9
+1 -1
src/applications/owners/mail/PackageDeleteMail.php
··· 3 3 final class PackageDeleteMail extends PackageMail { 4 4 5 5 protected function getVerb() { 6 - return "Deleted"; 6 + return 'Deleted'; 7 7 } 8 8 9 9 protected function isNewThread() {
+1 -1
src/applications/passphrase/keys/PassphraseAbstractKey.php
··· 6 6 7 7 protected function requireCredential() { 8 8 if (!$this->credential) { 9 - throw new Exception(pht("Credential is required!")); 9 + throw new Exception(pht('Credential is required!')); 10 10 } 11 11 return $this->credential; 12 12 }
+1 -1
src/applications/passphrase/view/PassphraseCredentialControl.php
··· 41 41 $options_map = array(); 42 42 foreach ($this->options as $option) { 43 43 $options_map[$option->getPHID()] = pht( 44 - "%s %s", 44 + '%s %s', 45 45 'K'.$option->getID(), 46 46 $option->getName()); 47 47 }
+1 -1
src/applications/paste/conduit/ConduitAPI_paste_info_Method.php
··· 14 14 } 15 15 16 16 public function getMethodDescription() { 17 - return "Retrieve an array of information about a paste."; 17 + return 'Retrieve an array of information about a paste.'; 18 18 } 19 19 20 20 public function defineParamTypes() {
+1 -1
src/applications/paste/conduit/ConduitAPI_paste_query_Method.php
··· 6 6 final class ConduitAPI_paste_query_Method extends ConduitAPI_paste_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Query Pastes."; 9 + return 'Query Pastes.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+7 -7
src/applications/paste/lipsum/PhabricatorPasteTestDataGenerator.php
··· 5 5 6 6 // Better Support for this in the future 7 7 public $supportedLanguages = array( 8 - "Java" => "java", 9 - "PHP" => "php"); 8 + 'Java' => 'java', 9 + 'PHP' => 'php'); 10 10 11 11 public function generate() { 12 12 $authorphid = $this->loadPhabrictorUserPHID(); ··· 37 37 private function loadPhabrictorPastePHID() { 38 38 $random = rand(0, 1); 39 39 if ($random == 1) { 40 - $paste = id($this->loadOneRandom("PhabricatorPaste")); 40 + $paste = id($this->loadOneRandom('PhabricatorPaste')); 41 41 if ($paste) { 42 42 return $paste->getPHID(); 43 43 } ··· 55 55 $title = preg_replace('/\s+/', '', $title); 56 56 if ($language == null || 57 57 !in_array($language, array_keys($this->supportedLanguages))) { 58 - return $title.".txt"; 58 + return $title.'.txt'; 59 59 } else { 60 - return $title.".".$this->supportedLanguages[$language]; 60 + return $title.'.'.$this->supportedLanguages[$language]; 61 61 } 62 62 } 63 63 64 64 public function generateLanguage() { 65 65 $supplemented_lang = $this->supportedLanguages; 66 - $supplemented_lang["lipsum"] = "txt"; 66 + $supplemented_lang['lipsum'] = 'txt'; 67 67 return array_rand($supplemented_lang); 68 68 } 69 69 ··· 73 73 return id(new PhutilLipsumContextFreeGrammar()) 74 74 ->generateSeveral(rand(30, 40)); 75 75 } else { 76 - $cfg_class = "Phutil".$language."CodeSnippetContextFreeGrammar"; 76 + $cfg_class = 'Phutil'.$language.'CodeSnippetContextFreeGrammar'; 77 77 return newv($cfg_class, array())->generate(); 78 78 } 79 79 }
+1 -1
src/applications/paste/view/PasteEmbedView.php
··· 28 28 29 29 public function render() { 30 30 if (!$this->paste) { 31 - throw new Exception("Call setPaste() before render()!"); 31 + throw new Exception('Call setPaste() before render()!'); 32 32 } 33 33 34 34 $lines = phutil_split_lines($this->paste->getContent());
+1 -1
src/applications/people/conduit/ConduitAPI_user_addstatus_Method.php
··· 8 8 } 9 9 10 10 public function getMethodDescription() { 11 - return pht("Add status information to the logged-in user."); 11 + return pht('Add status information to the logged-in user.'); 12 12 } 13 13 14 14 public function getMethodStatusDescription() {
+1 -1
src/applications/people/conduit/ConduitAPI_user_disable_Method.php
··· 7 7 extends ConduitAPI_user_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Permanently disable specified users (admin only)."; 10 + return 'Permanently disable specified users (admin only).'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/people/conduit/ConduitAPI_user_enable_Method.php
··· 7 7 extends ConduitAPI_user_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Re-enable specified users (admin only)."; 10 + return 'Re-enable specified users (admin only).'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/people/conduit/ConduitAPI_user_info_Method.php
··· 15 15 } 16 16 17 17 public function getMethodDescription() { 18 - return "Retrieve information about a user by PHID."; 18 + return 'Retrieve information about a user by PHID.'; 19 19 } 20 20 21 21 public function defineParamTypes() {
+1 -1
src/applications/people/conduit/ConduitAPI_user_query_Method.php
··· 7 7 extends ConduitAPI_user_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Query users."; 10 + return 'Query users.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/people/conduit/ConduitAPI_user_removestatus_Method.php
··· 7 7 } 8 8 9 9 public function getMethodDescription() { 10 - return pht("Delete status information of the logged-in user."); 10 + return pht('Delete status information of the logged-in user.'); 11 11 } 12 12 13 13 public function getMethodStatusDescription() {
+1 -1
src/applications/people/conduit/ConduitAPI_user_whoami_Method.php
··· 7 7 extends ConduitAPI_user_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Retrieve information about the logged-in user."; 10 + return 'Retrieve information about the logged-in user.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+5 -5
src/applications/people/config/PhabricatorUserConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("User Profiles"); 7 + return pht('User Profiles'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("User profiles configuration."); 11 + return pht('User profiles configuration.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 33 33 return array( 34 34 $this->newOption('user.fields', $custom_field_type, $default) 35 35 ->setCustomData(id(new PhabricatorUser())->getCustomFieldBaseClass()) 36 - ->setDescription(pht("Select and reorder user profile fields.")), 36 + ->setDescription(pht('Select and reorder user profile fields.')), 37 37 $this->newOption('user.custom-field-definitions', 'map', array()) 38 - ->setDescription(pht("Add new simple fields to user profiles.")), 38 + ->setDescription(pht('Add new simple fields to user profiles.')), 39 39 $this->newOption('user.require-real-name', 'bool', true) 40 - ->setDescription(pht("Always require real name for user profiles.")) 40 + ->setDescription(pht('Always require real name for user profiles.')) 41 41 ->setBoolOptions( 42 42 array( 43 43 pht('Make real names required'),
+4 -4
src/applications/people/controller/PhabricatorPeopleLdapController.php
··· 73 73 74 74 $notice_view = new AphrontErrorView(); 75 75 $notice_view->setSeverity(AphrontErrorView::SEVERITY_NOTICE); 76 - $notice_view->setTitle(pht("Import Successful")); 76 + $notice_view->setTitle(pht('Import Successful')); 77 77 $notice_view->setErrors(array( 78 - pht("Successfully imported users from LDAP"), 78 + pht('Successfully imported users from LDAP'), 79 79 )); 80 80 81 81 $list = new PHUIObjectItemListView(); 82 - $list->setNoDataString(pht("No users imported?")); 82 + $list->setNoDataString(pht('No users imported?')); 83 83 84 84 foreach ($usernames as $username) { 85 85 $user = new PhabricatorUser(); ··· 133 133 134 134 $ldap_provider = PhabricatorAuthProviderLDAP::getLDAPProvider(); 135 135 if (!$ldap_provider) { 136 - throw new Exception("No LDAP provider enabled!"); 136 + throw new Exception('No LDAP provider enabled!'); 137 137 } 138 138 139 139 $ldap_adapter = $ldap_provider->getAdapter();
+1 -1
src/applications/people/controller/PhabricatorPeopleNewController.php
··· 56 56 $user->setRealName($request->getStr('realname')); 57 57 58 58 if (!strlen($user->getUsername())) { 59 - $errors[] = pht("Username is required."); 59 + $errors[] = pht('Username is required.'); 60 60 $e_username = pht('Required'); 61 61 } else if (!PhabricatorUser::validateUsername($user->getUsername())) { 62 62 $errors[] = PhabricatorUser::describeValidUsername();
+19 -19
src/applications/people/editor/PhabricatorUserEditor.php
··· 26 26 PhabricatorUserEmail $email) { 27 27 28 28 if ($user->getID()) { 29 - throw new Exception("User has already been created!"); 29 + throw new Exception('User has already been created!'); 30 30 } 31 31 32 32 if ($email->getID()) { 33 - throw new Exception("Email has already been created!"); 33 + throw new Exception('Email has already been created!'); 34 34 } 35 35 36 36 if (!PhabricatorUser::validateUsername($user->getUsername())) { ··· 84 84 PhabricatorUser $user, 85 85 PhabricatorUserEmail $email = null) { 86 86 if (!$user->getID()) { 87 - throw new Exception("User has not been created yet!"); 87 + throw new Exception('User has not been created yet!'); 88 88 } 89 89 90 90 $user->openTransaction(); ··· 113 113 PhutilOpaqueEnvelope $envelope) { 114 114 115 115 if (!$user->getID()) { 116 - throw new Exception("User has not been created yet!"); 116 + throw new Exception('User has not been created yet!'); 117 117 } 118 118 119 119 $user->openTransaction(); ··· 139 139 $actor = $this->requireActor(); 140 140 141 141 if (!$user->getID()) { 142 - throw new Exception("User has not been created yet!"); 142 + throw new Exception('User has not been created yet!'); 143 143 } 144 144 145 145 if (!PhabricatorUser::validateUsername($username)) { ··· 185 185 $actor = $this->requireActor(); 186 186 187 187 if (!$user->getID()) { 188 - throw new Exception("User has not been created yet!"); 188 + throw new Exception('User has not been created yet!'); 189 189 } 190 190 191 191 $user->openTransaction(); ··· 223 223 $actor = $this->requireActor(); 224 224 225 225 if (!$user->getID()) { 226 - throw new Exception("User has not been created yet!"); 226 + throw new Exception('User has not been created yet!'); 227 227 } 228 228 229 229 $user->openTransaction(); ··· 262 262 $actor = $this->requireActor(); 263 263 264 264 if (!$user->getID()) { 265 - throw new Exception("User has not been created yet!"); 265 + throw new Exception('User has not been created yet!'); 266 266 } 267 267 268 268 $user->openTransaction(); ··· 301 301 $actor = $this->requireActor(); 302 302 303 303 if (!$user->getID()) { 304 - throw new Exception("User has not been created yet!"); 304 + throw new Exception('User has not been created yet!'); 305 305 } 306 306 307 307 $user->openTransaction(); ··· 346 346 $actor = $this->requireActor(); 347 347 348 348 if (!$user->getID()) { 349 - throw new Exception("User has not been created yet!"); 349 + throw new Exception('User has not been created yet!'); 350 350 } 351 351 if ($email->getID()) { 352 - throw new Exception("Email has already been created!"); 352 + throw new Exception('Email has already been created!'); 353 353 } 354 354 355 355 // Use changePrimaryEmail() to change primary email. ··· 396 396 $actor = $this->requireActor(); 397 397 398 398 if (!$user->getID()) { 399 - throw new Exception("User has not been created yet!"); 399 + throw new Exception('User has not been created yet!'); 400 400 } 401 401 if (!$email->getID()) { 402 - throw new Exception("Email has not been created yet!"); 402 + throw new Exception('Email has not been created yet!'); 403 403 } 404 404 405 405 $user->openTransaction(); ··· 412 412 throw new Exception("Can't remove primary email!"); 413 413 } 414 414 if ($email->getUserPHID() != $user->getPHID()) { 415 - throw new Exception("Email not owned by user!"); 415 + throw new Exception('Email not owned by user!'); 416 416 } 417 417 418 418 $email->delete(); ··· 440 440 $actor = $this->requireActor(); 441 441 442 442 if (!$user->getID()) { 443 - throw new Exception("User has not been created yet!"); 443 + throw new Exception('User has not been created yet!'); 444 444 } 445 445 if (!$email->getID()) { 446 - throw new Exception("Email has not been created yet!"); 446 + throw new Exception('Email has not been created yet!'); 447 447 } 448 448 449 449 $user->openTransaction(); ··· 453 453 $email->reload(); 454 454 455 455 if ($email->getUserPHID() != $user->getPHID()) { 456 - throw new Exception("User does not own email!"); 456 + throw new Exception('User does not own email!'); 457 457 } 458 458 459 459 if ($email->getIsPrimary()) { 460 - throw new Exception("Email is already primary!"); 460 + throw new Exception('Email is already primary!'); 461 461 } 462 462 463 463 if (!$email->getIsVerified()) { 464 - throw new Exception("Email is not verified!"); 464 + throw new Exception('Email is not verified!'); 465 465 } 466 466 467 467 $old_primary = $user->loadPrimaryEmail();
+10 -10
src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php
··· 40 40 $name = strtolower($random_real_name); 41 41 $name = preg_replace('/[^a-z]/s' , ' ', $name); 42 42 $name = preg_replace('/\s+/', ' ', $name); 43 - $words = explode(" ", $name); 43 + $words = explode(' ', $name); 44 44 $random = rand(0, 4); 45 - $reduced = ""; 45 + $reduced = ''; 46 46 if ($random == 0) { 47 47 foreach ($words as $w) { 48 48 if ($w == end($words)) { ··· 52 52 $reduced .= $w[0]; 53 53 } 54 54 } 55 - } elseif ($random == 1) { 55 + } else if ($random == 1) { 56 56 foreach ($words as $w) { 57 57 if ($w == $words[0]) { 58 58 $reduced .= $w; ··· 61 61 $reduced .= $w[0]; 62 62 } 63 63 } 64 - } elseif ($random == 2) { 64 + } else if ($random == 2) { 65 65 foreach ($words as $w) { 66 66 if ($w == $words[0] || $w == end($words)) { 67 67 $reduced .= $w; ··· 70 70 $reduced .= $w[0]; 71 71 } 72 72 } 73 - } elseif ($random == 3) { 73 + } else if ($random == 3) { 74 74 foreach ($words as $w) { 75 75 if ($w == $words[0] || $w == end($words)) { 76 76 $reduced .= $w; 77 77 } 78 78 else { 79 - $reduced .= $w[0]."."; 79 + $reduced .= $w[0].'.'; 80 80 } 81 81 } 82 - } elseif ($random == 4) { 82 + } else if ($random == 4) { 83 83 foreach ($words as $w) { 84 84 if ($w == $words[0] || $w == end($words)) { 85 85 $reduced .= $w; 86 86 } 87 87 else { 88 - $reduced .= $w[0]."_"; 88 + $reduced .= $w[0].'_'; 89 89 } 90 90 } 91 91 } ··· 98 98 } 99 99 100 100 protected function generateEmail($username) { 101 - $default_email_domain = "example.com"; 102 - $email = $username."@".$default_email_domain; 101 + $default_email_domain = 'example.com'; 102 + $email = $username.'@'.$default_email_domain; 103 103 return $email; 104 104 } 105 105 }
+4 -4
src/applications/people/storage/PhabricatorUser.php
··· 125 125 public function setPassword(PhutilOpaqueEnvelope $envelope) { 126 126 if (!$this->getPHID()) { 127 127 throw new Exception( 128 - "You can not set a password for an unsaved user because their PHID ". 129 - "is a salt component in the password hash."); 128 + 'You can not set a password for an unsaved user because their PHID '. 129 + 'is a salt component in the password hash.'); 130 130 } 131 131 132 132 if (!strlen($envelope->openEnvelope())) { ··· 326 326 } 327 327 break; 328 328 default: 329 - throw new Exception("Unknown CSRF token format!"); 329 + throw new Exception('Unknown CSRF token format!'); 330 330 } 331 331 } 332 332 ··· 371 371 public function loadPrimaryEmailAddress() { 372 372 $email = $this->loadPrimaryEmail(); 373 373 if (!$email) { 374 - throw new Exception("User has no primary email address!"); 374 + throw new Exception('User has no primary email address!'); 375 375 } 376 376 return $email->getAddress(); 377 377 }
+1 -1
src/applications/phame/conduit/ConduitAPI_phame_query_Method.php
··· 6 6 final class ConduitAPI_phame_query_Method extends ConduitAPI_phame_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Query phame blogs."; 9 + return 'Query phame blogs.'; 10 10 } 11 11 12 12 public function getMethodStatus() {
+1 -1
src/applications/phame/conduit/ConduitAPI_phame_queryposts_Method.php
··· 6 6 final class ConduitAPI_phame_queryposts_Method extends ConduitAPI_phame_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Query phame posts."; 9 + return 'Query phame posts.'; 10 10 } 11 11 12 12 public function getMethodStatus() {
+2 -2
src/applications/phame/config/PhabricatorPhameConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Phame"); 7 + return pht('Phame'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Phame blogs."); 11 + return pht('Configure Phame blogs.'); 12 12 } 13 13 14 14 public function getOptions() {
+1 -1
src/applications/phame/skins/PhameSkinSpecification.php
··· 105 105 $spec->addPhutilLibrary($path.DIRECTORY_SEPARATOR.'src'); 106 106 break; 107 107 default: 108 - throw new Exception("Unknown skin type!"); 108 + throw new Exception('Unknown skin type!'); 109 109 } 110 110 111 111 $spec->setType($type);
+2 -2
src/applications/phame/storage/PhameBlog.php
··· 46 46 47 47 if (!$spec) { 48 48 throw new Exception( 49 - "This blog has an invalid skin, and the default skin failed to ". 50 - "load."); 49 + 'This blog has an invalid skin, and the default skin failed to '. 50 + 'load.'); 51 51 } 52 52 53 53 $skin = newv($spec->getSkinClass(), array($request));
+1 -1
src/applications/phid/conduit/ConduitAPI_phid_info_Method.php
··· 15 15 } 16 16 17 17 public function getMethodDescription() { 18 - return "Retrieve information about an arbitrary PHID."; 18 + return 'Retrieve information about an arbitrary PHID.'; 19 19 } 20 20 21 21 public function defineParamTypes() {
+1 -1
src/applications/phid/conduit/ConduitAPI_phid_lookup_Method.php
··· 7 7 extends ConduitAPI_phid_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Look up objects by name."; 10 + return 'Look up objects by name.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/phid/conduit/ConduitAPI_phid_query_Method.php
··· 7 7 extends ConduitAPI_phid_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Retrieve information about arbitrary PHIDs."; 10 + return 'Retrieve information about arbitrary PHIDs.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/phid/query/PhabricatorObjectQuery.php
··· 78 78 79 79 public function getNamedResults() { 80 80 if ($this->namedResults === null) { 81 - throw new Exception("Call execute() before getNamedResults()!"); 81 + throw new Exception('Call execute() before getNamedResults()!'); 82 82 } 83 83 return $this->namedResults; 84 84 }
+3 -3
src/applications/phid/query/__tests__/PhabricatorObjectListQueryTestCase.php
··· 26 26 $result = $this->parseObjectList("@{$name}, {$name}"); 27 27 $this->assertEqual(array($phid), $result); 28 28 29 - $result = $this->parseObjectList(""); 29 + $result = $this->parseObjectList(''); 30 30 $this->assertEqual(array(), $result); 31 31 32 32 // Expect failure when loading a user if objects must be of type "DUCK". 33 33 $caught = null; 34 34 try { 35 - $result = $this->parseObjectList("{$name}", array("DUCK")); 35 + $result = $this->parseObjectList("{$name}", array('DUCK')); 36 36 } catch (Exception $ex) { 37 37 $caught = $ex; 38 38 } ··· 42 42 // Expect failure when loading an invalid object. 43 43 $caught = null; 44 44 try { 45 - $result = $this->parseObjectList("invalid"); 45 + $result = $this->parseObjectList('invalid'); 46 46 } catch (Exception $ex) { 47 47 $caught = $ex; 48 48 }
+1 -1
src/applications/phid/storage/PhabricatorPHID.php
··· 9 9 10 10 public static function generateNewPHID($type, $subtype = null) { 11 11 if (!$type) { 12 - throw new Exception("Can not generate PHID with no type."); 12 + throw new Exception('Can not generate PHID with no type.'); 13 13 } 14 14 15 15 if ($subtype === null) {
+1 -1
src/applications/phid/type/PhabricatorPHIDType.php
··· 114 114 public function loadNamedObjects( 115 115 PhabricatorObjectQuery $query, 116 116 array $names) { 117 - throw new Exception("Not implemented!"); 117 + throw new Exception('Not implemented!'); 118 118 } 119 119 120 120
+2 -2
src/applications/pholio/config/PhabricatorPholioConfigOptions.php
··· 7 7 extends PhabricatorApplicationConfigOptions { 8 8 9 9 public function getName() { 10 - return pht("Pholio"); 10 + return pht('Pholio'); 11 11 } 12 12 13 13 public function getDescription() { 14 - return pht("Configure Pholio."); 14 + return pht('Configure Pholio.'); 15 15 } 16 16 17 17 public function getOptions() {
+1 -1
src/applications/pholio/controller/PholioInlineSaveController.php
··· 30 30 $new_content = $request->getStr('text'); 31 31 32 32 if (!strlen($new_content)) { 33 - throw new Exception("Content must not be empty."); 33 + throw new Exception('Content must not be empty.'); 34 34 } 35 35 36 36 $draft = id(new PholioTransactionComment());
+2 -2
src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php
··· 88 88 } 89 89 90 90 public function generateImages() { 91 - $images = newv("PhabricatorFile", array()) 92 - ->loadAllWhere("mimeType = %s", "image/jpeg"); 91 + $images = newv('PhabricatorFile', array()) 92 + ->loadAllWhere('mimeType = %s', 'image/jpeg'); 93 93 $rand_images = array(); 94 94 $quantity = rand(2, 10); 95 95 $quantity = min($quantity, count($images));
+2 -2
src/applications/pholio/mail/PholioReplyHandler.php
··· 7 7 8 8 public function validateMailReceiver($mail_receiver) { 9 9 if (!($mail_receiver instanceof PholioMock)) { 10 - throw new Exception("Mail receiver is not a PholioMock!"); 10 + throw new Exception('Mail receiver is not a PholioMock!'); 11 11 } 12 12 } 13 13 ··· 29 29 if ($this->supportsReplies()) { 30 30 // TODO: Implement. 31 31 return null; 32 - return pht("Reply to comment."); 32 + return pht('Reply to comment.'); 33 33 } else { 34 34 return null; 35 35 }
+2 -2
src/applications/pholio/view/PholioInlineCommentEditView.php
··· 33 33 34 34 public function render() { 35 35 if (!$this->uri) { 36 - throw new Exception("Call setSubmitURI() before render()!"); 36 + throw new Exception('Call setSubmitURI() before render()!'); 37 37 } 38 38 if (!$this->user) { 39 - throw new Exception("Call setUser() before render()!"); 39 + throw new Exception('Call setUser() before render()!'); 40 40 } 41 41 42 42 $content = phabricator_form(
+2 -2
src/applications/pholio/view/PholioInlineCommentSaveView.php
··· 26 26 27 27 public function render() { 28 28 if (!$this->uri) { 29 - throw new Exception("Call setSubmitURI() before render()!"); 29 + throw new Exception('Call setSubmitURI() before render()!'); 30 30 } 31 31 if (!$this->user) { 32 - throw new Exception("Call setUser() before render()!"); 32 + throw new Exception('Call setUser() before render()!'); 33 33 } 34 34 35 35 $content = phabricator_form(
+5 -5
src/applications/pholio/view/PholioInlineCommentView.php
··· 21 21 22 22 public function setInlineComment(PholioTransactionComment $inline_comment) { 23 23 if ($inline_comment->getImageID() === null) { 24 - throw new Exception("Comment provided is not inline comment"); 24 + throw new Exception('Comment provided is not inline comment'); 25 25 } 26 26 27 27 $this->inlineComment = $inline_comment; ··· 30 30 31 31 public function render() { 32 32 if (!$this->inlineComment) { 33 - throw new Exception("Call setInlineComment() before render()!"); 33 + throw new Exception('Call setInlineComment() before render()!'); 34 34 } 35 35 if ($this->user === null) { 36 - throw new Exception("Call setUser() before render()!"); 36 + throw new Exception('Call setUser() before render()!'); 37 37 } 38 38 if ($this->engine === null) { 39 - throw new Exception("Call setEngine() before render()!"); 39 + throw new Exception('Call setEngine() before render()!'); 40 40 } 41 41 if ($this->handle === null) { 42 - throw new Exception("Call setHandle() before render()!"); 42 + throw new Exception('Call setHandle() before render()!'); 43 43 } 44 44 45 45 $actions = null;
+1 -1
src/applications/pholio/view/PholioMockEmbedView.php
··· 20 20 21 21 public function render() { 22 22 if (!$this->mock) { 23 - throw new Exception("Call setMock() before render()!"); 23 + throw new Exception('Call setMock() before render()!'); 24 24 } 25 25 26 26 require_celerity_resource('pholio-css');
+1 -1
src/applications/pholio/view/PholioMockImagesView.php
··· 56 56 57 57 public function render() { 58 58 if (!$this->mock) { 59 - throw new Exception("Call setMock() before render()!"); 59 + throw new Exception('Call setMock() before render()!'); 60 60 } 61 61 62 62 $mock = $this->mock;
+1 -1
src/applications/pholio/view/PholioTransactionView.php
··· 59 59 $inlines[] = $xaction; 60 60 break; 61 61 default: 62 - throw new Exception("Unknown grouped transaction type!"); 62 + throw new Exception('Unknown grouped transaction type!'); 63 63 } 64 64 } 65 65
+1 -1
src/applications/phortune/controller/PhortuneAccountBuyController.php
··· 144 144 $form 145 145 ->appendChild( 146 146 id(new AphrontFormSubmitControl()) 147 - ->setValue(pht("Submit Payment")) 147 + ->setValue(pht('Submit Payment')) 148 148 ->setDisabled(!$methods)); 149 149 } 150 150
+1 -1
src/applications/phortune/controller/PhortuneController.php
··· 13 13 } else if (count($accounts) == 1) { 14 14 return head($accounts); 15 15 } else { 16 - throw new Exception("TODO: No account selection yet."); 16 + throw new Exception('TODO: No account selection yet.'); 17 17 } 18 18 } 19 19
+2 -2
src/applications/phortune/controller/PhortunePaymentMethodEditController.php
··· 27 27 $providers = PhortunePaymentProvider::getProvidersForAddPaymentMethod(); 28 28 if (!$providers) { 29 29 throw new Exception( 30 - "There are no payment providers enabled that can add payment ". 31 - "methods."); 30 + 'There are no payment providers enabled that can add payment '. 31 + 'methods.'); 32 32 } 33 33 34 34 $provider_key = $request->getStr('providerKey');
+1 -1
src/applications/phortune/controller/PhortuneProviderController.php
··· 31 31 32 32 $provider = PhortunePaymentProvider::getProviderByDigest($this->digest); 33 33 if (!$provider) { 34 - throw new Exception("Invalid payment provider digest!"); 34 + throw new Exception('Invalid payment provider digest!'); 35 35 } 36 36 37 37 if (!$provider->canRespondToControllerAction($this->getAction())) {
+2 -2
src/applications/phortune/currency/PhortuneCurrency.php
··· 54 54 55 55 public static function newFromUSDCents($cents) { 56 56 if (!is_int($cents)) { 57 - throw new Exception("USDCents value is not an integer!"); 57 + throw new Exception('USDCents value is not an integer!'); 58 58 } 59 59 60 60 $obj = new PhortuneCurrency(); ··· 75 75 case 'USD': 76 76 return sprintf('%.02f', $this->value / 100); 77 77 default: 78 - throw new Exception("Unsupported currency!"); 78 + throw new Exception('Unsupported currency!'); 79 79 80 80 } 81 81 }
+2 -2
src/applications/phortune/option/PhabricatorPhortuneConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Phortune"); 7 + return pht('Phortune'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure payments and billing."); 11 + return pht('Configure payments and billing.'); 12 12 } 13 13 14 14 public function getOptions() {
+2 -2
src/applications/phortune/provider/PhortunePaypalPaymentProvider.php
··· 25 25 } 26 26 27 27 public function getPaymentMethodProviderDescription() { 28 - return "Paypal"; 28 + return 'Paypal'; 29 29 } 30 30 31 31 ··· 37 37 protected function executeCharge( 38 38 PhortunePaymentMethod $payment_method, 39 39 PhortuneCharge $charge) { 40 - throw new Exception("!"); 40 + throw new Exception('!'); 41 41 } 42 42 43 43 private function getPaypalAPIUsername() {
+1 -1
src/applications/phortune/provider/PhortuneStripePaymentProvider.php
··· 52 52 $stripe_charge = Stripe_Charge::create($params, $secret_key); 53 53 $id = $stripe_charge->id; 54 54 if (!$id) { 55 - throw new Exception("Stripe charge call did not return an ID!"); 55 + throw new Exception('Stripe charge call did not return an ID!'); 56 56 } 57 57 58 58 $charge->setMetadataValue('stripe.chargeID', $id);
+2 -2
src/applications/phortune/provider/PhortuneWePayPaymentProvider.php
··· 26 26 } 27 27 28 28 public function getPaymentMethodProviderDescription() { 29 - return "WePay"; 29 + return 'WePay'; 30 30 } 31 31 32 32 ··· 38 38 protected function executeCharge( 39 39 PhortunePaymentMethod $payment_method, 40 40 PhortuneCharge $charge) { 41 - throw new Exception("!"); 41 + throw new Exception('!'); 42 42 } 43 43 44 44 private function getWePayClientID() {
+1 -1
src/applications/phpast/controller/PhabricatorXHPASTViewPanelController.php
··· 11 11 $this->storageTree = id(new PhabricatorXHPASTViewParseTree()) 12 12 ->load($this->id); 13 13 if (!$this->storageTree) { 14 - throw new Exception("No such AST!"); 14 + throw new Exception('No such AST!'); 15 15 } 16 16 } 17 17
+4 -4
src/applications/phragment/conduit/ConduitAPI_phragment_getpatch_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return pht("Retrieve the patches to apply for a given set of files."); 14 + return pht('Retrieve the patches to apply for a given set of files.'); 15 15 } 16 16 17 17 public function defineParamTypes() { ··· 137 137 // of files so we can draw diffs on them. 138 138 $hashes = array(); 139 139 foreach ($patches as $patch) { 140 - if ($patch["hashOld"] !== PhragmentPatchUtil::EMPTY_HASH) { 141 - $hashes[] = $patch["hashOld"]; 140 + if ($patch['hashOld'] !== PhragmentPatchUtil::EMPTY_HASH) { 141 + $hashes[] = $patch['hashOld']; 142 142 } 143 143 } 144 144 $old_files = array(); ··· 150 150 } 151 151 $old_files = mpull($old_files, null, 'getContentHash'); 152 152 foreach ($patches as $key => $patch) { 153 - if ($patch["hashOld"] !== PhragmentPatchUtil::EMPTY_HASH) { 153 + if ($patch['hashOld'] !== PhragmentPatchUtil::EMPTY_HASH) { 154 154 if (array_key_exists($patch['hashOld'], $old_files)) { 155 155 $patches[$key]['fileOld'] = $old_files[$patch['hashOld']]; 156 156 } else {
+1 -1
src/applications/phragment/conduit/ConduitAPI_phragment_queryfragments_Method.php
··· 11 11 } 12 12 13 13 public function getMethodDescription() { 14 - return pht("Query fragments based on their paths."); 14 + return pht('Query fragments based on their paths.'); 15 15 } 16 16 17 17 public function defineParamTypes() {
+1 -1
src/applications/phragment/controller/PhragmentBrowseController.php
··· 9 9 } 10 10 11 11 public function willProcessRequest(array $data) { 12 - $this->dblob = idx($data, "dblob", ""); 12 + $this->dblob = idx($data, 'dblob', ''); 13 13 } 14 14 15 15 public function processRequest() {
+10 -10
src/applications/phragment/controller/PhragmentController.php
··· 94 94 $fragment, 95 95 PhabricatorPolicyCapability::CAN_EDIT); 96 96 97 - $zip_uri = $this->getApplicationURI("zip/".$fragment->getPath()); 97 + $zip_uri = $this->getApplicationURI('zip/'.$fragment->getPath()); 98 98 99 99 $actions = id(new PhabricatorActionListView()) 100 100 ->setUser($viewer) ··· 116 116 $actions->addAction( 117 117 id(new PhabricatorActionView()) 118 118 ->setName(pht('Update Fragment')) 119 - ->setHref($this->getApplicationURI("update/".$fragment->getPath())) 119 + ->setHref($this->getApplicationURI('update/'.$fragment->getPath())) 120 120 ->setDisabled(!$can_edit) 121 121 ->setWorkflow(!$can_edit) 122 122 ->setIcon('fa-refresh')); ··· 124 124 $actions->addAction( 125 125 id(new PhabricatorActionView()) 126 126 ->setName(pht('Convert to File')) 127 - ->setHref($this->getApplicationURI("update/".$fragment->getPath())) 127 + ->setHref($this->getApplicationURI('update/'.$fragment->getPath())) 128 128 ->setDisabled(!$can_edit) 129 129 ->setWorkflow(!$can_edit) 130 130 ->setIcon('fa-file-o')); ··· 132 132 $actions->addAction( 133 133 id(new PhabricatorActionView()) 134 134 ->setName(pht('Set Fragment Policies')) 135 - ->setHref($this->getApplicationURI("policy/".$fragment->getPath())) 135 + ->setHref($this->getApplicationURI('policy/'.$fragment->getPath())) 136 136 ->setDisabled(!$can_edit) 137 137 ->setWorkflow(!$can_edit) 138 138 ->setIcon('fa-asterisk')); ··· 140 140 $actions->addAction( 141 141 id(new PhabricatorActionView()) 142 142 ->setName(pht('View Child Fragments')) 143 - ->setHref($this->getApplicationURI("browse/".$fragment->getPath())) 143 + ->setHref($this->getApplicationURI('browse/'.$fragment->getPath())) 144 144 ->setIcon('fa-search-plus')); 145 145 } else { 146 146 $actions->addAction( 147 147 id(new PhabricatorActionView()) 148 148 ->setName(pht('View History')) 149 - ->setHref($this->getApplicationURI("history/".$fragment->getPath())) 149 + ->setHref($this->getApplicationURI('history/'.$fragment->getPath())) 150 150 ->setIcon('fa-list')); 151 151 } 152 152 $actions->addAction( 153 153 id(new PhabricatorActionView()) 154 154 ->setName(pht('Create Snapshot')) 155 155 ->setHref($this->getApplicationURI( 156 - "snapshot/create/".$fragment->getPath())) 156 + 'snapshot/create/'.$fragment->getPath())) 157 157 ->setDisabled(!$can_edit) 158 158 ->setWorkflow(!$can_edit) 159 159 ->setIcon('fa-files-o')); ··· 161 161 id(new PhabricatorActionView()) 162 162 ->setName(pht('Promote Snapshot to Here')) 163 163 ->setHref($this->getApplicationURI( 164 - "snapshot/promote/latest/".$fragment->getPath())) 164 + 'snapshot/promote/latest/'.$fragment->getPath())) 165 165 ->setWorkflow(true) 166 166 ->setDisabled(!$can_edit) 167 167 ->setIcon('fa-arrow-circle-up')); ··· 202 202 } 203 203 204 204 function renderConfigurationWarningIfRequired() { 205 - $alt = PhabricatorEnv::getEnvConfig("security.alternate-file-domain"); 205 + $alt = PhabricatorEnv::getEnvConfig('security.alternate-file-domain'); 206 206 if ($alt === null) { 207 207 return id(new AphrontErrorView()) 208 208 ->setTitle(pht('security.alternate-file-domain must be configured!')) ··· 226 226 * the info page to viewers who are not logged in). 227 227 */ 228 228 function isCorrectlyConfigured() { 229 - $alt = PhabricatorEnv::getEnvConfig("security.alternate-file-domain"); 229 + $alt = PhabricatorEnv::getEnvConfig('security.alternate-file-domain'); 230 230 return $alt !== null; 231 231 } 232 232
+1 -1
src/applications/phragment/controller/PhragmentCreateController.php
··· 5 5 private $dblob; 6 6 7 7 public function willProcessRequest(array $data) { 8 - $this->dblob = idx($data, "dblob", ""); 8 + $this->dblob = idx($data, 'dblob', ''); 9 9 } 10 10 11 11 public function processRequest() {
+4 -4
src/applications/phragment/controller/PhragmentHistoryController.php
··· 9 9 } 10 10 11 11 public function willProcessRequest(array $data) { 12 - $this->dblob = idx($data, "dblob", ""); 12 + $this->dblob = idx($data, 'dblob', ''); 13 13 } 14 14 15 15 public function processRequest() { ··· 75 75 ->setIcon('fa-refresh') 76 76 ->setRenderNameAsTooltip(true) 77 77 ->setWorkflow(true) 78 - ->setName(pht("Revert to Here")) 78 + ->setName(pht('Revert to Here')) 79 79 ->setHref($this->getApplicationURI( 80 - "revert/".$version->getID()."/".$current->getPath()))); 80 + 'revert/'.$version->getID().'/'.$current->getPath()))); 81 81 } 82 82 83 83 $disabled = !isset($files[$version->getFilePHID()]); ··· 85 85 ->setIcon('fa-download') 86 86 ->setDisabled($disabled || !$this->isCorrectlyConfigured()) 87 87 ->setRenderNameAsTooltip(true) 88 - ->setName(pht("Download")); 88 + ->setName(pht('Download')); 89 89 if (!$disabled && $this->isCorrectlyConfigured()) { 90 90 $action->setHref($files[$version->getFilePHID()] 91 91 ->getDownloadURI($version->getURI()));
+4 -4
src/applications/phragment/controller/PhragmentPatchController.php
··· 10 10 } 11 11 12 12 public function willProcessRequest(array $data) { 13 - $this->aid = idx($data, "aid", 0); 14 - $this->bid = idx($data, "bid", 0); 13 + $this->aid = idx($data, 'aid', 0); 14 + $this->bid = idx($data, 'bid', 0); 15 15 } 16 16 17 17 public function processRequest() { ··· 22 22 // a patch of an empty file to the version specified by "bid". 23 23 24 24 $ids = array($this->aid, $this->bid); 25 - if ($this->aid === "x") { 25 + if ($this->aid === 'x') { 26 26 $ids = array($this->bid); 27 27 } 28 28 ··· 32 32 ->execute(); 33 33 34 34 $version_a = null; 35 - if ($this->aid !== "x") { 35 + if ($this->aid !== 'x') { 36 36 $version_a = idx($versions, $this->aid, null); 37 37 if ($version_a === null) { 38 38 return new Aphront404Response();
+1 -1
src/applications/phragment/controller/PhragmentPolicyController.php
··· 5 5 private $dblob; 6 6 7 7 public function willProcessRequest(array $data) { 8 - $this->dblob = idx($data, "dblob", ""); 8 + $this->dblob = idx($data, 'dblob', ''); 9 9 } 10 10 11 11 public function processRequest() {
+3 -3
src/applications/phragment/controller/PhragmentRevertController.php
··· 47 47 ->executeOne(); 48 48 if ($file === null) { 49 49 throw new Exception( 50 - "The file associated with this version was not found."); 50 + 'The file associated with this version was not found.'); 51 51 } 52 52 } 53 53 ··· 77 77 ->addSubmitButton(pht('Revert')) 78 78 ->addCancelButton(pht('Cancel')) 79 79 ->appendParagraph(pht( 80 - "Reverting this fragment to version %d will create a new version of ". 81 - "the fragment. It will not delete any version history.", 80 + 'Reverting this fragment to version %d will create a new version of '. 81 + 'the fragment. It will not delete any version history.', 82 82 $version->getSequence(), 83 83 $version->getSequence())); 84 84 return id(new AphrontDialogResponse())->setDialog($dialog);
+5 -5
src/applications/phragment/controller/PhragmentSnapshotCreateController.php
··· 5 5 private $dblob; 6 6 7 7 public function willProcessRequest(array $data) { 8 - $this->dblob = idx($data, "dblob", ""); 8 + $this->dblob = idx($data, 'dblob', ''); 9 9 } 10 10 11 11 public function processRequest() { ··· 79 79 } 80 80 } 81 81 82 - $fragment_sequence = "-"; 82 + $fragment_sequence = '-'; 83 83 if ($fragment->getLatestVersion() !== null) { 84 84 $fragment_sequence = $fragment->getLatestVersion()->getSequence(); 85 85 } ··· 98 98 phutil_tag('td', array(), $fragment->getPath()), 99 99 phutil_tag('td', array(), $fragment_sequence))); 100 100 foreach ($children as $child) { 101 - $sequence = "-"; 101 + $sequence = '-'; 102 102 if ($child->getLatestVersion() !== null) { 103 103 $sequence = $child->getLatestVersion()->getSequence(); 104 104 } ··· 123 123 'p', 124 124 array(), 125 125 pht( 126 - "The snapshot will contain the following fragments at ". 127 - "the specified versions: ")), 126 + 'The snapshot will contain the following fragments at '. 127 + 'the specified versions: ')), 128 128 $table)); 129 129 130 130 $form = id(new AphrontFormView())
+2 -2
src/applications/phragment/controller/PhragmentSnapshotDeleteController.php
··· 45 45 ->addSubmitButton(pht('Delete')) 46 46 ->addCancelButton(pht('Cancel')) 47 47 ->appendParagraph(pht( 48 - "Deleting this snapshot is a permanent operation. You can not ". 49 - "recover the state of the snapshot.")); 48 + 'Deleting this snapshot is a permanent operation. You can not '. 49 + 'recover the state of the snapshot.')); 50 50 return id(new AphrontDialogResponse())->setDialog($dialog); 51 51 } 52 52
+2 -2
src/applications/phragment/controller/PhragmentSnapshotPromoteController.php
··· 80 80 id(new AphrontDialogView()) 81 81 ->setTitle(pht('No snapshots to promote')) 82 82 ->appendParagraph(pht( 83 - "There are no snapshots available to promote.")) 83 + 'There are no snapshots available to promote.')) 84 84 ->setUser($request->getUser()) 85 85 ->addCancelButton(pht('Cancel'))); 86 86 } ··· 172 172 if ($this->id === null) { 173 173 // The user is promoting a snapshot to the latest version. 174 174 $dialog->appendParagraph(pht( 175 - "Select the snapshot you want to promote to the latest version:")); 175 + 'Select the snapshot you want to promote to the latest version:')); 176 176 } else { 177 177 // The user is promoting a snapshot to another snapshot. 178 178 $dialog->appendParagraph(pht(
+5 -5
src/applications/phragment/controller/PhragmentSnapshotViewController.php
··· 9 9 } 10 10 11 11 public function willProcessRequest(array $data) { 12 - $this->id = idx($data, "id", ""); 12 + $this->id = idx($data, 'id', ''); 13 13 } 14 14 15 15 public function processRequest() { ··· 100 100 ->setUser($viewer); 101 101 102 102 $zip_uri = $this->getApplicationURI( 103 - "zip@".$snapshot->getName(). 104 - "/".$snapshot->getPrimaryFragment()->getPath()); 103 + 'zip@'.$snapshot->getName(). 104 + '/'.$snapshot->getPrimaryFragment()->getPath()); 105 105 106 106 $can_edit = PhabricatorPolicyFilter::hasCapability( 107 107 $viewer, ··· 122 122 id(new PhabricatorActionView()) 123 123 ->setName(pht('Delete Snapshot')) 124 124 ->setHref($this->getApplicationURI( 125 - "snapshot/delete/".$snapshot->getID()."/")) 125 + 'snapshot/delete/'.$snapshot->getID().'/')) 126 126 ->setDisabled(!$can_edit) 127 127 ->setWorkflow(true) 128 128 ->setIcon('fa-times')); ··· 130 130 id(new PhabricatorActionView()) 131 131 ->setName(pht('Promote Another Snapshot to Here')) 132 132 ->setHref($this->getApplicationURI( 133 - "snapshot/promote/".$snapshot->getID()."/")) 133 + 'snapshot/promote/'.$snapshot->getID().'/')) 134 134 ->setDisabled(!$can_edit) 135 135 ->setWorkflow(true) 136 136 ->setIcon('fa-arrow-up'));
+2 -2
src/applications/phragment/controller/PhragmentUpdateController.php
··· 5 5 private $dblob; 6 6 7 7 public function willProcessRequest(array $data) { 8 - $this->dblob = idx($data, "dblob", ""); 8 + $this->dblob = idx($data, 'dblob', ''); 9 9 } 10 10 11 11 public function processRequest() { ··· 34 34 // If the file is a ZIP archive (has application/zip mimetype) 35 35 // then we extract the zip and apply versions for each of the 36 36 // individual fragments, creating and deleting files as needed. 37 - if ($file->getMimeType() === "application/zip") { 37 + if ($file->getMimeType() === 'application/zip') { 38 38 $fragment->updateFromZIP($viewer, $file); 39 39 } else { 40 40 $fragment->updateFromFile($viewer, $file);
+4 -4
src/applications/phragment/controller/PhragmentVersionController.php
··· 9 9 } 10 10 11 11 public function willProcessRequest(array $data) { 12 - $this->id = idx($data, "id", 0); 12 + $this->id = idx($data, 'id', 0); 13 13 } 14 14 15 15 public function processRequest() { ··· 48 48 49 49 $header = id(new PHUIHeaderView()) 50 50 ->setHeader(pht( 51 - "%s at version %d", 51 + '%s at version %d', 52 52 $version->getFragment()->getName(), 53 53 $version->getSequence())) 54 54 ->setPolicyObject($version) ··· 114 114 'patch/'.$previous_version->getID().'/'.$version->getID()); 115 115 $item->addAction(id(new PHUIListItemView()) 116 116 ->setIcon('fa-file-o') 117 - ->setName(pht("Get Patch")) 117 + ->setName(pht('Get Patch')) 118 118 ->setHref($this->isCorrectlyConfigured() ? $patch_uri : null) 119 119 ->setDisabled(!$this->isCorrectlyConfigured())); 120 120 $list->addItem($item); ··· 125 125 $item->addAttribute('Prior to any content (empty file)'); 126 126 $item->addAction(id(new PHUIListItemView()) 127 127 ->setIcon('fa-file-o') 128 - ->setName(pht("Get Patch")) 128 + ->setName(pht('Get Patch')) 129 129 ->setHref($this->getApplicationURI( 130 130 'patch/x/'.$version->getID()))); 131 131 $list->addItem($item);
+3 -3
src/applications/phragment/controller/PhragmentZIPController.php
··· 12 12 } 13 13 14 14 public function willProcessRequest(array $data) { 15 - $this->dblob = idx($data, "dblob", ""); 16 - $this->snapshot = idx($data, "snapshot", null); 15 + $this->dblob = idx($data, 'dblob', ''); 16 + $this->snapshot = idx($data, 'snapshot', null); 17 17 } 18 18 19 19 public function processRequest() { ··· 68 68 } 69 69 70 70 if (!$zip->open((string)$temp, ZipArchive::CREATE)) { 71 - throw new Exception("Unable to create ZIP archive!"); 71 + throw new Exception('Unable to create ZIP archive!'); 72 72 } 73 73 74 74 $mappings = $this->getFragmentMappings($fragment, $fragment->getPath());
+1 -1
src/applications/phragment/phid/PhragmentPHIDTypeFragment.php
··· 35 35 $fragment = $objects[$phid]; 36 36 37 37 $handle->setName(pht( 38 - "Fragment %s: %s", 38 + 'Fragment %s: %s', 39 39 $fragment->getID(), 40 40 $fragment->getName())); 41 41 $handle->setURI($fragment->getURI());
+1 -1
src/applications/phragment/phid/PhragmentPHIDTypeFragmentVersion.php
··· 35 35 $version = $objects[$phid]; 36 36 37 37 $handle->setName(pht( 38 - "Fragment Version %d: %s", 38 + 'Fragment Version %d: %s', 39 39 $version->getSequence(), 40 40 $version->getFragment()->getName())); 41 41 $handle->setURI($version->getURI());
+4 -4
src/applications/phragment/storage/PhragmentFragment.php
··· 85 85 return $fragment; 86 86 } 87 87 88 - if ($file->getMimeType() === "application/zip") { 88 + if ($file->getMimeType() === 'application/zip') { 89 89 $fragment->updateFromZIP($viewer, $file); 90 90 } else { 91 91 $fragment->updateFromFile($viewer, $file); ··· 130 130 PhabricatorUser $viewer, 131 131 PhabricatorFile $file) { 132 132 133 - if ($file->getMimeType() !== "application/zip") { 133 + if ($file->getMimeType() !== 'application/zip') { 134 134 throw new Exception("File must have mimetype 'application/zip'"); 135 135 } 136 136 ··· 149 149 $temp = new TempFile(); 150 150 Filesystem::writeFile($temp, $file->loadFileData()); 151 151 if (!$zip->open($temp)) { 152 - throw new Exception("Unable to open ZIP"); 152 + throw new Exception('Unable to open ZIP'); 153 153 } 154 154 155 155 // Get all of the paths and their data from the ZIP. ··· 182 182 continue; 183 183 } 184 184 $directory = dirname($path_key); 185 - while ($directory !== ".") { 185 + while ($directory !== '.') { 186 186 if (!array_key_exists($directory, $mappings)) { 187 187 $mappings[$directory] = null; 188 188 }
+5 -5
src/applications/phragment/util/PhragmentPatchUtil.php
··· 2 2 3 3 final class PhragmentPatchUtil extends Phobject { 4 4 5 - const EMPTY_HASH = "0000000000000000000000000000000000000000"; 5 + const EMPTY_HASH = '0000000000000000000000000000000000000000'; 6 6 7 7 /** 8 8 * Calculate the DiffMatchPatch patch between two Phabricator files. ··· 26 26 $new_hash = $new->getContentHash(); 27 27 } 28 28 29 - $old_content = ""; 30 - $new_content = ""; 29 + $old_content = ''; 30 + $new_content = ''; 31 31 32 32 if ($old_hash === $new_hash) { 33 33 return null; ··· 36 36 if ($old_hash !== self::EMPTY_HASH) { 37 37 $old_content = $old->loadFileData(); 38 38 } else { 39 - $old_content = ""; 39 + $old_content = ''; 40 40 } 41 41 42 42 if ($new_hash !== self::EMPTY_HASH) { 43 43 $new_content = $new->loadFileData(); 44 44 } else { 45 - $new_content = ""; 45 + $new_content = ''; 46 46 } 47 47 48 48 $dmp = new diff_match_patch();
+2 -2
src/applications/phrequent/config/PhabricatorPhrequentConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Phrequent"); 7 + return pht('Phrequent'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Phrequent."); 11 + return pht('Configure Phrequent.'); 12 12 } 13 13 14 14 public function getOptions() {
+1 -1
src/applications/phrequent/controller/PhrequentTrackController.php
··· 81 81 $form = new PHUIFormLayoutView(); 82 82 $form 83 83 ->appendChild(hsprintf( 84 - "<p>%s</p><br />", $inner_text)); 84 + '<p>%s</p><br />', $inner_text)); 85 85 86 86 $form->appendChild($epoch_control); 87 87
+1 -1
src/applications/phrequent/query/PhrequentSearchEngine.php
··· 186 186 ->addSigil('phrequent-stop-tracking') 187 187 ->setWorkflow(true) 188 188 ->setRenderNameAsTooltip(true) 189 - ->setName(pht("Stop")) 189 + ->setName(pht('Stop')) 190 190 ->setHref( 191 191 '/phrequent/track/stop/'. 192 192 $usertime->getObjectPHID().'/'));
+1 -1
src/applications/phriction/conduit/ConduitAPI_phriction_edit_Method.php
··· 4 4 extends ConduitAPI_phriction_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Update a Phriction document."; 7 + return 'Update a Phriction document.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+3 -3
src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Phriction"); 7 + return pht('Phriction'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options related to Phriction (wiki)."); 11 + return pht('Options related to Phriction (wiki).'); 12 12 } 13 13 14 14 public function getOptions() { 15 15 return array( 16 16 $this->newOption( 17 17 'metamta.phriction.subject-prefix', 'string', '[Phriction]') 18 - ->setDescription(pht("Subject prefix for Phriction email.")), 18 + ->setDescription(pht('Subject prefix for Phriction email.')), 19 19 ); 20 20 } 21 21
+1 -1
src/applications/phriction/controller/PhrictionDiffController.php
··· 114 114 pht('History'), 115 115 PhrictionDocument::getSlugURI($slug, 'history')); 116 116 117 - $title = pht("Version %s vs %s", $l, $r); 117 + $title = pht('Version %s vs %s', $l, $r); 118 118 119 119 $header = id(new PHUIHeaderView()) 120 120 ->setHeader($title);
+1 -1
src/applications/phriction/controller/PhrictionDocumentController.php
··· 289 289 } else if ($age == 1) { 290 290 $when = pht('Yesterday'); 291 291 } else { 292 - $when = pht("%d Days Ago", $age); 292 + $when = pht('%d Days Ago', $age); 293 293 } 294 294 $view->addProperty(pht('Last Updated'), $when); 295 295
+1 -1
src/applications/phriction/controller/PhrictionHistoryController.php
··· 83 83 $color = 'green'; 84 84 break; 85 85 default: 86 - throw new Exception("Unknown change type!"); 86 + throw new Exception('Unknown change type!'); 87 87 break; 88 88 } 89 89
+1 -1
src/applications/phriction/controller/PhrictionMoveController.php
··· 70 70 if (isset($disallowed_statuses[$document->getStatus()])) { 71 71 $error_dialog = id(new AphrontDialogView()) 72 72 ->setUser($user) 73 - ->setTitle("Can not move page!") 73 + ->setTitle('Can not move page!') 74 74 ->appendChild(pht('An already moved or deleted document '. 75 75 'can not be moved again.')) 76 76 ->addCancelButton($cancel_uri);
+5 -5
src/applications/phriction/editor/PhrictionDocumentEditor.php
··· 293 293 private function getChangeTypeDescription($const, $title) { 294 294 $map = array( 295 295 PhrictionChangeType::CHANGE_EDIT => 296 - pht("Phriction Document %s was edited.", $title), 296 + pht('Phriction Document %s was edited.', $title), 297 297 PhrictionChangeType::CHANGE_DELETE => 298 - pht("Phriction Document %s was deleted.", $title), 298 + pht('Phriction Document %s was deleted.', $title), 299 299 PhrictionChangeType::CHANGE_MOVE_HERE => 300 - pht("Phriction Document %s was moved here.", $title), 300 + pht('Phriction Document %s was moved here.', $title), 301 301 PhrictionChangeType::CHANGE_MOVE_AWAY => 302 - pht("Phriction Document %s was moved away.", $title), 302 + pht('Phriction Document %s was moved away.', $title), 303 303 PhrictionChangeType::CHANGE_STUB => 304 - pht("Phriction Document %s was created through child.", $title), 304 + pht('Phriction Document %s was created through child.', $title), 305 305 ); 306 306 return idx($map, $const, pht('Something magical occurred.')); 307 307 }
+2 -2
src/applications/policy/__tests__/PhabricatorPolicyTestCase.php
··· 175 175 * Test that invalid policies reject viewers of all types. 176 176 */ 177 177 public function testRejectInvalidPolicy() { 178 - $invalid_policy = "the duck goes quack"; 178 + $invalid_policy = 'the duck goes quack'; 179 179 $object = $this->buildObject($invalid_policy); 180 180 181 181 $this->expectVisibility( ··· 194 194 * policies. 195 195 */ 196 196 public function testInvalidPolicyVisibleByOmnipotentUser() { 197 - $invalid_policy = "the cow goes moo"; 197 + $invalid_policy = 'the cow goes moo'; 198 198 $object = $this->buildObject($invalid_policy); 199 199 200 200 $results = array(
+3 -3
src/applications/policy/config/PhabricatorPolicyConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Policy"); 7 + return pht('Policy'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options relating to object visibility."); 11 + return pht('Options relating to object visibility.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 18 18 array( 19 19 pht('Allow Public Visibility'), 20 20 pht('Require Login'))) 21 - ->setSummary(pht("Allow users to set object visibility to public.")) 21 + ->setSummary(pht('Allow users to set object visibility to public.')) 22 22 ->setDescription( 23 23 pht( 24 24 "Phabricator allows you to set the visibility of objects (like ".
+2 -2
src/applications/policy/controller/PhabricatorPolicyEditController.php
··· 54 54 $data = $request->getStr('rules'); 55 55 $data = @json_decode($data, true); 56 56 if (!is_array($data)) { 57 - throw new Exception("Failed to JSON decode rule data!"); 57 + throw new Exception('Failed to JSON decode rule data!'); 58 58 } 59 59 60 60 $rule_data = array(); ··· 178 178 id(new AphrontFormMarkupControl()) 179 179 ->setLabel(pht('If No Rules Match')) 180 180 ->setValue(pht( 181 - "%s all other users.", 181 + '%s all other users.', 182 182 $default_select))); 183 183 184 184 $form = phutil_tag(
+4 -4
src/applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php
··· 8 8 ->setName('show') 9 9 ->setSynopsis('Show policy information about an object.') 10 10 ->setExamples( 11 - "**show** D123") 11 + '**show** D123') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 26 26 if (!$obj_names) { 27 27 throw new PhutilArgumentUsageException( 28 28 pht( 29 - "Specify the name of an object to show policy information for.")); 29 + 'Specify the name of an object to show policy information for.')); 30 30 } else if (count($obj_names) > 1) { 31 31 throw new PhutilArgumentUsageException( 32 32 pht( 33 - "Specify the name of exactly one object to show policy information ". 34 - "for.")); 33 + 'Specify the name of exactly one object to show policy information '. 34 + 'for.')); 35 35 } 36 36 37 37 $object = id(new PhabricatorObjectQuery())
+3 -3
src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php
··· 10 10 'Unlock an object by setting its policies to allow anyone to view '. 11 11 'and edit it.') 12 12 ->setExamples( 13 - "**unlock** D123") 13 + '**unlock** D123') 14 14 ->setArguments( 15 15 array( 16 16 array( ··· 28 28 if (!$obj_names) { 29 29 throw new PhutilArgumentUsageException( 30 30 pht( 31 - "Specify the name of an object to unlock.")); 31 + 'Specify the name of an object to unlock.')); 32 32 } else if (count($obj_names) > 1) { 33 33 throw new PhutilArgumentUsageException( 34 34 pht( 35 - "Specify the name of exactly one object to unlock.")); 35 + 'Specify the name of exactly one object to unlock.')); 36 36 } 37 37 38 38 $object = id(new PhabricatorObjectQuery())
+2 -2
src/applications/policy/query/PhabricatorPolicyQuery.php
··· 56 56 public function loadPage() { 57 57 if ($this->object && $this->phids) { 58 58 throw new Exception( 59 - "You can not issue a policy query with both setObject() and ". 60 - "setPHIDs()."); 59 + 'You can not issue a policy query with both setObject() and '. 60 + 'setPHIDs().'); 61 61 } else if ($this->object) { 62 62 $phids = $this->loadObjectPolicyPHIDs(); 63 63 } else {
+1 -1
src/applications/ponder/controller/PonderQuestionViewController.php
··· 41 41 $answer_add_panel 42 42 ->setQuestion($question) 43 43 ->setUser($user) 44 - ->setActionURI("/ponder/answer/add/"); 44 + ->setActionURI('/ponder/answer/add/'); 45 45 } 46 46 47 47 $header = id(new PHUIHeaderView())
+1 -1
src/applications/ponder/editor/PonderVoteEditor.php
··· 25 25 public function saveVote() { 26 26 $actor = $this->requireActor(); 27 27 if (!$this->votable) { 28 - throw new Exception("Must set votable before saving vote"); 28 + throw new Exception('Must set votable before saving vote'); 29 29 } 30 30 31 31 $votable = $this->votable;
+1 -1
src/applications/ponder/mail/PonderQuestionReplyHandler.php
··· 4 4 5 5 public function validateMailReceiver($mail_receiver) { 6 6 if (!($mail_receiver instanceof PonderQuestion)) { 7 - throw new Exception("Mail receiver is not a PonderQuestion!"); 7 + throw new Exception('Mail receiver is not a PonderQuestion!'); 8 8 } 9 9 } 10 10
+2 -2
src/applications/ponder/storage/PonderAnswer.php
··· 160 160 161 161 public function describeAutomaticCapability($capability) { 162 162 $out = array(); 163 - $out[] = pht("The author of an answer can always view and edit it."); 163 + $out[] = pht('The author of an answer can always view and edit it.'); 164 164 switch ($capability) { 165 165 case PhabricatorPolicyCapability::CAN_VIEW: 166 166 $out[] = pht( 167 - "The user who asks a question can always view the answers."); 167 + 'The user who asks a question can always view the answers.'); 168 168 break; 169 169 } 170 170 return $out;
+1 -1
src/applications/ponder/storage/PonderQuestion.php
··· 48 48 } 49 49 50 50 public function attachRelated() { 51 - $this->answers = $this->loadRelatives(new PonderAnswer(), "questionID"); 51 + $this->answers = $this->loadRelatives(new PonderAnswer(), 'questionID'); 52 52 $qa_phids = mpull($this->answers, 'getPHID') + array($this->getPHID()); 53 53 54 54 if ($qa_phids) {
+1 -1
src/applications/project/conduit/ConduitAPI_project_query_Method.php
··· 6 6 final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method { 7 7 8 8 public function getMethodDescription() { 9 - return "Execute searches for Projects."; 9 + return 'Execute searches for Projects.'; 10 10 } 11 11 12 12 public function defineParamTypes() {
+4 -4
src/applications/project/config/PhabricatorProjectConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Projects"); 7 + return pht('Projects'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Configure Projects."); 11 + return pht('Configure Projects.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 29 29 ->setSummary(pht('Custom Projects fields.')) 30 30 ->setDescription( 31 31 pht( 32 - "Array of custom fields for Projects.")) 32 + 'Array of custom fields for Projects.')) 33 33 ->addExample( 34 34 '{"mycompany:motto": {"name": "Project Motto", '. 35 35 '"type": "string"}}', 36 36 pht('Valid Setting')), 37 37 $this->newOption('projects.fields', $custom_field_type, $default_fields) 38 38 ->setCustomData(id(new PhabricatorProject())->getCustomFieldBaseClass()) 39 - ->setDescription(pht("Select and reorder project fields.")), 39 + ->setDescription(pht('Select and reorder project fields.')), 40 40 ); 41 41 } 42 42
+2 -2
src/applications/project/storage/PhabricatorProject.php
··· 86 86 public function describeAutomaticCapability($capability) { 87 87 switch ($capability) { 88 88 case PhabricatorPolicyCapability::CAN_VIEW: 89 - return pht("Members of a project can always view it."); 89 + return pht('Members of a project can always view it.'); 90 90 case PhabricatorPolicyCapability::CAN_JOIN: 91 - return pht("Users who can edit a project can always join it."); 91 + return pht('Users who can edit a project can always join it.'); 92 92 } 93 93 return null; 94 94 }
+1 -1
src/applications/releeph/commitfinder/ReleephCommitFinder.php
··· 60 60 $callsign = $matches['callsign']; 61 61 if ($callsign != $repository->getCallsign()) { 62 62 throw new ReleephCommitFinderException(sprintf( 63 - "%s is in a different repository to this Releeph project (%s).", 63 + '%s is in a different repository to this Releeph project (%s).', 64 64 $partial_string, 65 65 $repository->getCallsign())); 66 66 } else {
+1 -1
src/applications/releeph/conduit/ConduitAPI_releeph_getbranches_Method.php
··· 4 4 extends ConduitAPI_releeph_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Return information about all active Releeph branches."; 7 + return 'Return information about all active Releeph branches.'; 8 8 } 9 9 10 10 public function defineParamTypes() {
+4 -4
src/applications/releeph/conduit/ConduitAPI_releeph_projectinfo_Method.php
··· 5 5 6 6 public function getMethodDescription() { 7 7 return 8 - "Fetch information about all Releeph projects ". 9 - "for a given Arcanist project."; 8 + 'Fetch information about all Releeph projects '. 9 + 'for a given Arcanist project.'; 10 10 } 11 11 12 12 public function defineParamTypes() { ··· 21 21 22 22 public function defineErrorTypes() { 23 23 return array( 24 - "ERR_UNKNOWN_ARC" => 24 + 'ERR_UNKNOWN_ARC' => 25 25 "The given Arcanist project name doesn't exist in the ". 26 26 "installation of Phabricator you are accessing.", 27 27 ); ··· 33 33 $arc_project = id(new PhabricatorRepositoryArcanistProject()) 34 34 ->loadOneWhere('name = %s', $arc_project_name); 35 35 if (!$arc_project) { 36 - throw id(new ConduitException("ERR_UNKNOWN_ARC")) 36 + throw id(new ConduitException('ERR_UNKNOWN_ARC')) 37 37 ->setErrorDescription( 38 38 "Unknown Arcanist project '{$arc_project_name}': ". 39 39 "are you using the correct Conduit URI?");
+1 -1
src/applications/releeph/conduit/ConduitAPI_releeph_queryrequests_Method.php
··· 5 5 6 6 public function getMethodDescription() { 7 7 return 8 - "Return information about all Releeph requests linked to the given ids."; 8 + 'Return information about all Releeph requests linked to the given ids.'; 9 9 } 10 10 11 11 public function defineParamTypes() {
+4 -4
src/applications/releeph/conduit/ConduitAPI_releeph_request_Method.php
··· 4 4 extends ConduitAPI_releeph_Method { 5 5 6 6 public function getMethodDescription() { 7 - return "Request a commit or diff to be picked to a branch."; 7 + return 'Request a commit or diff to be picked to a branch.'; 8 8 } 9 9 10 10 public function defineParamTypes() { ··· 21 21 22 22 public function defineErrorTypes() { 23 23 return array( 24 - "ERR_BRANCH" => 'Unknown Releeph branch.', 25 - "ERR_FIELD_PARSE" => 'Unable to parse a Releeph field.', 24 + 'ERR_BRANCH' => 'Unknown Releeph branch.', 25 + 'ERR_FIELD_PARSE' => 'Unable to parse a Releeph field.', 26 26 ); 27 27 } 28 28 ··· 41 41 ->executeOne(); 42 42 43 43 if (!$releeph_branch) { 44 - throw id(new ConduitException("ERR_BRANCH"))->setErrorDescription( 44 + throw id(new ConduitException('ERR_BRANCH'))->setErrorDescription( 45 45 "No ReleephBranch found with PHID {$branch_phid}!"); 46 46 } 47 47
+1 -1
src/applications/releeph/conduit/work/ConduitAPI_releephwork_canpush_Method.php
··· 8 8 } 9 9 10 10 public function getMethodDescription() { 11 - return "Return whether the conduit user is allowed to push."; 11 + return 'Return whether the conduit user is allowed to push.'; 12 12 } 13 13 14 14 public function defineParamTypes() {
+1 -1
src/applications/releeph/conduit/work/ConduitAPI_releephwork_getauthorinfo_Method.php
··· 8 8 } 9 9 10 10 public function getMethodDescription() { 11 - return "Return a string to use as the VCS author."; 11 + return 'Return a string to use as the VCS author.'; 12 12 } 13 13 14 14 public function defineParamTypes() {
+1 -1
src/applications/releeph/conduit/work/ConduitAPI_releephwork_getbranch_Method.php
··· 8 8 } 9 9 10 10 public function getMethodDescription() { 11 - return "Return information to help checkout / cut a Releeph branch."; 11 + return 'Return information to help checkout / cut a Releeph branch.'; 12 12 } 13 13 14 14 public function defineParamTypes() {
+4 -4
src/applications/releeph/conduit/work/ConduitAPI_releephwork_getbranchcommitmessage_Method.php
··· 8 8 } 9 9 10 10 public function getMethodDescription() { 11 - return "Get a commit message for committing a Releeph branch."; 11 + return 'Get a commit message for committing a Releeph branch.'; 12 12 } 13 13 14 14 public function defineParamTypes() { ··· 60 60 $commit_message[] = $h_branch->getFullName(); 61 61 $commit_message[] = $h_branch->getURI(); 62 62 63 - $commit_message[] = "Cut Point: ".$handles[$cut_phid]->getName(); 63 + $commit_message[] = 'Cut Point: '.$handles[$cut_phid]->getName(); 64 64 65 65 $cut_point_pr_commit = id(new PhabricatorRepositoryCommit()) 66 66 ->loadOneWhere('phid = %s', $cut_phid); ··· 69 69 $cut_point_pr_commit->getEpoch()); 70 70 $commit_message[] = "Cut Point Date: {$cut_point_commit_date}"; 71 71 72 - $commit_message[] = "Created By: ".$handles[$creator_phid]->getName(); 72 + $commit_message[] = 'Created By: '.$handles[$creator_phid]->getName(); 73 73 74 74 $project_uri = $project->getURI(); 75 - $commit_message[] = "Project: ".$h_project->getName()." ".$project_uri; 75 + $commit_message[] = 'Project: '.$h_project->getName().' '.$project_uri; 76 76 77 77 /** 78 78 * Required for 090-limit_new_branch_creations.sh in
+2 -2
src/applications/releeph/conduit/work/ConduitAPI_releephwork_getcommitmessage_Method.php
··· 9 9 10 10 public function getMethodDescription() { 11 11 return 12 - "Get commit message components for building ". 13 - "a ReleephRequest commit message."; 12 + 'Get commit message components for building '. 13 + 'a ReleephRequest commit message.'; 14 14 } 15 15 16 16 public function defineParamTypes() {
+3 -3
src/applications/releeph/conduit/work/ConduitAPI_releephwork_nextrequest_Method.php
··· 12 12 13 13 public function getMethodDescription() { 14 14 return 15 - "Return info required to cut a branch, ". 16 - "and pick and revert ReleephRequests"; 15 + 'Return info required to cut a branch, '. 16 + 'and pick and revert ReleephRequests'; 17 17 } 18 18 19 19 public function defineParamTypes() { ··· 99 99 $action = 'revert'; 100 100 $commit_id = $releeph_request->getCommitIdentifier(); 101 101 $commit_phid = $releeph_request->getCommitPHID(); 102 - } elseif ($needs_pick) { 102 + } else if ($needs_pick) { 103 103 $releeph_request = head($needs_pick); 104 104 $action = 'pick'; 105 105 $commit = $releeph_request->loadPhabricatorRepositoryCommit();
+2 -2
src/applications/releeph/conduit/work/ConduitAPI_releephwork_record_Method.php
··· 21 21 * reverted. 22 22 */ 23 23 public function getMethodDescription() { 24 - return "Record whether we committed a pick or revert ". 25 - "to the upstream repository."; 24 + return 'Record whether we committed a pick or revert '. 25 + 'to the upstream repository.'; 26 26 } 27 27 28 28 public function defineParamTypes() {
+1 -1
src/applications/releeph/conduit/work/ConduitAPI_releephwork_recordpickstatus_Method.php
··· 8 8 } 9 9 10 10 public function getMethodDescription() { 11 - return "Record whether a pick or revert was successful or not."; 11 + return 'Record whether a pick or revert was successful or not.'; 12 12 } 13 13 14 14 public function defineParamTypes() {
+14 -14
src/applications/releeph/config/PhabricatorApplicationReleephConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Releeph"); 7 + return pht('Releeph'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options for configuring Releeph, the release branch tool."); 11 + return pht('Options for configuring Releeph, the release branch tool.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 47 47 ->setSummary(pht('Enable the Releeph application.')) 48 48 ->setDescription( 49 49 pht( 50 - "Releeph, a tool for managing release branches, will eventually ". 51 - "fit in to the Phabricator suite as a general purpose tool. ". 52 - "However Releeph is currently unstable in multiple ways that may ". 53 - "not migrate properly for you: the code is still in alpha stage ". 54 - "of design, the storage format is likely to change in unexpected ". 55 - "ways, and the workflows presented are very specific to a core ". 56 - "set of alpha testers at Facebook. For the time being you are ". 57 - "strongly discouraged from relying on Releeph being at all ". 58 - "stable.")), 50 + 'Releeph, a tool for managing release branches, will eventually '. 51 + 'fit in to the Phabricator suite as a general purpose tool. '. 52 + 'However Releeph is currently unstable in multiple ways that may '. 53 + 'not migrate properly for you: the code is still in alpha stage '. 54 + 'of design, the storage format is likely to change in unexpected '. 55 + 'ways, and the workflows presented are very specific to a core '. 56 + 'set of alpha testers at Facebook. For the time being you are '. 57 + 'strongly discouraged from relying on Releeph being at all '. 58 + 'stable.')), 59 59 $this->newOption('releeph.fields', $custom_field_type, $default) 60 60 ->setCustomData('ReleephFieldSpecification'), 61 61 $this->newOption( ··· 64 64 'releases/%P/%p-%Y%m%d-%v') 65 65 ->setDescription( 66 66 pht( 67 - "The default branch template for new branches in unconfigured ". 68 - "Releeph projects. This is also configurable on a per-project ". 69 - "basis.")), 67 + 'The default branch template for new branches in unconfigured '. 68 + 'Releeph projects. This is also configurable on a per-project '. 69 + 'basis.')), 70 70 ); 71 71 } 72 72
+3 -3
src/applications/releeph/controller/product/ReleephProductEditController.php
··· 71 71 'getName', 'getID'); 72 72 73 73 if (in_array($product_name, $other_releeph_product_names)) { 74 - $errors[] = pht("Releeph product name %s is already taken", 74 + $errors[] = pht('Releeph product name %s is already taken', 75 75 $product_name); 76 76 } 77 77 ··· 162 162 ->setValue($pick_failure_instructions) 163 163 ->setName('pickFailureInstructions') 164 164 ->setCaption( 165 - pht("Instructions for pick failures, which will be used " . 166 - "in emails generated by failed picks"))) 165 + pht('Instructions for pick failures, which will be used ' . 166 + 'in emails generated by failed picks'))) 167 167 ->appendChild( 168 168 id(new AphrontFormTextAreaControl()) 169 169 ->setLabel(pht('Tests paths'))
+5 -5
src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php
··· 44 44 mpull($projects, 'getID')); 45 45 if (!$branches) { 46 46 throw new Exception(sprintf( 47 - "D%d could be in the Releeph project(s) %s, ". 48 - "but this project / none of these projects have open branches.", 47 + 'D%d could be in the Releeph project(s) %s, '. 48 + 'but this project / none of these projects have open branches.', 49 49 $this->revision->getID(), 50 50 implode(', ', mpull($projects, 'getName')))); 51 51 } ··· 69 69 ->addCancelButton('/D'.$request->getStr('D')); 70 70 71 71 $dialog->appendChild( 72 - pht("This differential revision changes code that is associated ". 73 - "with multiple Releeph branches. ". 74 - "Please select the branch where you would like this code to be picked.")); 72 + pht('This differential revision changes code that is associated '. 73 + 'with multiple Releeph branches. '. 74 + 'Please select the branch where you would like this code to be picked.')); 75 75 76 76 foreach ($branch_groups as $project_id => $branches) { 77 77 $project = idx($projects, $project_id);
+2 -2
src/applications/releeph/controller/request/ReleephRequestEditController.php
··· 93 93 if ($request_identifier === 94 94 ReleephRequestTypeaheadControl::PLACEHOLDER) { 95 95 96 - $errors[] = "No commit ID was provided."; 96 + $errors[] = 'No commit ID was provided.'; 97 97 $e_request_identifier = 'Required'; 98 98 } else { 99 99 $pr_commit = null; ··· 206 206 $notice_messages = array( 207 207 'You are editing an existing pick request!', 208 208 hsprintf( 209 - "Requested %s by %s", 209 + 'Requested %s by %s', 210 210 $age_string, 211 211 $handles[$pull->getRequestUserPHID()]->renderLink()) 212 212 );
+1 -1
src/applications/releeph/controller/request/ReleephRequestViewController.php
··· 73 73 $pull->getPHID()); 74 74 75 75 $title = hsprintf( 76 - "%s %s", 76 + '%s %s', 77 77 $pull->getMonogram(), 78 78 $pull->getSummaryForDisplay()); 79 79
+5 -5
src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php
··· 217 217 $lists[] = implode(', ', $rq_ids).' in '.$branch_name; 218 218 } 219 219 throw new DifferentialFieldParseException( 220 - "Commit message references multiple Releeph requests, ". 221 - "but the requests are in different branches: ". 220 + 'Commit message references multiple Releeph requests, '. 221 + 'but the requests are in different branches: '. 222 222 implode('; ', $lists)); 223 223 } 224 224 } ··· 353 353 354 354 if ($in_branch && $ex_branch) { 355 355 $error = sprintf( 356 - "CONFUSION: commit %s in %s contains %d path change(s) that were ". 357 - "part of a Releeph branch, but also has %d path change(s) not ". 358 - "part of a Releeph branch!", 356 + 'CONFUSION: commit %s in %s contains %d path change(s) that were '. 357 + 'part of a Releeph branch, but also has %d path change(s) not '. 358 + 'part of a Releeph branch!', 359 359 $commit->getCommitIdentifier(), 360 360 $repo->getCallsign(), 361 361 count($in_branch),
+1 -1
src/applications/releeph/editor/ReleephRequestTransactionalEditor.php
··· 253 253 } 254 254 } 255 255 256 - $name = sprintf("RQ%s: %s", $rq->getID(), $rq->getSummaryForDisplay()); 256 + $name = sprintf('RQ%s: %s', $rq->getID(), $rq->getSummaryForDisplay()); 257 257 $body->addTextSection( 258 258 pht('RELEEPH REQUEST'), 259 259 $name."\n".
+1 -1
src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
··· 70 70 ' + tests'); 71 71 } 72 72 73 - $blurb = hsprintf("%s%s.", 73 + $blurb = hsprintf('%s%s.', 74 74 pht('%d line(s)', $mr_changes['code']['lines']).' and '. 75 75 pht('%d path(s)', count($mr_changes['code']['paths'])).' over '. 76 76 pht('%d diff(s)', count($diffs)),
+2 -2
src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php
··· 83 83 } 84 84 85 85 public function renderLabelForCommitMessage() { 86 - return "Approved By"; 86 + return 'Approved By'; 87 87 } 88 88 89 89 public function renderLabelForRevertMessage() { 90 - return "Rejected By"; 90 + return 'Rejected By'; 91 91 } 92 92 93 93 public function renderValueForCommitMessage() {
+1 -1
src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php
··· 43 43 44 44 if ($this->error) { 45 45 $control->setError($this->error); 46 - } elseif ($this->getDefaultLevel()) { 46 + } else if ($this->getDefaultLevel()) { 47 47 $control->setError(true); 48 48 } 49 49
+1 -1
src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
··· 47 47 $this->error = 'Required'; 48 48 throw new ReleephFieldParseException( 49 49 $this, 50 - "You must give a reason for your request."); 50 + 'You must give a reason for your request.'); 51 51 } 52 52 } 53 53
+1 -1
src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php
··· 35 35 } 36 36 37 37 public function renderLabelForCommitMessage() { 38 - return "Requested By"; 38 + return 'Requested By'; 39 39 } 40 40 41 41 public function renderValueForCommitMessage() {
+1 -1
src/applications/releeph/mail/ReleephRequestReplyHandler.php
··· 4 4 5 5 public function validateMailReceiver($mail_receiver) { 6 6 if (!($mail_receiver instanceof ReleephRequest)) { 7 - throw new Exception("Mail receiver is not a ReleephRequest!"); 7 + throw new Exception('Mail receiver is not a ReleephRequest!'); 8 8 } 9 9 } 10 10
+2 -2
src/applications/releeph/storage/ReleephRequest.php
··· 131 131 // was once in the branch. 132 132 if ($has_been_in_branch) { 133 133 return ReleephRequestStatus::STATUS_REVERTED; 134 - } elseif ($this->getPusherIntent() === ReleephRequest::INTENT_PASS) { 134 + } else if ($this->getPusherIntent() === ReleephRequest::INTENT_PASS) { 135 135 // Otherwise, if it has never been in the branch, explicitly say why: 136 136 return ReleephRequestStatus::STATUS_REJECTED; 137 - } elseif ($this->getRequestorIntent() === ReleephRequest::INTENT_WANT) { 137 + } else if ($this->getRequestorIntent() === ReleephRequest::INTENT_WANT) { 138 138 return ReleephRequestStatus::STATUS_REQUESTED; 139 139 } else { 140 140 return ReleephRequestStatus::STATUS_ABANDONED;
+1 -1
src/applications/releeph/storage/ReleephRequestTransaction.php
··· 256 256 // ReleephSummaryFieldSpecification is usually blank when an RQ is created, 257 257 // creating a transaction change from null to "". Hide these! 258 258 if ($type === ReleephRequestTransaction::TYPE_EDIT_FIELD) { 259 - if ($this->getOldValue() === null && $this->getNewValue() === "") { 259 + if ($this->getOldValue() === null && $this->getNewValue() === '') { 260 260 return true; 261 261 } 262 262 }
+3 -3
src/applications/releeph/view/branch/ReleephBranchTemplate.php
··· 174 174 $part_error = null; 175 175 if (preg_match('{^\.}', $part) || preg_match('{\.$}', $part)) { 176 176 $errors[] = "Path components cannot begin or end with '.'"; 177 - } elseif (preg_match('{^(?!\w)}', $part)) { 178 - $errors[] = "Path components must begin with an alphanumeric"; 179 - } elseif (!preg_match('{^\w ([\w-_%\.]* [\w-_%])?$}x', $part)) { 177 + } else if (preg_match('{^(?!\w)}', $part)) { 178 + $errors[] = 'Path components must begin with an alphanumeric'; 179 + } else if (!preg_match('{^\w ([\w-_%\.]* [\w-_%])?$}x', $part)) { 180 180 $errors[] = 181 181 "Path components may only contain alphanumerics ". 182 182 "or '-', '_', or '.'";
+5 -5
src/applications/repository/PhabricatorRepositoryConfigOptions.php
··· 19 19 $this->newOption('repository.default-local-path', 'string', '/var/repo/') 20 20 ->setLocked(true) 21 21 ->setSummary( 22 - pht("Default location to store local copies of repositories.")) 22 + pht('Default location to store local copies of repositories.')) 23 23 ->setDescription( 24 24 pht( 25 - "The default location in which to store working copies and other ". 26 - "data about repositories. Phabricator will control and manage ". 27 - "data here, so you should **not** choose an existing directory ". 28 - "full of data you care about.")), 25 + 'The default location in which to store working copies and other '. 26 + 'data about repositories. Phabricator will control and manage '. 27 + 'data here, so you should **not** choose an existing directory '. 28 + 'full of data you care about.')), 29 29 ); 30 30 } 31 31
+1 -1
src/applications/repository/application/PhabricatorApplicationRepositories.php
··· 18 18 } 19 19 20 20 public function getTitleGlyph() { 21 - return "rX"; 21 + return 'rX'; 22 22 } 23 23 24 24 public function getApplicationGroup() {
+2 -2
src/applications/repository/conduit/ConduitAPI_repository_create_Method.php
··· 11 11 } 12 12 13 13 public function getMethodStatusDescription() { 14 - return "Repository methods are new and subject to change."; 14 + return 'Repository methods are new and subject to change.'; 15 15 } 16 16 17 17 public function getMethodDescription() { 18 - return "Create a new repository (Admin Only)."; 18 + return 'Create a new repository (Admin Only).'; 19 19 } 20 20 21 21 public function defineParamTypes() {
+2 -2
src/applications/repository/conduit/ConduitAPI_repository_query_Method.php
··· 8 8 } 9 9 10 10 public function getMethodStatusDescription() { 11 - return pht("Repository methods are new and subject to change."); 11 + return pht('Repository methods are new and subject to change.'); 12 12 } 13 13 14 14 public function getMethodDescription() { 15 - return pht("Query repositories."); 15 + return pht('Query repositories.'); 16 16 } 17 17 18 18 public function defineParamTypes() {
+1 -1
src/applications/repository/controller/PhabricatorRepositoryController.php
··· 13 13 $page->setApplicationName('Repositories'); 14 14 $page->setBaseURI('/repository/'); 15 15 $page->setTitle(idx($data, 'title')); 16 - $page->setGlyph("rX"); 16 + $page->setGlyph('rX'); 17 17 $page->appendChild($view); 18 18 19 19
+1 -1
src/applications/repository/daemon/PhabricatorGitGraphStream.php
··· 16 16 $this->repository = $repository; 17 17 18 18 $future = $repository->getLocalCommandFuture( 19 - "log --format=%s %s --", 19 + 'log --format=%s %s --', 20 20 '%H%x01%P%x01%ct', 21 21 $start_commit); 22 22
+7 -7
src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
··· 110 110 $this->log(pht('Examining branch "%s", at "%s".', $name, $commit)); 111 111 112 112 if (!$repository->shouldTrackBranch($name)) { 113 - $this->log(pht("Skipping, branch is untracked.")); 113 + $this->log(pht('Skipping, branch is untracked.')); 114 114 continue; 115 115 } 116 116 117 117 if ($this->isKnownCommit($commit)) { 118 - $this->log(pht("Skipping, HEAD is known.")); 118 + $this->log(pht('Skipping, HEAD is known.')); 119 119 continue; 120 120 } 121 121 122 - $this->log(pht("Looking for new commits.")); 122 + $this->log(pht('Looking for new commits.')); 123 123 124 124 $branch_refs = $this->discoverStreamAncestry( 125 125 new PhabricatorGitGraphStream($repository, $commit), ··· 158 158 $remote_uri = $matches[1]; 159 159 $expect_remote = $repository->getRemoteURI(); 160 160 161 - if ($remote_uri == "origin") { 161 + if ($remote_uri == 'origin') { 162 162 // If a remote does not exist, git pretends it does and prints out a 163 163 // made up remote where the URI is the same as the remote name. This is 164 164 // definitely not correct. ··· 368 368 369 369 $this->log(pht('Examining branch "%s" head "%s".', $name, $commit)); 370 370 if (!$repository->shouldTrackBranch($name)) { 371 - $this->log(pht("Skipping, branch is untracked.")); 371 + $this->log(pht('Skipping, branch is untracked.')); 372 372 continue; 373 373 } 374 374 375 375 if ($this->isKnownCommit($commit)) { 376 - $this->log(pht("Skipping, this head is a known commit.")); 376 + $this->log(pht('Skipping, this head is a known commit.')); 377 377 continue; 378 378 } 379 379 380 - $this->log(pht("Looking for new commits.")); 380 + $this->log(pht('Looking for new commits.')); 381 381 382 382 $branch_refs = $this->discoverStreamAncestry( 383 383 new PhabricatorMercurialGraphStream($repository, $commit),
+1 -1
src/applications/repository/engine/PhabricatorRepositoryEngine.php
··· 23 23 */ 24 24 protected function getRepository() { 25 25 if ($this->repository === null) { 26 - throw new Exception("Call setRepository() to provide a repository!"); 26 + throw new Exception('Call setRepository() to provide a repository!'); 27 27 } 28 28 29 29 return $this->repository;
+1 -1
src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php
··· 123 123 124 124 // Walk past the parent information. 125 125 $parent_id = null; 126 - for ($ii = 0; ; ++$ii) { 126 + for ($ii = 0;; ++$ii) { 127 127 if ($items[$ii] === null) { 128 128 break; 129 129 }
+1 -1
src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php
··· 7 7 $this 8 8 ->setName('cache') 9 9 ->setExamples( 10 - "**cache** [__options__] --commit __commit__ --path __path__") 10 + '**cache** [__options__] --commit __commit__ --path __path__') 11 11 ->setSynopsis(pht('Manage the repository graph cache.')) 12 12 ->setArguments( 13 13 array(
+1 -1
src/applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php
··· 31 31 32 32 if (!$repos) { 33 33 throw new PhutilArgumentUsageException( 34 - "Specify one or more repositories to discover, by callsign."); 34 + 'Specify one or more repositories to discover, by callsign.'); 35 35 } 36 36 37 37 $console = PhutilConsole::getConsole();
+3 -3
src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php
··· 32 32 33 33 if (!$repos) { 34 34 throw new PhutilArgumentUsageException( 35 - "Specify one or more repositories to edit, by callsign."); 35 + 'Specify one or more repositories to edit, by callsign.'); 36 36 } 37 37 38 38 $console = PhutilConsole::getConsole(); ··· 47 47 $username = $args->getArg('as'); 48 48 if (!$username) { 49 49 throw new PhutilArgumentUsageException( 50 - pht("Specify a user to edit as with --as <username>.")); 50 + pht('Specify a user to edit as with --as <username>.')); 51 51 } 52 52 53 53 $actor = id(new PhabricatorPeopleQuery()) ··· 75 75 76 76 if (!$xactions) { 77 77 throw new PhutilArgumentUsageException( 78 - pht("Specify one or more fields to edit!")); 78 + pht('Specify one or more fields to edit!')); 79 79 } 80 80 81 81 $content_source = PhabricatorContentSource::newConsoleSource();
+4 -4
src/applications/repository/management/PhabricatorRepositoryManagementImportingWorkflow.php
··· 28 28 29 29 if (!$repos) { 30 30 throw new PhutilArgumentUsageException( 31 - "Specify one or more repositories to find importing commits for, ". 32 - "by callsign."); 31 + 'Specify one or more repositories to find importing commits for, '. 32 + 'by callsign.'); 33 33 } 34 34 35 35 $repos = mpull($repos, null, 'getID'); ··· 52 52 $repo = $repos[$row['repositoryID']]; 53 53 $identifier = $row['commitIdentifier']; 54 54 55 - $console->writeOut("%s", 'r'.$repo->getCallsign().$identifier); 55 + $console->writeOut('%s', 'r'.$repo->getCallsign().$identifier); 56 56 57 57 if (!$args->getArg('simple')) { 58 58 $status = $row['importStatus']; ··· 70 70 $need[] = 'Herald'; 71 71 } 72 72 73 - $console->writeOut(" %s", implode(', ', $need)); 73 + $console->writeOut(' %s', implode(', ', $need)); 74 74 } 75 75 76 76 $console->writeOut("\n");
+2 -2
src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php
··· 21 21 $commits = $this->loadCommits($args, 'commits'); 22 22 if (!$commits) { 23 23 throw new PhutilArgumentUsageException( 24 - "Specify one or more commits to resolve users for."); 24 + 'Specify one or more commits to resolve users for.'); 25 25 } 26 26 27 27 $console = PhutilConsole::getConsole(); ··· 31 31 32 32 $console->writeOut( 33 33 "%s\n", 34 - pht("Examining commit %s...", $name)); 34 + pht('Examining commit %s...', $name)); 35 35 36 36 $ref = id(new DiffusionLowLevelCommitQuery()) 37 37 ->setRepository($repo)
+1 -1
src/applications/repository/management/PhabricatorRepositoryManagementMarkImportedWorkflow.php
··· 26 26 27 27 if (!$repos) { 28 28 throw new PhutilArgumentUsageException( 29 - "Specify one or more repositories to mark imported, by callsign."); 29 + 'Specify one or more repositories to mark imported, by callsign.'); 30 30 } 31 31 32 32 $new_importing_value = (bool)$args->getArg('mark-not-imported');
+2 -2
src/applications/repository/management/PhabricatorRepositoryManagementMirrorWorkflow.php
··· 28 28 if (!$repos) { 29 29 throw new PhutilArgumentUsageException( 30 30 pht( 31 - "Specify one or more repositories to push to mirrors, by ". 32 - "callsign.")); 31 + 'Specify one or more repositories to push to mirrors, by '. 32 + 'callsign.')); 33 33 } 34 34 35 35 $console = PhutilConsole::getConsole();
+1 -1
src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php
··· 26 26 27 27 if (!$repos) { 28 28 throw new PhutilArgumentUsageException( 29 - "Specify one or more repositories to pull, by callsign."); 29 + 'Specify one or more repositories to pull, by callsign.'); 30 30 } 31 31 32 32 $console = PhutilConsole::getConsole();
+2 -2
src/applications/repository/management/PhabricatorRepositoryManagementRefsWorkflow.php
··· 27 27 if (!$repos) { 28 28 throw new PhutilArgumentUsageException( 29 29 pht( 30 - "Specify one or more repositories to update refs for, ". 31 - "by callsign.")); 30 + 'Specify one or more repositories to update refs for, '. 31 + 'by callsign.')); 32 32 } 33 33 34 34 $console = PhutilConsole::getConsole();
+1 -1
src/applications/repository/phid/PhabricatorRepositoryPHIDTypeMirror.php
··· 35 35 36 36 $handle->setName( 37 37 pht('Mirror %d %s', $mirror->getID(), $mirror->getRemoteURI())); 38 - $handle->setURI("/diffusion/mirror/".$mirror->getID()."/"); 38 + $handle->setURI('/diffusion/mirror/'.$mirror->getID().'/'); 39 39 } 40 40 } 41 41
+2 -2
src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php
··· 22 22 ->withIDs(array($commit->getRepositoryID())) 23 23 ->executeOne(); 24 24 if (!$repository) { 25 - throw new Exception("No such repository!"); 25 + throw new Exception('No such repository!'); 26 26 } 27 27 28 28 $title = 'r'.$repository->getCallsign().$commit->getCommitIdentifier(). 29 - " ".$commit_data->getSummary(); 29 + ' '.$commit_data->getSummary(); 30 30 31 31 $doc = new PhabricatorSearchAbstractDocument(); 32 32 $doc->setPHID($commit->getPHID());
+7 -7
src/applications/repository/storage/PhabricatorRepository.php
··· 176 176 public function getSubversionPathURI($path = null, $commit = null) { 177 177 $vcs = $this->getVersionControlSystem(); 178 178 if ($vcs != PhabricatorRepositoryType::REPOSITORY_TYPE_SVN) { 179 - throw new Exception("Not a subversion repository!"); 179 + throw new Exception('Not a subversion repository!'); 180 180 } 181 181 182 182 if ($this->isHosted()) { ··· 372 372 $env['HGPLAIN'] = 1; 373 373 break; 374 374 default: 375 - throw new Exception("Unrecognized version control system."); 375 + throw new Exception('Unrecognized version control system.'); 376 376 } 377 377 378 378 return $env; ··· 403 403 // command-line flag instead of an environmental variable. 404 404 break; 405 405 default: 406 - throw new Exception("Unrecognized version control system."); 406 + throw new Exception('Unrecognized version control system.'); 407 407 } 408 408 } 409 409 ··· 457 457 } 458 458 break; 459 459 default: 460 - throw new Exception("Unrecognized version control system."); 460 + throw new Exception('Unrecognized version control system.'); 461 461 } 462 462 463 463 array_unshift($args, $pattern); ··· 480 480 $pattern = "hg {$pattern}"; 481 481 break; 482 482 default: 483 - throw new Exception("Unrecognized version control system."); 483 + throw new Exception('Unrecognized version control system.'); 484 484 } 485 485 486 486 array_unshift($args, $pattern); ··· 535 535 $uri); 536 536 break; 537 537 default: 538 - throw new Exception("Unrecognized version control system."); 538 + throw new Exception('Unrecognized version control system.'); 539 539 } 540 540 541 541 return $normalized_uri->getNormalizedPath(); ··· 617 617 case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: 618 618 return true; 619 619 default: 620 - throw new Exception("Unrecognized version control system."); 620 + throw new Exception('Unrecognized version control system.'); 621 621 } 622 622 623 623 $closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE;
+1 -1
src/applications/repository/storage/PhabricatorRepositoryVCSPassword.php
··· 26 26 PhutilOpaqueEnvelope $password, 27 27 PhabricatorUser $user) { 28 28 if ($user->getPHID() != $this->getUserPHID()) { 29 - throw new Exception("User does not match password user PHID!"); 29 + throw new Exception('User does not match password user PHID!'); 30 30 } 31 31 32 32 $raw_input = PhabricatorHash::digestPassword($password, $user->getPHID());
+2 -2
src/applications/repository/storage/__tests__/PhabricatorRepositoryTestCase.php
··· 106 106 107 107 public function testFilterMercurialDebugOutput() { 108 108 $map = array( 109 - "" => "", 109 + '' => '', 110 110 111 111 "quack\n" => "quack\n", 112 112 ··· 143 143 "ignoring untrusted configuration option x.y = z\n". 144 144 "duckignoring untrusted configuration option x.y = z\n". 145 145 "quack" => 146 - "duckquack", 146 + 'duckquack', 147 147 ); 148 148 149 149 foreach ($map as $input => $expect) {
+1 -1
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
··· 201 201 $template->setRelatedPHID($commit->getPHID()); 202 202 $template->setSubject("{$commit_name}: {$name}"); 203 203 $template->setSubjectPrefix($prefix); 204 - $template->setVarySubjectPrefix("[Commit]"); 204 + $template->setVarySubjectPrefix('[Commit]'); 205 205 $template->setBody($body); 206 206 $template->setThreadID($thread_id, $is_new = true); 207 207 $template->addHeader('Thread-Topic', $thread_topic);
+6 -6
src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php
··· 92 92 $reasons = array(); 93 93 94 94 if ($data->getCommitDetail('vsDiff')) { 95 - $reasons[] = "Changed After Revision Was Accepted"; 95 + $reasons[] = 'Changed After Revision Was Accepted'; 96 96 } 97 97 98 98 $commit_author_phid = $data->getCommitDetail('authorPHID'); 99 99 if (!$commit_author_phid) { 100 - $reasons[] = "Commit Author Not Recognized"; 100 + $reasons[] = 'Commit Author Not Recognized'; 101 101 } 102 102 103 103 $revision_id = $data->getCommitDetail('differential.revisionID'); ··· 113 113 $revision_author_phid = $revision->getAuthorPHID(); 114 114 $commit_reviewedby_phid = $data->getCommitDetail('reviewerPHID'); 115 115 if ($revision_author_phid !== $commit_author_phid) { 116 - $reasons[] = "Author Not Matching with Revision"; 116 + $reasons[] = 'Author Not Matching with Revision'; 117 117 } 118 118 } else { 119 - $reasons[] = "Revision Not Found"; 119 + $reasons[] = 'Revision Not Found'; 120 120 } 121 121 122 122 } else { 123 - $reasons[] = "No Revision Specified"; 123 + $reasons[] = 'No Revision Specified'; 124 124 } 125 125 126 126 $owners_phids = PhabricatorOwnersOwner::loadAffiliatedUserPHIDs( ··· 129 129 if (!($commit_author_phid && in_array($commit_author_phid, $owners_phids) || 130 130 $commit_reviewedby_phid && in_array($commit_reviewedby_phid, 131 131 $owners_phids))) { 132 - $reasons[] = "Owners Not Involved"; 132 + $reasons[] = 'Owners Not Involved'; 133 133 } 134 134 135 135 return $reasons;
+4 -4
src/applications/repository/worker/commitchangeparser/PhabricatorOwnersPackagePathValidator.php
··· 21 21 $move_map = array(); 22 22 foreach ($changes as $change) { 23 23 if ($change->getChangeType() == DifferentialChangeType::TYPE_MOVE_HERE) { 24 - $from_path = "/".$change->getTargetPath(); 25 - $to_path = "/".$change->getPath(); 24 + $from_path = '/'.$change->getTargetPath(); 25 + $to_path = '/'.$change->getPath(); 26 26 if ($change->getFileType() == DifferentialChangeType::FILE_DIRECTORY) { 27 - $to_path = $to_path."/"; 28 - $from_path = $from_path."/"; 27 + $to_path = $to_path.'/'; 28 + $from_path = $from_path.'/'; 29 29 } 30 30 $move_map[$from_path] = $to_path; 31 31 }
+1 -1
src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryCommitChangeParserWorker.php
··· 23 23 24 24 $this->log("Parsing %s...\n", $full_name); 25 25 if ($this->isBadCommit($full_name)) { 26 - $this->log("This commit is marked bad!"); 26 + $this->log('This commit is marked bad!'); 27 27 return; 28 28 } 29 29
+3 -3
src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php
··· 201 201 202 202 if ($source_file_type == DifferentialChangeType::FILE_DELETED) { 203 203 throw new Exception( 204 - "Something is wrong; source of a copy must exist."); 204 + 'Something is wrong; source of a copy must exist.'); 205 205 } 206 206 207 207 if ($source_file_type != DifferentialChangeType::FILE_DIRECTORY) { ··· 687 687 '(<size>(.*?)</size>)?@'; 688 688 $matches = null; 689 689 if (!preg_match($pattern, $entry, $matches)) { 690 - throw new Exception("Unable to parse entry!"); 690 + throw new Exception('Unable to parse entry!'); 691 691 } 692 692 $map[html_entity_decode($matches[2])] = 693 693 $this->getFileTypeFromSVNKind($matches[1]); ··· 737 737 } 738 738 } 739 739 if (!$done) { 740 - throw new Exception("Unexpected end of file."); 740 + throw new Exception('Unexpected end of file.'); 741 741 } 742 742 743 743 return $map;
+11 -11
src/applications/search/config/PhabricatorSearchConfigOptions.php
··· 4 4 extends PhabricatorApplicationConfigOptions { 5 5 6 6 public function getName() { 7 - return pht("Search"); 7 + return pht('Search'); 8 8 } 9 9 10 10 public function getDescription() { 11 - return pht("Options relating to Search."); 11 + return pht('Options relating to Search.'); 12 12 } 13 13 14 14 public function getOptions() { ··· 18 18 'class', 19 19 'PhabricatorDefaultSearchEngineSelector') 20 20 ->setBaseClass('PhabricatorSearchEngineSelector') 21 - ->setSummary(pht("Search engine selector.")) 21 + ->setSummary(pht('Search engine selector.')) 22 22 ->setDescription( 23 23 pht( 24 - "Phabricator uses a search engine selector to choose which ". 25 - "search engine to use when indexing and reconstructing ". 26 - "documents, and when executing queries. You can override the ". 27 - "engine selector to provide a new selector class which can ". 28 - "select some custom engine you implement, if you want to store ". 29 - "your documents in some search engine which does not have ". 30 - "default support.")), 24 + 'Phabricator uses a search engine selector to choose which '. 25 + 'search engine to use when indexing and reconstructing '. 26 + 'documents, and when executing queries. You can override the '. 27 + 'engine selector to provide a new selector class which can '. 28 + 'select some custom engine you implement, if you want to store '. 29 + 'your documents in some search engine which does not have '. 30 + 'default support.')), 31 31 $this->newOption('search.elastic.host', 'string', null) 32 32 ->setLocked(true) 33 - ->setDescription(pht("Elastic Search host.")) 33 + ->setDescription(pht('Elastic Search host.')) 34 34 ->addExample('http://elastic.example.com:9200/', pht('Valid Setting')), 35 35 ); 36 36 }
+6 -6
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 50 50 51 51 if (!$parent) { 52 52 throw new Exception( 53 - "You must delegate to this controller, not invoke it directly."); 53 + 'You must delegate to this controller, not invoke it directly.'); 54 54 } 55 55 56 56 $engine = $this->getSearchEngine(); 57 57 if (!$engine) { 58 58 throw new Exception( 59 - "Call setEngine() before delegating to this controller!"); 59 + 'Call setEngine() before delegating to this controller!'); 60 60 } 61 61 62 62 $nav = $this->getNavigation(); 63 63 if (!$nav) { 64 64 throw new Exception( 65 - "Call setNavigation() before delegating to this controller!"); 65 + 'Call setNavigation() before delegating to this controller!'); 66 66 } 67 67 68 68 $engine->setViewer($this->getRequest()->getUser()); ··· 231 231 232 232 // TODO: This is a bit hacky. 233 233 if ($list instanceof PHUIObjectItemListView) { 234 - $list->setNoDataString(pht("No results found for this query.")); 234 + $list->setNoDataString(pht('No results found for this query.')); 235 235 $list->setPager($pager); 236 236 } else { 237 237 if ($pager->willShowPagingControls()) { ··· 339 339 340 340 $crumbs = $parent 341 341 ->buildApplicationCrumbs() 342 - ->addTextCrumb(pht("Saved Queries"), $engine->getQueryManagementURI()); 342 + ->addTextCrumb(pht('Saved Queries'), $engine->getQueryManagementURI()); 343 343 344 344 $nav->selectFilter('query/edit'); 345 345 $nav->setCrumbs($crumbs); ··· 348 348 return $parent->buildApplicationPage( 349 349 $nav, 350 350 array( 351 - 'title' => pht("Saved Queries"), 351 + 'title' => pht('Saved Queries'), 352 352 'device' => true, 353 353 )); 354 354 }
+7 -7
src/applications/search/controller/PhabricatorSearchAttachController.php
··· 249 249 $instructions = null; 250 250 break; 251 251 case self::ACTION_MERGE: 252 - $dialog_title = "Merge Duplicate Tasks"; 253 - $header_text = "Tasks To Merge"; 252 + $dialog_title = 'Merge Duplicate Tasks'; 253 + $header_text = 'Tasks To Merge'; 254 254 $button_text = "Merge {$noun}"; 255 255 $instructions = 256 - "These tasks will be merged into the current task and then closed. ". 257 - "The current task will grow stronger."; 256 + 'These tasks will be merged into the current task and then closed. '. 257 + 'The current task will grow stronger.'; 258 258 break; 259 259 case self::ACTION_DEPENDENCIES: 260 - $dialog_title = "Edit Dependencies"; 261 - $header_text = "Current Dependencies"; 262 - $button_text = "Save Dependencies"; 260 + $dialog_title = 'Edit Dependencies'; 261 + $header_text = 'Current Dependencies'; 262 + $button_text = 'Save Dependencies'; 263 263 $instructions = null; 264 264 break; 265 265 case self::ACTION_BLOCKS:
+1 -1
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 30 30 31 31 protected function requireViewer() { 32 32 if (!$this->viewer) { 33 - throw new Exception("Call setViewer() before using an engine!"); 33 + throw new Exception('Call setViewer() before using an engine!'); 34 34 } 35 35 return $this->viewer; 36 36 }
+1 -1
src/applications/search/engine/PhabricatorSearchEngineElastic.php
··· 254 254 255 255 $body = json_decode($body, true); 256 256 if (!is_array($body)) { 257 - throw new Exception("elasticsearch server returned invalid JSON!"); 257 + throw new Exception('elasticsearch server returned invalid JSON!'); 258 258 } 259 259 260 260 return $body;
+1 -1
src/applications/search/engine/PhabricatorSearchEngineMySQL.php
··· 10 10 11 11 $phid = $doc->getPHID(); 12 12 if (!$phid) { 13 - throw new Exception("Document has no PHID!"); 13 + throw new Exception('Document has no PHID!'); 14 14 } 15 15 16 16 $store = new PhabricatorSearchDocument();
+1 -1
src/applications/search/storage/PhabricatorSavedQuery.php
··· 29 29 30 30 public function save() { 31 31 if ($this->getEngineClassName() === null) { 32 - throw new Exception(pht("Engine class is null.")); 32 + throw new Exception(pht('Engine class is null.')); 33 33 } 34 34 35 35 // Instantiate the engine to make sure it's valid.
+2 -2
src/applications/settings/panel/PhabricatorSettingsPanelAccount.php
··· 90 90 ->setName('timezone') 91 91 ->setOptions($timezone_id_map) 92 92 ->setValue($user->getTimezoneIdentifier())) 93 - ->appendRemarkupInstructions(pht("**Choose the pronoun you prefer:**")) 93 + ->appendRemarkupInstructions(pht('**Choose the pronoun you prefer:**')) 94 94 ->appendChild( 95 95 id(new AphrontFormSelectControl()) 96 96 ->setOptions($sexes) ··· 115 115 "| `H:i` | 14:34 | 24-hour time. |\n". 116 116 "\n\n". 117 117 "You can find a [[%s | full reference in the PHP manual]].", 118 - "http://www.php.net/manual/en/function.date.php")) 118 + 'http://www.php.net/manual/en/function.date.php')) 119 119 ->appendChild( 120 120 id(new AphrontFormTextControl()) 121 121 ->setLabel(pht('Time-of-Day Format'))
+3 -3
src/applications/settings/panel/PhabricatorSettingsPanelDiffPreferences.php
··· 50 50 1 => pht('Enable Filetree'), 51 51 )) 52 52 ->setCaption( 53 - pht("When looking at a revision or commit, enable a sidebar ". 54 - "showing affected files. You can press %s to show or hide ". 55 - "the sidebar.", 53 + pht('When looking at a revision or commit, enable a sidebar '. 54 + 'showing affected files. You can press %s to show or hide '. 55 + 'the sidebar.', 56 56 phutil_tag('tt', array(), 'f')))) 57 57 ->appendChild( 58 58 id(new AphrontFormSubmitControl())
+2 -2
src/applications/settings/panel/PhabricatorSettingsPanelEmailAddresses.php
··· 312 312 $dialog = id(new AphrontDialogView()) 313 313 ->setUser($user) 314 314 ->addHiddenInput('verify', $email_id) 315 - ->setTitle(pht("Send Another Verification Email?")) 315 + ->setTitle(pht('Send Another Verification Email?')) 316 316 ->appendChild(phutil_tag('p', array(), pht( 317 317 'Send another copy of the verification email to %s?', 318 318 $address))) ··· 358 358 $dialog = id(new AphrontDialogView()) 359 359 ->setUser($user) 360 360 ->addHiddenInput('primary', $email_id) 361 - ->setTitle(pht("Change primary email address?")) 361 + ->setTitle(pht('Change primary email address?')) 362 362 ->appendChild(phutil_tag('p', array(), pht( 363 363 'If you change your primary address, Phabricator will send'. 364 364 ' all email to %s.',
+7 -7
src/applications/settings/panel/PhabricatorSettingsPanelEmailPreferences.php
··· 217 217 private function getMailTags() { 218 218 return array( 219 219 MetaMTANotificationType::TYPE_DIFFERENTIAL_REVIEW_REQUEST => 220 - pht("A revision is created."), 220 + pht('A revision is created.'), 221 221 MetaMTANotificationType::TYPE_DIFFERENTIAL_UPDATED => 222 - pht("A revision is updated."), 222 + pht('A revision is updated.'), 223 223 MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMENT => 224 - pht("Someone comments on a revision."), 224 + pht('Someone comments on a revision.'), 225 225 MetaMTANotificationType::TYPE_DIFFERENTIAL_REVIEWERS => 226 226 pht("A revision's reviewers change."), 227 227 MetaMTANotificationType::TYPE_DIFFERENTIAL_CLOSED => 228 - pht("A revision is closed."), 228 + pht('A revision is closed.'), 229 229 MetaMTANotificationType::TYPE_DIFFERENTIAL_CC => 230 230 pht("A revision's CCs change."), 231 231 MetaMTANotificationType::TYPE_DIFFERENTIAL_OTHER => 232 - pht("Other revision activity not listed above occurs."), 232 + pht('Other revision activity not listed above occurs.'), 233 233 MetaMTANotificationType::TYPE_MANIPHEST_STATUS => 234 234 pht("A task's status changes."), 235 235 MetaMTANotificationType::TYPE_MANIPHEST_OWNER => 236 236 pht("A task's owner changes."), 237 237 MetaMTANotificationType::TYPE_MANIPHEST_COMMENT => 238 - pht("Someone comments on a task."), 238 + pht('Someone comments on a task.'), 239 239 MetaMTANotificationType::TYPE_MANIPHEST_PRIORITY => 240 240 pht("A task's priority changes."), 241 241 MetaMTANotificationType::TYPE_MANIPHEST_CC => ··· 243 243 MetaMTANotificationType::TYPE_MANIPHEST_PROJECTS => 244 244 pht("A task's associated projects change."), 245 245 MetaMTANotificationType::TYPE_MANIPHEST_OTHER => 246 - pht("Other task activity not listed above occurs."), 246 + pht('Other task activity not listed above occurs.'), 247 247 248 248 ); 249 249 }
+1 -1
src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
··· 365 365 ->appendParagraph($explain) 366 366 ->appendParagraph( 367 367 pht( 368 - "Phabricator will not retain a copy of the private key.")) 368 + 'Phabricator will not retain a copy of the private key.')) 369 369 ->addSubmitButton(pht('Generate Keypair')); 370 370 } catch (Exception $ex) { 371 371 $dialog
+1 -1
src/applications/slowvote/conduit/ConduitAPI_slowvote_info_Method.php
··· 7 7 extends ConduitAPI_slowvote_Method { 8 8 9 9 public function getMethodDescription() { 10 - return "Retrieve an array of information about a poll."; 10 + return 'Retrieve an array of information about a poll.'; 11 11 } 12 12 13 13 public function defineParamTypes() {
+1 -1
src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php
··· 152 152 for ($ii = 0; $ii < 10; $ii++) { 153 153 $n = ($ii + 1); 154 154 $response = id(new AphrontFormTextControl()) 155 - ->setLabel(pht("Response %d", $n)) 155 + ->setLabel(pht('Response %d', $n)) 156 156 ->setName('response[]') 157 157 ->setValue(idx($responses, $ii, '')); 158 158
+1 -1
src/applications/slowvote/view/SlowvoteEmbedView.php
··· 25 25 26 26 public function render() { 27 27 if (!$this->poll) { 28 - throw new Exception("Call setPoll() before render()!"); 28 + throw new Exception('Call setPoll() before render()!'); 29 29 } 30 30 31 31 $poll = $this->poll;
+3 -3
src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php
··· 72 72 73 73 if (!$xaction->getPHID()) { 74 74 throw new Exception( 75 - "Transaction must have a PHID before calling applyEdit()!"); 75 + 'Transaction must have a PHID before calling applyEdit()!'); 76 76 } 77 77 78 78 $type_comment = PhabricatorTransactions::TYPE_COMMENT; 79 79 if ($xaction->getTransactionType() == $type_comment) { 80 80 if ($comment->getPHID()) { 81 81 throw new Exception( 82 - "Transaction comment must not yet have a PHID!"); 82 + 'Transaction comment must not yet have a PHID!'); 83 83 } 84 84 } 85 85 86 86 if (!$this->getContentSource()) { 87 87 throw new Exception( 88 - "Call setContentSource() before applyEdit()!"); 88 + 'Call setContentSource() before applyEdit()!'); 89 89 } 90 90 91 91 $actor = $this->requireActor();
+9 -9
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 252 252 protected function getCustomTransactionOldValue( 253 253 PhabricatorLiskDAO $object, 254 254 PhabricatorApplicationTransaction $xaction) { 255 - throw new Exception("Capability not supported!"); 255 + throw new Exception('Capability not supported!'); 256 256 } 257 257 258 258 protected function getCustomTransactionNewValue( 259 259 PhabricatorLiskDAO $object, 260 260 PhabricatorApplicationTransaction $xaction) { 261 - throw new Exception("Capability not supported!"); 261 + throw new Exception('Capability not supported!'); 262 262 } 263 263 264 264 protected function transactionHasEffect( ··· 854 854 855 855 if (!$this->getContentSource()) { 856 856 throw new Exception( 857 - "Call setContentSource() before applyTransactions()!"); 857 + 'Call setContentSource() before applyTransactions()!'); 858 858 } 859 859 860 860 // Do a bunch of sanity checks that the incoming transactions are fresh. ··· 869 869 throw new PhabricatorApplicationTransactionStructureException( 870 870 $xaction, 871 871 pht( 872 - "You can not apply transactions which already have IDs/PHIDs!")); 872 + 'You can not apply transactions which already have IDs/PHIDs!')); 873 873 } 874 874 if ($xaction->getObjectPHID()) { 875 875 throw new PhabricatorApplicationTransactionStructureException( 876 876 $xaction, 877 877 pht( 878 - "You can not apply transactions which already have objectPHIDs!")); 878 + 'You can not apply transactions which already have objectPHIDs!')); 879 879 } 880 880 if ($xaction->getAuthorPHID()) { 881 881 throw new PhabricatorApplicationTransactionStructureException( ··· 1869 1869 * @task mail 1870 1870 */ 1871 1871 protected function buildReplyHandler(PhabricatorLiskDAO $object) { 1872 - throw new Exception("Capability not supported."); 1872 + throw new Exception('Capability not supported.'); 1873 1873 } 1874 1874 1875 1875 ··· 1877 1877 * @task mail 1878 1878 */ 1879 1879 protected function getMailSubjectPrefix() { 1880 - throw new Exception("Capability not supported."); 1880 + throw new Exception('Capability not supported.'); 1881 1881 } 1882 1882 1883 1883 ··· 1910 1910 * @task mail 1911 1911 */ 1912 1912 protected function buildMailTemplate(PhabricatorLiskDAO $object) { 1913 - throw new Exception("Capability not supported."); 1913 + throw new Exception('Capability not supported.'); 1914 1914 } 1915 1915 1916 1916 ··· 1918 1918 * @task mail 1919 1919 */ 1920 1920 protected function getMailTo(PhabricatorLiskDAO $object) { 1921 - throw new Exception("Capability not supported."); 1921 + throw new Exception('Capability not supported.'); 1922 1922 } 1923 1923 1924 1924
+2 -2
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 76 76 } 77 77 78 78 public function getApplicationTransactionCommentObject() { 79 - throw new Exception("Not implemented!"); 79 + throw new Exception('Not implemented!'); 80 80 } 81 81 82 82 public function getApplicationTransactionViewObject() { ··· 125 125 126 126 public function getComment() { 127 127 if ($this->commentNotLoaded) { 128 - throw new Exception("Comment for this transaction was not loaded."); 128 + throw new Exception('Comment for this transaction was not loaded.'); 129 129 } 130 130 return $this->comment; 131 131 }
+1 -1
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 151 151 } 152 152 153 153 if (!$this->getObjectPHID()) { 154 - throw new Exception("Call setObjectPHID() before render()!"); 154 + throw new Exception('Call setObjectPHID() before render()!'); 155 155 } 156 156 157 157 return id(new AphrontFormView())
+1 -1
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 148 148 149 149 public function render() { 150 150 if (!$this->getObjectPHID()) { 151 - throw new Exception("Call setObjectPHID() before render()!"); 151 + throw new Exception('Call setObjectPHID() before render()!'); 152 152 } 153 153 154 154 $view = new PHUITimelineView();
+1 -1
src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php
··· 285 285 286 286 $proj_result = id(new PhabricatorTypeaheadResult()) 287 287 ->setName($proj->getName()) 288 - ->setDisplayType("Project") 288 + ->setDisplayType('Project') 289 289 ->setURI('/project/view/'.$proj->getID().'/') 290 290 ->setPHID($proj->getPHID()) 291 291 ->setIcon($proj->getIcon().' bluegrey')
+1 -1
src/applications/uiexample/examples/PHUITimelineExample.php
··· 119 119 120 120 $events[] = id(new PHUITimelineEventView()) 121 121 ->setUserHandle($handle) 122 - ->setTitle("Colorless") 122 + ->setTitle('Colorless') 123 123 ->setIcon('lock'); 124 124 125 125 foreach ($colors as $color) {
+3 -3
src/applications/uiexample/examples/PhabricatorAphrontBarExample.php
··· 3 3 final class PhabricatorAphrontBarExample extends PhabricatorUIExample { 4 4 5 5 public function getName() { 6 - return "Bars"; 6 + return 'Bars'; 7 7 } 8 8 9 9 public function getDescription() { ··· 56 56 } 57 57 58 58 return $this->wrap( 59 - "Glyph bars in weird order", 59 + 'Glyph bars in weird order', 60 60 phutil_implode_html('', $views)); 61 61 } 62 62 63 63 private function renderAsciiStarBar() { 64 64 return $this->wrap( 65 - "Ascii star glyph bar", 65 + 'Ascii star glyph bar', 66 66 id(new AphrontGlyphBarView()) 67 67 ->setValue(50) 68 68 ->setMax(100)
+1 -1
src/applications/uiexample/examples/PhabricatorBusyExample.php
··· 7 7 } 8 8 9 9 public function getDescription() { 10 - return "Busy."; 10 + return 'Busy.'; 11 11 } 12 12 13 13 public function renderExample() {
+8 -8
src/applications/uiexample/examples/PhabricatorHovercardExample.php
··· 18 18 $elements = array(); 19 19 20 20 $diff_handle = $this->createBasicDummyHandle( 21 - "D123", 21 + 'D123', 22 22 DifferentialPHIDTypeRevision::TYPECONST, 23 - "Introduce cooler Differential Revisions"); 23 + 'Introduce cooler Differential Revisions'); 24 24 25 - $panel = $this->createPanel("Differential Hovercard"); 25 + $panel = $this->createPanel('Differential Hovercard'); 26 26 $panel->appendChild(id(new PhabricatorHovercardView()) 27 27 ->setObjectHandle($diff_handle) 28 28 ->addField(pht('Author'), $user->getUsername()) ··· 32 32 $elements[] = $panel; 33 33 34 34 $task_handle = $this->createBasicDummyHandle( 35 - "T123", 35 + 'T123', 36 36 ManiphestPHIDTypeTask::TYPECONST, 37 - "Improve Mobile Experience for Phabricator"); 37 + 'Improve Mobile Experience for Phabricator'); 38 38 39 39 $tag = id(new PHUITagView()) 40 40 ->setType(PHUITagView::TYPE_STATE) 41 41 ->setName('Closed, Resolved'); 42 - $panel = $this->createPanel("Maniphest Hovercard"); 42 + $panel = $this->createPanel('Maniphest Hovercard'); 43 43 $panel->appendChild(id(new PhabricatorHovercardView()) 44 44 ->setObjectHandle($task_handle) 45 45 ->setUser($user) ··· 56 56 'George Washington'); 57 57 $user_handle->setImageURI( 58 58 celerity_get_resource_uri('/rsrc/image/people/washington.png')); 59 - $panel = $this->createPanel("Whatevery Hovercard"); 59 + $panel = $this->createPanel('Whatevery Hovercard'); 60 60 $panel->appendChild(id(new PhabricatorHovercardView()) 61 61 ->setObjectHandle($user_handle) 62 62 ->addField(pht('Status'), 'Available') ··· 65 65 ->setUser($user)); 66 66 $elements[] = $panel; 67 67 68 - return phutil_implode_html("", $elements); 68 + return phutil_implode_html('', $elements); 69 69 } 70 70 71 71 private function createPanel($header) {
+1 -1
src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
··· 23 23 $data = $file->loadFileData(); 24 24 $data = @json_decode($data, true); 25 25 if (!$data) { 26 - throw new Exception("Failed to unserialize XHProf profile!"); 26 + throw new Exception('Failed to unserialize XHProf profile!'); 27 27 } 28 28 29 29 $symbol = $request->getStr('symbol');
+2 -2
src/infrastructure/celerity/CelerityResourceController.php
··· 31 31 $type_map = self::getSupportedResourceTypes(); 32 32 33 33 if (empty($type_map[$type])) { 34 - throw new Exception("Only static resources may be served."); 34 + throw new Exception('Only static resources may be served.'); 35 35 } 36 36 37 37 $dev_mode = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); ··· 103 103 // generate a comprehensive list of valid origins (an install may have 104 104 // arbitrarily many Phame blogs, for example), and we lose nothing by 105 105 // allowing access from anywhere. 106 - $response->addAllowOrigin("*"); 106 + $response->addAllowOrigin('*'); 107 107 } 108 108 109 109 return $this->makeResponseCacheable($response);
+1 -1
src/infrastructure/celerity/CelerityResourceGraph.php
··· 8 8 protected function loadEdges(array $nodes) { 9 9 if (!$this->graphSet) { 10 10 throw new Exception( 11 - "Call setResourceGraph before loading the graph!" 11 + 'Call setResourceGraph before loading the graph!' 12 12 ); 13 13 } 14 14
+2 -2
src/infrastructure/celerity/management/CelerityManagementMapWorkflow.php
··· 17 17 18 18 $this->log( 19 19 pht( 20 - "Rebuilding %d resource source(s).", 20 + 'Rebuilding %d resource source(s).', 21 21 new PhutilNumber(count($resources_map)))); 22 22 23 23 foreach ($resources_map as $name => $resources) { 24 24 $this->rebuildResources($resources); 25 25 } 26 26 27 - $this->log(pht("Done.")); 27 + $this->log(pht('Done.')); 28 28 29 29 return 0; 30 30 }
+2 -2
src/infrastructure/daemon/bot/PhabricatorBot.php
··· 21 21 public function run() { 22 22 $argv = $this->getArgv(); 23 23 if (count($argv) !== 1) { 24 - throw new Exception("usage: PhabricatorBot <json_config_file>"); 24 + throw new Exception('usage: PhabricatorBot <json_config_file>'); 25 25 } 26 26 27 27 $json_raw = Filesystem::readFile($argv[0]); ··· 120 120 } 121 121 122 122 if ($message->getCommand() == 'LOG') { 123 - $this->log("[LOG] ".$message->getBody()); 123 + $this->log('[LOG] '.$message->getBody()); 124 124 } 125 125 126 126 foreach ($this->handlers as $handler) {
+1 -1
src/infrastructure/daemon/bot/PhabricatorIRCBot.php
··· 6 6 final class PhabricatorIRCBot extends PhabricatorDaemon { 7 7 public function run() { 8 8 throw new Exception( 9 - "This daemon has been deprecated, use `PhabricatorBot` instead."); 9 + 'This daemon has been deprecated, use `PhabricatorBot` instead.'); 10 10 } 11 11 }
+4 -4
src/infrastructure/daemon/bot/adapter/PhabricatorBotBaseStreamingProtocolAdapter.php
··· 23 23 24 24 // First, join the room 25 25 if (!$rooms) { 26 - throw new Exception("Not configured to join any rooms!"); 26 + throw new Exception('Not configured to join any rooms!'); 27 27 } 28 28 29 29 $this->readBuffers = array(); ··· 49 49 curl_setopt( 50 50 $this->readHandle[$url], 51 51 CURLOPT_HTTPHEADER, 52 - array("Content-type: application/json")); 52 + array('Content-type: application/json')); 53 53 curl_setopt( 54 54 $this->readHandle[$url], 55 55 CURLOPT_WRITEFUNCTION, ··· 88 88 // Check for errors 89 89 if ($status != CURLM_OK) { 90 90 throw new Exception( 91 - "Phabricator Bot had a problem reading from stream."); 91 + 'Phabricator Bot had a problem reading from stream.'); 92 92 } 93 93 } 94 94 ··· 96 96 $messages = array(); 97 97 98 98 if (!$this->active) { 99 - throw new Exception("Phabricator Bot stopped reading from stream."); 99 + throw new Exception('Phabricator Bot stopped reading from stream.'); 100 100 } 101 101 102 102 // Prod our http request
+2 -2
src/infrastructure/daemon/bot/adapter/PhabricatorBotFlowdockProtocolAdapter.php
··· 11 11 $organization = $this->getConfig('organization'); 12 12 $ssl = $this->getConfig('ssl'); 13 13 14 - $url = ($ssl) ? "https://" : "http://"; 14 + $url = ($ssl) ? 'https://' : 'http://'; 15 15 $url .= "stream.flowdock.com/flows/{$organization}/{$channel}"; 16 16 17 17 return $url; ··· 60 60 $body, 61 61 PhabricatorBotTarget $flow) { 62 62 63 - list($organization, $room_id) = explode(":", $flow->getName()); 63 + list($organization, $room_id) = explode(':', $flow->getName()); 64 64 65 65 $this->performPost( 66 66 "/flows/{$organization}/{$room_id}/messages",
+1 -1
src/infrastructure/daemon/bot/adapter/PhabricatorCampfireProtocolAdapter.php
··· 10 10 protected function buildStreamingUrl($channel) { 11 11 $ssl = $this->getConfig('ssl'); 12 12 13 - $url = ($ssl) ? "https://" : "http://"; 13 + $url = ($ssl) ? 'https://' : 'http://'; 14 14 $url .= "streaming.campfirenow.com/room/{$channel}/live.json"; 15 15 16 16 return $url;
+11 -11
src/infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php
··· 47 47 } 48 48 $ok = stream_set_blocking($socket, false); 49 49 if (!$ok) { 50 - throw new Exception("Failed to set stream nonblocking."); 50 + throw new Exception('Failed to set stream nonblocking.'); 51 51 } 52 52 53 53 $this->socket = $socket; ··· 72 72 $ok = @stream_select($read, $write, $except, $timeout_sec = 1); 73 73 if ($ok === false) { 74 74 throw new Exception( 75 - "socket_select() failed: ".socket_strerror(socket_last_error())); 75 + 'socket_select() failed: '.socket_strerror(socket_last_error())); 76 76 } 77 77 78 78 if ($read) { ··· 82 82 // This indicates the connection was terminated on the other side, 83 83 // just exit via exception and let the overseer restart us after a 84 84 // delay so we can reconnect. 85 - throw new Exception("Remote host closed connection."); 85 + throw new Exception('Remote host closed connection.'); 86 86 } 87 87 do { 88 88 $data = fread($this->socket, 4096); 89 89 if ($data === false) { 90 - throw new Exception("fread() failed!"); 90 + throw new Exception('fread() failed!'); 91 91 } else { 92 92 $messages[] = id(new PhabricatorBotMessage()) 93 - ->setCommand("LOG") 94 - ->setBody(">>> ".$data); 93 + ->setCommand('LOG') 94 + ->setBody('>>> '.$data); 95 95 $this->readBuffer .= $data; 96 96 } 97 97 } while (strlen($data)); ··· 101 101 do { 102 102 $len = fwrite($this->socket, $this->writeBuffer); 103 103 if ($len === false) { 104 - throw new Exception("fwrite() failed!"); 104 + throw new Exception('fwrite() failed!'); 105 105 } else { 106 106 $messages[] = id(new PhabricatorBotMessage()) 107 - ->setCommand("LOG") 108 - ->setBody(">>> ".substr($this->writeBuffer, 0, $len)); 107 + ->setCommand('LOG') 108 + ->setBody('>>> '.substr($this->writeBuffer, 0, $len)); 109 109 $this->writeBuffer = substr($this->writeBuffer, $len); 110 110 } 111 111 } while (strlen($this->writeBuffer)); ··· 199 199 } 200 200 $join = $this->getConfig('join'); 201 201 if (!$join) { 202 - throw new Exception("Not configured to join any channels!"); 202 + throw new Exception('Not configured to join any channels!'); 203 203 } 204 204 foreach ($join as $channel) { 205 205 $this->write("JOIN {$channel}"); ··· 251 251 } 252 252 253 253 public function __destruct() { 254 - $this->write("QUIT Goodbye."); 254 + $this->write('QUIT Goodbye.'); 255 255 fclose($this->socket); 256 256 } 257 257 }
+1 -1
src/infrastructure/daemon/bot/handler/PhabricatorBotHandler.php
··· 50 50 public function replyTo(PhabricatorBotMessage $original_message, $body) { 51 51 if ($original_message->getCommand() != 'MESSAGE') { 52 52 throw new Exception( 53 - "Handler is trying to reply to something which is not a message!"); 53 + 'Handler is trying to reply to something which is not a message!'); 54 54 } 55 55 56 56 $reply = id(new PhabricatorBotMessage())
+1 -1
src/infrastructure/daemon/bot/handler/PhabricatorBotObjectNameHandler.php
··· 126 126 array( 127 127 'id' => $file_id, 128 128 )); 129 - $output[$file['phid']] = $file['objectName'].": ".$file['uri']." - ". 129 + $output[$file['phid']] = $file['objectName'].': '.$file['uri'].' - '. 130 130 $file['name']; 131 131 } 132 132 }
+1 -1
src/infrastructure/daemon/bot/handler/PhabricatorIRCProtocolHandler.php
··· 9 9 static $warned; 10 10 if (!$warned) { 11 11 $warned = true; 12 - phlog("The PhabricatorIRCProtocolHandler has been deprecated."); 12 + phlog('The PhabricatorIRCProtocolHandler has been deprecated.'); 13 13 } 14 14 } 15 15
+1 -1
src/infrastructure/daemon/workers/PhabricatorWorker.php
··· 187 187 foreach ($tasks as $task) { 188 188 if ($task->getResult() != PhabricatorWorkerArchiveTask::RESULT_SUCCESS) { 189 189 throw new Exception( 190 - pht("Task %d failed!", $task->getID())); 190 + pht('Task %d failed!', $task->getID())); 191 191 } 192 192 } 193 193 }
+2 -2
src/infrastructure/daemon/workers/__tests__/PhabricatorTestWorker.php
··· 27 27 switch (idx($this->getTaskData(), 'doWork')) { 28 28 case 'fail-temporary': 29 29 throw new Exception( 30 - "Temporary failure!"); 30 + 'Temporary failure!'); 31 31 case 'fail-permanent': 32 32 throw new PhabricatorWorkerPermanentFailureException( 33 - "Permanent failure!"); 33 + 'Permanent failure!'); 34 34 default: 35 35 return; 36 36 }
+1 -1
src/infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php
··· 33 33 34 34 public function execute() { 35 35 if (!$this->limit) { 36 - throw new Exception("You must setLimit() when leasing tasks."); 36 + throw new Exception('You must setLimit() when leasing tasks.'); 37 37 } 38 38 39 39 $task_table = new PhabricatorWorkerActiveTask();
+2 -2
src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
··· 67 67 68 68 public function delete() { 69 69 throw new Exception( 70 - "Active tasks can not be deleted directly. ". 71 - "Use archiveTask() to move tasks to the archive."); 70 + 'Active tasks can not be deleted directly. '. 71 + 'Use archiveTask() to move tasks to the archive.'); 72 72 } 73 73 74 74 public function archiveTask($result, $duration) {
+1 -1
src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
··· 12 12 public function save() { 13 13 if ($this->getID() === null) { 14 14 throw new Exception( 15 - "Trying to archive a task with no ID."); 15 + 'Trying to archive a task with no ID.'); 16 16 } 17 17 18 18 $other = new PhabricatorWorkerActiveTask();
+2 -2
src/infrastructure/edges/query/PhabricatorEdgeQuery.php
··· 160 160 public function execute() { 161 161 if (!$this->sourcePHIDs) { 162 162 throw new Exception( 163 - "You must use withSourcePHIDs() to query edges."); 163 + 'You must use withSourcePHIDs() to query edges.'); 164 164 } 165 165 166 166 $sources = phid_group_by_type($this->sourcePHIDs); ··· 257 257 array $types = array()) { 258 258 if ($this->resultSet === null) { 259 259 throw new Exception( 260 - "You must execute() a query before you you can getDestinationPHIDs()."); 260 + 'You must execute() a query before you you can getDestinationPHIDs().'); 261 261 } 262 262 263 263 $src_phids = array_fill_keys($src_phids, true);
+1 -1
src/infrastructure/edges/util/PhabricatorEdgeGraph.php
··· 11 11 12 12 protected function loadEdges(array $nodes) { 13 13 if (!$this->edgeType) { 14 - throw new Exception("Set edge type before loading graph!"); 14 + throw new Exception('Set edge type before loading graph!'); 15 15 } 16 16 17 17 $edges = id(new PhabricatorEdgeQuery())
+1 -1
src/infrastructure/env/PhabricatorConfigProxySource.php
··· 10 10 11 11 final protected function getSource() { 12 12 if (!$this->source) { 13 - throw new Exception("No configuration source set!"); 13 + throw new Exception('No configuration source set!'); 14 14 } 15 15 return $this->source; 16 16 }
+2 -2
src/infrastructure/env/PhabricatorConfigSource.php
··· 21 21 } 22 22 23 23 public function setKeys(array $keys) { 24 - throw new Exception("This configuration source does not support writes."); 24 + throw new Exception('This configuration source does not support writes.'); 25 25 } 26 26 27 27 public function deleteKeys(array $keys) { 28 - throw new Exception("This configuration source does not support writes."); 28 + throw new Exception('This configuration source does not support writes.'); 29 29 } 30 30 31 31 }
+1 -1
src/infrastructure/env/PhabricatorConfigStackSource.php
··· 19 19 20 20 public function popSource() { 21 21 if (empty($this->stack)) { 22 - throw new Exception("Popping an empty config stack!"); 22 + throw new Exception('Popping an empty config stack!'); 23 23 } 24 24 return array_shift($this->stack); 25 25 }
+6 -6
src/infrastructure/env/PhabricatorEnv.php
··· 139 139 140 140 $stack->pushSource( 141 141 id(new PhabricatorConfigLocalSource()) 142 - ->setName(pht("Local Config"))); 142 + ->setName(pht('Local Config'))); 143 143 144 144 // If the install overrides the database adapter, we might need to load 145 145 // the database adapter class before we can push on the database config. ··· 156 156 try { 157 157 $stack->pushSource( 158 158 id(new PhabricatorConfigDatabaseSource('default')) 159 - ->setName(pht("Database"))); 159 + ->setName(pht('Database'))); 160 160 } catch (AphrontQueryException $exception) { 161 161 // If the database is not available, just skip this configuration 162 162 // source. This happens during `bin/storage upgrade`, `bin/conf` before ··· 167 167 public static function repairConfig($key, $value) { 168 168 if (!self::$repairSource) { 169 169 self::$repairSource = id(new PhabricatorConfigDictionarySource(array())) 170 - ->setName(pht("Repaired Config")); 170 + ->setName(pht('Repaired Config')); 171 171 self::$sourceStack->pushSource(self::$repairSource); 172 172 } 173 173 self::$repairSource->setKeys(array($key => $value)); ··· 177 177 public static function overrideConfig($key, $value) { 178 178 if (!self::$overrideSource) { 179 179 self::$overrideSource = id(new PhabricatorConfigDictionarySource(array())) 180 - ->setName(pht("Overridden Config")); 180 + ->setName(pht('Overridden Config')); 181 181 self::$sourceStack->pushSource(self::$overrideSource); 182 182 } 183 183 self::$overrideSource->setKeys(array($key => $value)); ··· 410 410 if ($stack_key !== $key) { 411 411 self::$sourceStack->pushSource($source); 412 412 throw new Exception( 413 - "Scoped environments were destroyed in a diffent order than they ". 414 - "were initialized."); 413 + 'Scoped environments were destroyed in a diffent order than they '. 414 + 'were initialized.'); 415 415 } 416 416 } 417 417
+4 -4
src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php
··· 141 141 142 142 $this->assertTrue( 143 143 $caught instanceof Exception, 144 - "Destroying a scoped environment which is not on the top of the stack ". 145 - "should throw."); 144 + 'Destroying a scoped environment which is not on the top of the stack '. 145 + 'should throw.'); 146 146 147 147 if (phutil_is_hiphop_runtime()) { 148 148 $inner->__destruct(); ··· 158 158 public function testGetEnvExceptions() { 159 159 $caught = null; 160 160 try { 161 - PhabricatorEnv::getEnvConfig("not.a.real.config.option"); 161 + PhabricatorEnv::getEnvConfig('not.a.real.config.option'); 162 162 } catch (Exception $ex) { 163 163 $caught = $ex; 164 164 } ··· 166 166 167 167 $caught = null; 168 168 try { 169 - PhabricatorEnv::getEnvConfig("test.value"); 169 + PhabricatorEnv::getEnvConfig('test.value'); 170 170 } catch (Exception $ex) { 171 171 $caught = $ex; 172 172 }
+1 -1
src/infrastructure/events/PhabricatorEventListener.php
··· 30 30 31 31 protected function addActionMenuItems(PhutilEvent $event, $items) { 32 32 if ($event->getType() !== PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS) { 33 - throw new Exception("Not an action menu event!"); 33 + throw new Exception('Not an action menu event!'); 34 34 } 35 35 36 36 if (!$items) {
+3 -3
src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php
··· 654 654 '%s Lines', 655 655 ), 656 656 657 - "Indexing %d object(s) of type %s." => array( 658 - "Indexing %d object of type %s.", 659 - "Indexing %d object of type %s.", 657 + 'Indexing %d object(s) of type %s.' => array( 658 + 'Indexing %d object of type %s.', 659 + 'Indexing %d object of type %s.', 660 660 ), 661 661 662 662 'Run these %d command(s):' => array(
+1 -1
src/infrastructure/lint/linter/PhabricatorJavelinLinter.php
··· 243 243 $matches = null; 244 244 if (!preg_match('/^([?+\*])([^:]*):(\d+)$/', $line, $matches)) { 245 245 throw new Exception( 246 - "Received malformed output from `javelinsymbols`."); 246 + 'Received malformed output from `javelinsymbols`.'); 247 247 } 248 248 $type = $matches[1]; 249 249 $symbol = $matches[2];
+1 -1
src/infrastructure/markup/PhabricatorMarkupEngine.php
··· 190 190 191 191 if (!isset($this->objects[$key]['output'])) { 192 192 throw new Exception( 193 - "Call process() before using results."); 193 + 'Call process() before using results.'); 194 194 } 195 195 } 196 196
+2 -2
src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
··· 163 163 } 164 164 165 165 if (count($results) > 1) { 166 - throw new Exception("Expected a single result!"); 166 + throw new Exception('Expected a single result!'); 167 167 } 168 168 169 169 if (!$results) { ··· 182 182 */ 183 183 final public function execute() { 184 184 if (!$this->viewer) { 185 - throw new Exception("Call setViewer() before execute()!"); 185 + throw new Exception('Call setViewer() before execute()!'); 186 186 } 187 187 188 188 $parent_query = $this->getParentQuery();
+3 -3
src/infrastructure/sms/management/PhabricatorSMSManagementListOutboundWorkflow.php
··· 8 8 ->setName('list-outbound') 9 9 ->setSynopsis('List outbound sms messages sent by Phabricator.') 10 10 ->setExamples( 11 - "**list-outbound**") 11 + '**list-outbound**') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 30 30 $args->getArg('limit')); 31 31 32 32 if (!$sms_messages) { 33 - $console->writeErr("%s\n", pht("No sent sms.")); 33 + $console->writeErr("%s\n", pht('No sent sms.')); 34 34 return 0; 35 35 } 36 36 ··· 38 38 $console->writeOut( 39 39 "%s\n", 40 40 sprintf( 41 - "% 8d %-8s To: %s", 41 + '% 8d %-8s To: %s', 42 42 $sms->getID(), 43 43 $sms->getSendStatus(), 44 44 $sms->getToNumber()));
+2 -2
src/infrastructure/sms/management/PhabricatorSMSManagementShowOutboundWorkflow.php
··· 8 8 ->setName('show-outbound') 9 9 ->setSynopsis('Show diagnostic details about outbound sms.') 10 10 ->setExamples( 11 - "**show-outbound** --id 1 --id 2") 11 + '**show-outbound** --id 1 --id 2') 12 12 ->setArguments( 13 13 array( 14 14 array( ··· 38 38 $missing = array_diff_key($ids, $messages); 39 39 if ($missing) { 40 40 throw new PhutilArgumentUsageException( 41 - "Some specified sms messages do not exist: ". 41 + 'Some specified sms messages do not exist: '. 42 42 implode(', ', array_keys($missing))); 43 43 } 44 44 }
+3 -3
src/infrastructure/ssh/PhabricatorSSHPassthruCommand.php
··· 84 84 $error_channel = $this->errorChannel; 85 85 86 86 if (!$command_channel) { 87 - throw new Exception("Set a command channel before calling execute()!"); 87 + throw new Exception('Set a command channel before calling execute()!'); 88 88 } 89 89 90 90 if (!$io_channel) { 91 - throw new Exception("Set an IO channel before calling execute()!"); 91 + throw new Exception('Set an IO channel before calling execute()!'); 92 92 } 93 93 94 94 if (!$error_channel) { 95 - throw new Exception("Set an error channel before calling execute()!"); 95 + throw new Exception('Set an error channel before calling execute()!'); 96 96 } 97 97 98 98 $channels = array($command_channel, $io_channel, $error_channel);
+1 -1
src/infrastructure/storage/__tests__/QueryFormattingTestCase.php
··· 44 44 qsprintf($conn_r, '%B', null)); 45 45 46 46 $this->assertEqual( 47 - "NULL", 47 + 'NULL', 48 48 qsprintf($conn_r, '%nB', null)); 49 49 50 50 $this->assertEqual(
+9 -9
src/infrastructure/storage/lisk/LiskDAO.php
··· 487 487 public function loadColumnsWhere(array $columns, $pattern/* , $args... */) { 488 488 if (!$this->getConfigOption(self::CONFIG_PARTIAL_OBJECTS)) { 489 489 throw new BadMethodCallException( 490 - "This class does not support partial objects."); 490 + 'This class does not support partial objects.'); 491 491 } 492 492 $args = func_get_args(); 493 493 $data = call_user_func_array( ··· 518 518 519 519 if (count($data) > 1) { 520 520 throw new AphrontQueryCountException( 521 - "More than 1 result from loadOneWhere()!"); 521 + 'More than 1 result from loadOneWhere()!'); 522 522 } 523 523 524 524 $data = reset($data); ··· 844 844 845 845 if (count($relatives) > 1) { 846 846 throw new AphrontQueryCountException( 847 - "More than 1 result from loadOneRelative()!"); 847 + 'More than 1 result from loadOneRelative()!'); 848 848 } 849 849 850 850 return reset($relatives); ··· 1347 1347 $id_key = $this->getIDKey(); 1348 1348 if (!$id_key) { 1349 1349 throw new Exception( 1350 - "This DAO does not have a single-part primary key. The method you ". 1351 - "called requires a single-part primary key."); 1350 + 'This DAO does not have a single-part primary key. The method you '. 1351 + 'called requires a single-part primary key.'); 1352 1352 } 1353 1353 return $id_key; 1354 1354 } ··· 1363 1363 */ 1364 1364 protected function generatePHID() { 1365 1365 throw new Exception( 1366 - "To use CONFIG_AUX_PHID, you need to overload ". 1367 - "generatePHID() to perform PHID generation."); 1366 + 'To use CONFIG_AUX_PHID, you need to overload '. 1367 + 'generatePHID() to perform PHID generation.'); 1368 1368 } 1369 1369 1370 1370 ··· 1588 1588 self::$processIsolationLevel--; 1589 1589 if (self::$processIsolationLevel < 0) { 1590 1590 throw new Exception( 1591 - "Lisk process isolation level was reduced below 0."); 1591 + 'Lisk process isolation level was reduced below 0.'); 1592 1592 } 1593 1593 } 1594 1594 ··· 1624 1624 self::$transactionIsolationLevel--; 1625 1625 if (self::$transactionIsolationLevel < 0) { 1626 1626 throw new Exception( 1627 - "Lisk transaction isolation level was reduced below 0."); 1627 + 'Lisk transaction isolation level was reduced below 0.'); 1628 1628 } else if (self::$transactionIsolationLevel == 0) { 1629 1629 foreach (self::$connections as $key => $conn) { 1630 1630 if ($conn) {
+2 -2
src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
··· 7 7 8 8 private static $namespaceStack = array(); 9 9 10 - const ATTACHABLE = "<attachable>"; 10 + const ATTACHABLE = '<attachable>'; 11 11 12 12 /* -( Configuring Storage )------------------------------------------------ */ 13 13 ··· 41 41 $namespace = self::getDefaultStorageNamespace(); 42 42 } 43 43 if (!strlen($namespace)) { 44 - throw new Exception("No storage namespace configured!"); 44 + throw new Exception('No storage namespace configured!'); 45 45 } 46 46 return $namespace; 47 47 }
+2 -2
src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php
··· 67 67 68 68 $this->assertTrue( 69 69 ($loaded !== null), 70 - "Reads inside transactions should have transaction visibility."); 70 + 'Reads inside transactions should have transaction visibility.'); 71 71 72 72 LiskDAO::beginIsolateAllLiskEffectsToTransactions(); 73 73 } catch (Exception $ex) { ··· 88 88 $this->assertEqual(null, $load->load(9999)); 89 89 $this->assertEqual(null, $load->load('')); 90 90 $this->assertEqual(null, $load->load('cow')); 91 - $this->assertEqual(null, $load->load($id."cow")); 91 + $this->assertEqual(null, $load->load($id.'cow')); 92 92 93 93 $this->assertTrue((bool)$load->load((int)$id)); 94 94 $this->assertTrue((bool)$load->load((string)$id));
+2 -2
src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php
··· 48 48 $dao->establishLiveConnection('r'); 49 49 50 50 $this->assertFailure( 51 - "LiskIsolationTestDAO did not throw an exception when instructed to ". 52 - "explicitly connect to an external database."); 51 + 'LiskIsolationTestDAO did not throw an exception when instructed to '. 52 + 'explicitly connect to an external database.'); 53 53 } catch (LiskIsolationTestDAOException $ex) { 54 54 // Expected, pass. 55 55 }
+2 -2
src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php
··· 17 17 18 18 public function establishLiveConnection($mode) { 19 19 throw new LiskIsolationTestDAOException( 20 - "Isolation failure! DAO is attempting to connect to an external ". 21 - "resource!"); 20 + 'Isolation failure! DAO is attempting to connect to an external '. 21 + 'resource!'); 22 22 } 23 23 24 24 public function getConnectionNamespace() {
+5 -5
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDestroyWorkflow.php
··· 12 12 array( 13 13 array( 14 14 'name' => 'unittest-fixtures', 15 - 'help' => "Restrict **destroy** operations to databases created ". 16 - "by PhabricatorTestCase test fixtures.", 15 + 'help' => 'Restrict **destroy** operations to databases created '. 16 + 'by PhabricatorTestCase test fixtures.', 17 17 ))); 18 18 } 19 19 ··· 23 23 24 24 if (!$is_dry && !$is_force) { 25 25 echo phutil_console_wrap( 26 - "Are you completely sure you really want to permanently destroy all ". 27 - "storage for Phabricator data? This operation can not be undone and ". 28 - "your data will not be recoverable if you proceed."); 26 + 'Are you completely sure you really want to permanently destroy all '. 27 + 'storage for Phabricator data? This operation can not be undone and '. 28 + 'your data will not be recoverable if you proceed.'); 29 29 30 30 if (!phutil_console_confirm('Permanently destroy all data?')) { 31 31 echo "Cancelled.\n";
+5 -5
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementProbeWorkflow.php
··· 14 14 $console = PhutilConsole::getConsole(); 15 15 $console->writeErr( 16 16 "%s\n", 17 - pht("Analyzing table sizes (this may take a moment)...")); 17 + pht('Analyzing table sizes (this may take a moment)...')); 18 18 19 19 $api = $this->getAPI(); 20 20 $patches = $this->getPatches(); ··· 45 45 } 46 46 } 47 47 48 - $console->writeOut("%s\n", pht("APPROXIMATE TABLE SIZES")); 48 + $console->writeOut("%s\n", pht('APPROXIMATE TABLE SIZES')); 49 49 asort($totals); 50 50 foreach ($totals as $db => $size) { 51 51 $database_size = $this->formatSize($totals[$db], $overall); 52 52 $console->writeOut( 53 53 "**%s**\n", 54 - sprintf("%-32.32s %18s", $db, $database_size)); 54 + sprintf('%-32.32s %18s', $db, $database_size)); 55 55 $data[$db] = isort($data[$db], '_totalSize'); 56 56 foreach ($data[$db] as $table => $info) { 57 57 $table_size = $this->formatSize($info['_totalSize'], $overall); 58 58 $console->writeOut( 59 59 "%s\n", 60 - sprintf(" %-28.28s %18s", $table, $table_size)); 60 + sprintf(' %-28.28s %18s', $table, $table_size)); 61 61 } 62 62 } 63 63 $overall_size = $this->formatSize($overall, $overall); 64 64 $console->writeOut( 65 65 "**%s**\n", 66 - sprintf("%-32.32s %18s", pht('TOTAL'), $overall_size)); 66 + sprintf('%-32.32s %18s', pht('TOTAL'), $overall_size)); 67 67 68 68 return 0; 69 69 }
+1 -1
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
··· 33 33 printf( 34 34 35 35 "% -".($len + 2)."s ". 36 - "%-".strlen("Not Applied")."s ". 36 + "%-".strlen('Not Applied')."s ". 37 37 "%-4s ". 38 38 "%s\n", 39 39
+7 -7
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php
··· 7 7 $this 8 8 ->setName('upgrade') 9 9 ->setExamples('**upgrade** [__options__]') 10 - ->setSynopsis("Upgrade database schemata.") 10 + ->setSynopsis('Upgrade database schemata.') 11 11 ->setArguments( 12 12 array( 13 13 array( ··· 38 38 39 39 if (!$is_dry && !$is_force) { 40 40 echo phutil_console_wrap( 41 - "Before running storage upgrades, you should take down the ". 42 - "Phabricator web interface and stop any running Phabricator ". 43 - "daemons (you can disable this warning with --force)."); 41 + 'Before running storage upgrades, you should take down the '. 42 + 'Phabricator web interface and stop any running Phabricator '. 43 + 'daemons (you can disable this warning with --force).'); 44 44 45 45 if (!phutil_console_confirm('Are you ready to continue?')) { 46 46 echo "Cancelled.\n"; ··· 71 71 72 72 if ($apply_only) { 73 73 throw new PhutilArgumentUsageException( 74 - "Storage has not been initialized yet, you must initialize storage ". 75 - "before selectively applying patches."); 74 + 'Storage has not been initialized yet, you must initialize storage '. 75 + 'before selectively applying patches.'); 76 76 return 1; 77 77 } 78 78 ··· 178 178 if (!$applied_something) { 179 179 if (count($patches)) { 180 180 throw new Exception( 181 - "Some patches could not be applied: ". 181 + 'Some patches could not be applied: '. 182 182 implode(', ', array_keys($patches))); 183 183 } else if (!$is_dry && !$apply_only) { 184 184 echo "Storage is up to date. Use 'storage status' for details.\n";
+4 -4
src/infrastructure/testing/PhabricatorTestCase.php
··· 128 128 unset($this->env); 129 129 } catch (Exception $ex) { 130 130 throw new Exception( 131 - "Some test called PhabricatorEnv::beginScopedEnv(), but is still ". 132 - "holding a reference to the scoped environment!"); 131 + 'Some test called PhabricatorEnv::beginScopedEnv(), but is still '. 132 + 'holding a reference to the scoped environment!'); 133 133 } 134 134 } 135 135 ··· 206 206 public static function assertExecutingUnitTests() { 207 207 if (!self::$testsAreRunning) { 208 208 throw new Exception( 209 - "Executing test code outside of test execution! This code path can ". 210 - "only be run during unit tests."); 209 + 'Executing test code outside of test execution! This code path can '. 210 + 'only be run during unit tests.'); 211 211 } 212 212 } 213 213
+1 -1
src/infrastructure/time/PhabricatorTime.php
··· 25 25 26 26 public static function popTime($key) { 27 27 if ($key !== last_key(self::$stack)) { 28 - throw new Exception("PhabricatorTime::popTime with bad key."); 28 + throw new Exception('PhabricatorTime::popTime with bad key.'); 29 29 } 30 30 array_pop(self::$stack); 31 31
+8 -8
src/infrastructure/util/PhabricatorHash.php
··· 30 30 public static function digestPassword(PhutilOpaqueEnvelope $envelope, $salt) { 31 31 $result = $envelope->openEnvelope(); 32 32 if (!$result) { 33 - throw new Exception("Trying to digest empty password!"); 33 + throw new Exception('Trying to digest empty password!'); 34 34 } 35 35 36 36 for ($ii = 0; $ii < 1000; $ii++) { ··· 58 58 59 59 static $map; 60 60 if ($map === null) { 61 - $map = "0123456789". 62 - "abcdefghij". 63 - "klmnopqrst". 64 - "uvwxyzABCD". 65 - "EFGHIJKLMN". 66 - "OPQRSTUVWX". 67 - "YZ._"; 61 + $map = '0123456789'. 62 + 'abcdefghij'. 63 + 'klmnopqrst'. 64 + 'uvwxyzABCD'. 65 + 'EFGHIJKLMN'. 66 + 'OPQRSTUVWX'. 67 + 'YZ._'; 68 68 } 69 69 70 70 $result = '';
+1 -1
src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php
··· 14 14 'DERP//DERP' => 'derp/derp/', 15 15 'a B c' => 'a_b_c/', 16 16 '-1~2.3abcd' => '-1~2.3abcd/', 17 - "T\x00O\x00D\x00O" => "t_o_d_o/", 17 + "T\x00O\x00D\x00O" => 't_o_d_o/', 18 18 'x#%&+=\\?<> y' => 'x_y/', 19 19 "\xE2\x98\x83" => "\xE2\x98\x83/", 20 20 '..' => 'dotdot/',
+1 -1
src/infrastructure/util/password/PhabricatorBcryptPasswordHasher.php
··· 28 28 } 29 29 30 30 public function getHumanReadableStrength() { 31 - return pht("Good"); 31 + return pht('Good'); 32 32 } 33 33 34 34 protected function getPasswordHash(PhutilOpaqueEnvelope $envelope) {
+1 -1
src/infrastructure/util/password/PhabricatorIteratedMD5PasswordHasher.php
··· 29 29 } 30 30 31 31 public function getHumanReadableStrength() { 32 - return pht("Okay"); 32 + return pht('Okay'); 33 33 } 34 34 35 35 protected function getPasswordHash(PhutilOpaqueEnvelope $envelope) {
+1 -1
src/view/AphrontDialogView.php
··· 203 203 204 204 if (!$this->user) { 205 205 throw new Exception( 206 - pht("You must call setUser() when rendering an AphrontDialogView.")); 206 + pht('You must call setUser() when rendering an AphrontDialogView.')); 207 207 } 208 208 209 209 $more = $this->class;
+1 -1
src/view/__tests__/PhabricatorAphrontViewTestCase.php
··· 18 18 $this->assertFalse($view->hasChildren()); 19 19 } 20 20 21 - $view->appendChild("!"); 21 + $view->appendChild('!'); 22 22 $this->assertTrue($view->hasChildren()); 23 23 } 24 24
+7 -7
src/view/control/AphrontCursorPagerView.php
··· 89 89 public function getFirstPageURI() { 90 90 if (!$this->uri) { 91 91 throw new Exception( 92 - pht("You must call setURI() before you can call getFirstPageURI().")); 92 + pht('You must call setURI() before you can call getFirstPageURI().')); 93 93 } 94 94 95 95 if (!$this->afterID && !($this->beforeID && $this->moreResults)) { ··· 104 104 public function getPrevPageURI() { 105 105 if (!$this->uri) { 106 106 throw new Exception( 107 - pht("You must call setURI() before you can call getPrevPageURI().")); 107 + pht('You must call setURI() before you can call getPrevPageURI().')); 108 108 } 109 109 110 110 if (!$this->prevPageID) { ··· 119 119 public function getNextPageURI() { 120 120 if (!$this->uri) { 121 121 throw new Exception( 122 - pht("You must call setURI() before you can call getNextPageURI().")); 122 + pht('You must call setURI() before you can call getNextPageURI().')); 123 123 } 124 124 125 125 if (!$this->nextPageID) { ··· 134 134 public function render() { 135 135 if (!$this->uri) { 136 136 throw new Exception( 137 - pht("You must call setURI() before you can call render().")); 137 + pht('You must call setURI() before you can call render().')); 138 138 } 139 139 140 140 $links = array(); ··· 146 146 array( 147 147 'href' => $first_uri, 148 148 ), 149 - "\xC2\xAB ". pht("First")); 149 + "\xC2\xAB ". pht('First')); 150 150 } 151 151 152 152 $prev_uri = $this->getPrevPageURI(); ··· 156 156 array( 157 157 'href' => $prev_uri, 158 158 ), 159 - "\xE2\x80\xB9 " . pht("Prev")); 159 + "\xE2\x80\xB9 " . pht('Prev')); 160 160 } 161 161 162 162 $next_uri = $this->getNextPageURI(); ··· 166 166 array( 167 167 'href' => $next_uri, 168 168 ), 169 - pht("Next") . " \xE2\x80\xBA"); 169 + pht('Next') . " \xE2\x80\xBA"); 170 170 } 171 171 172 172 return phutil_tag(
+1 -1
src/view/control/AphrontPagerView.php
··· 110 110 public function render() { 111 111 if (!$this->uri) { 112 112 throw new Exception( 113 - pht("You must call setURI() before you can call render().")); 113 + pht('You must call setURI() before you can call render().')); 114 114 } 115 115 116 116 require_celerity_resource('aphront-pager-view-css');
+1 -1
src/view/form/PHUIFormLayoutView.php
··· 27 27 public function appendRemarkupInstructions($remarkup) { 28 28 if ($this->getUser() === null) { 29 29 throw new Exception( 30 - "Call `setUser` before appending Remarkup to PHUIFormLayoutView."); 30 + 'Call `setUser` before appending Remarkup to PHUIFormLayoutView.'); 31 31 } 32 32 33 33 return $this->appendInstructions(
+2 -2
src/view/form/PHUIFormPageView.php
··· 85 85 $name = $control->getName(); 86 86 87 87 if (!strlen($name)) { 88 - throw new Exception("Form control has no name!"); 88 + throw new Exception('Form control has no name!'); 89 89 } 90 90 91 91 if (isset($this->controls[$name])) { ··· 117 117 118 118 public function setPagedFormView(PHUIPagedFormView $view, $key) { 119 119 if ($this->key) { 120 - throw new Exception("This page is already part of a form!"); 120 + throw new Exception('This page is already part of a form!'); 121 121 } 122 122 $this->form = $view; 123 123 $this->key = $key;
+2 -2
src/view/form/PHUIPagedFormView.php
··· 226 226 227 227 $selected_page = $this->getSelectedPage(); 228 228 if (!$selected_page) { 229 - throw new Exception("No selected page!"); 229 + throw new Exception('No selected page!'); 230 230 } 231 231 232 232 $form->addHiddenInput( ··· 254 254 } 255 255 256 256 if ($this->isLastPage($selected_page)) { 257 - $submit->addSubmitButton(pht("Save")); 257 + $submit->addSubmitButton(pht('Save')); 258 258 } else { 259 259 $submit->addSubmitButton(pht("Continue \xC2\xBB")); 260 260 }
+2 -2
src/view/form/control/AphrontFormControl.php
··· 133 133 134 134 public function setFormPage(PHUIFormPageView $page) { 135 135 if ($this->formPage) { 136 - throw new Exception("This control is already a member of a page!"); 136 + throw new Exception('This control is already a member of a page!'); 137 137 } 138 138 $this->formPage = $page; 139 139 return $this; ··· 141 141 142 142 public function getFormPage() { 143 143 if ($this->formPage === null) { 144 - throw new Exception("This control does not have a page!"); 144 + throw new Exception('This control does not have a page!'); 145 145 } 146 146 return $this->formPage; 147 147 }
+1 -1
src/view/form/control/AphrontFormDateControl.php
··· 286 286 287 287 $user = $this->getUser(); 288 288 if (!$this->getUser()) { 289 - throw new Exception("Call setUser() before getTimezone()!"); 289 + throw new Exception('Call setUser() before getTimezone()!'); 290 290 } 291 291 292 292 $user_zone = $user->getTimezoneIdentifier();
+2 -2
src/view/form/control/AphrontFormPolicyControl.php
··· 113 113 114 114 protected function renderInput() { 115 115 if (!$this->object) { 116 - throw new Exception(pht("Call setPolicyObject() before rendering!")); 116 + throw new Exception(pht('Call setPolicyObject() before rendering!')); 117 117 } 118 118 if (!$this->capability) { 119 - throw new Exception(pht("Call setCapability() before rendering!")); 119 + throw new Exception(pht('Call setCapability() before rendering!')); 120 120 } 121 121 122 122 $policy = $this->object->getPolicy($this->capability);
+1 -1
src/view/layout/AphrontMultiColumnView.php
··· 66 66 if ($this->fluidishLayout || $this->fluidLayout) { 67 67 // we only support seven columns for now for fluid views; see T4054 68 68 if (count($this->columns) > 7) { 69 - throw new Exception("No more than 7 columns per view."); 69 + throw new Exception('No more than 7 columns per view.'); 70 70 } 71 71 } 72 72
+1 -1
src/view/layout/AphrontPanelView.php
··· 78 78 if ($this->buttons) { 79 79 $buttons = phutil_tag_div( 80 80 'aphront-panel-view-buttons', 81 - phutil_implode_html(" ", $this->buttons)); 81 + phutil_implode_html(' ', $this->buttons)); 82 82 } 83 83 $header_elements = phutil_tag_div( 84 84 'aphront-panel-header',
+2 -2
src/view/layout/AphrontSideNavFilterView.php
··· 165 165 public function render() { 166 166 if ($this->menu->getItems()) { 167 167 if (!$this->baseURI) { 168 - throw new Exception(pht("Call setBaseURI() before render()!")); 168 + throw new Exception(pht('Call setBaseURI() before render()!')); 169 169 } 170 170 if ($this->selectedFilter === false) { 171 - throw new Exception(pht("Call selectFilter() before render()!")); 171 + throw new Exception(pht('Call selectFilter() before render()!')); 172 172 } 173 173 } 174 174
+1 -1
src/view/layout/PhabricatorActionListView.php
··· 29 29 30 30 public function render() { 31 31 if (!$this->user) { 32 - throw new Exception(pht("Call setUser() before render()!")); 32 + throw new Exception(pht('Call setUser() before render()!')); 33 33 } 34 34 35 35 $event = new PhabricatorEvent(
+1 -1
src/view/layout/PhabricatorSourceCodeView.php
··· 71 71 } 72 72 73 73 if ($this->canClickHighlight) { 74 - $line_uri = $this->uri . "$" . $line_number; 74 + $line_uri = $this->uri . '$' . $line_number; 75 75 $line_href = (string) new PhutilURI($line_uri); 76 76 77 77 $tag_number = javelin_tag(
+1 -1
src/view/layout/PhabricatorTransactionView.php
··· 49 49 50 50 public function render() { 51 51 if (!$this->user) { 52 - throw new Exception(pht("Call setUser() before render()!")); 52 + throw new Exception(pht('Call setUser() before render()!')); 53 53 } 54 54 55 55 require_celerity_resource('phabricator-transaction-view-css');
+1 -1
src/view/page/PhabricatorStandardPageView.php
··· 101 101 if (!$this->getRequest()) { 102 102 throw new Exception( 103 103 pht( 104 - "You must set the Request to render a PhabricatorStandardPageView.")); 104 + 'You must set the Request to render a PhabricatorStandardPageView.')); 105 105 } 106 106 107 107 $console = $this->getConsole();
+2 -2
src/view/phui/PHUIButtonBarView.php
··· 27 27 if ($j > 1) { 28 28 if ($i == 1) { 29 29 $button->addClass('phui-button-bar-first'); 30 - } elseif ($i == $j) { 30 + } else if ($i == $j) { 31 31 $button->addClass('phui-button-bar-last'); 32 - } elseif ($j > 1) { 32 + } else if ($j > 1) { 33 33 $button->addClass('phui-button-bar-middle'); 34 34 } 35 35 }
+2 -2
src/view/phui/PHUIFeedStoryView.php
··· 256 256 public function setAppIconFromPHID($phid) { 257 257 switch (phid_get_type($phid)) { 258 258 case PholioPHIDTypeMock::TYPECONST: 259 - $this->setAppIcon("pholio-dark"); 259 + $this->setAppIcon('pholio-dark'); 260 260 break; 261 261 case PhabricatorMacroPHIDTypeMacro::TYPECONST: 262 - $this->setAppIcon("macro-dark"); 262 + $this->setAppIcon('macro-dark'); 263 263 break; 264 264 case ManiphestPHIDTypeTask::TYPECONST: 265 265 $this->setAppIcon('maniphest-dark');
+1 -1
src/view/phui/PHUIIconView.php
··· 76 76 $classes[] = 'sprite-'.$this->spriteSheet; 77 77 $classes[] = $this->spriteSheet.'-'.$this->spriteIcon; 78 78 79 - } elseif ($this->iconFont) { 79 + } else if ($this->iconFont) { 80 80 require_celerity_resource('phui-font-icon-base-css'); 81 81 require_celerity_resource('font-fontawesome'); 82 82 $classes[] = 'phui-font-fa';
+2 -2
src/view/phui/PHUIObjectItemView.php
··· 182 182 183 183 public function addAction(PHUIListItemView $action) { 184 184 if (count($this->actions) >= 3) { 185 - throw new Exception("Limit 3 actions per item."); 185 + throw new Exception('Limit 3 actions per item.'); 186 186 } 187 187 $this->actions[] = $action; 188 188 return $this; ··· 287 287 case null: 288 288 break; 289 289 default: 290 - throw new Exception(pht("Invalid effect!")); 290 + throw new Exception(pht('Invalid effect!')); 291 291 } 292 292 293 293 if ($this->getGrippable()) {
+2 -2
src/view/phui/PHUIRemarkupPreviewPanel.php
··· 69 69 70 70 protected function getTagContent() { 71 71 if ($this->previewURI === null) { 72 - throw new Exception("Call setPreviewURI() before rendering!"); 72 + throw new Exception('Call setPreviewURI() before rendering!'); 73 73 } 74 74 if ($this->controlID === null) { 75 - throw new Exception("Call setControlID() before rendering!"); 75 + throw new Exception('Call setControlID() before rendering!'); 76 76 } 77 77 78 78 $preview_id = celerity_generate_unique_node_id();
+1 -1
src/view/phui/PHUITagView.php
··· 92 92 93 93 public function render() { 94 94 if (!$this->type) { 95 - throw new Exception(pht("You must call setType() before render()!")); 95 + throw new Exception(pht('You must call setType() before render()!')); 96 96 } 97 97 98 98 require_celerity_resource('phui-tag-view-css');
+1 -1
src/view/phui/calendar/PHUICalendarMonthView.php
··· 42 42 43 43 public function render() { 44 44 if (empty($this->user)) { 45 - throw new Exception("Call setUser() before render()!"); 45 + throw new Exception('Call setUser() before render()!'); 46 46 } 47 47 48 48 $events = msort($this->events, 'getEpochStart');
+3 -3
src/view/widget/hovercard/PhabricatorHovercardView.php
··· 62 62 63 63 public function render() { 64 64 if (!$this->handle) { 65 - throw new Exception("Call setObjectHandle() before calling render()!"); 65 + throw new Exception('Call setObjectHandle() before calling render()!'); 66 66 } 67 67 68 68 $handle = $this->handle; 69 69 70 - require_celerity_resource("phabricator-hovercard-view-css"); 70 + require_celerity_resource('phabricator-hovercard-view-css'); 71 71 72 - $title = pht("%s: %s", 72 + $title = pht('%s: %s', 73 73 $handle->getTypeName(), 74 74 $this->title ? $this->title : $handle->getName()); 75 75
+1 -1
support/PhabricatorStartup.php
··· 209 209 210 210 public static function beginOutputCapture() { 211 211 if (self::$capturingOutput) { 212 - self::didFatal("Already capturing output!"); 212 + self::didFatal('Already capturing output!'); 213 213 } 214 214 self::$capturingOutput = true; 215 215 ob_start();
+1 -1
webroot/index.php
··· 129 129 $access_log->write(); 130 130 if ($original_exception) { 131 131 $ex = new PhutilAggregateException( 132 - "Multiple exceptions during processing and rendering.", 132 + 'Multiple exceptions during processing and rendering.', 133 133 array( 134 134 $original_exception, 135 135 $ex,