Skip to content

Commit 48b4624

Browse files
committed
Fix curly braces syntax
1 parent cb0e98b commit 48b4624

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

lib/helper/UrlHelper.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the symfony package.
55
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6-
*
6+
*
77
* For the full copyright and license information, please view the LICENSE
88
* file that was distributed with this source code.
99
*/
@@ -52,19 +52,19 @@ function url_for($internal_uri, $absolute = false)
5252
* Creates a <a> link tag of the given name using a routed URL
5353
* based on the module/action passed as argument and the routing configuration.
5454
* It's also possible to pass a string instead of a module/action pair to
55-
* get a link tag that just points without consideration.
55+
* get a link tag that just points without consideration.
5656
* If null is passed as a name, the link itself will become the name.
5757
* If an object is passed as a name, the object string representation is used.
58-
* One of the options serves for for creating javascript confirm alerts where
59-
* if you pass 'confirm' => 'Are you sure?', the link will be guarded
58+
* One of the options serves for for creating javascript confirm alerts where
59+
* if you pass 'confirm' => 'Are you sure?', the link will be guarded
6060
* with a JS popup asking that question. If the user accepts, the link is processed,
6161
* otherwise not.
6262
*
6363
* <b>Options:</b>
6464
* - 'absolute' - if set to true, the helper outputs an absolute URL
6565
* - 'query_string' - to append a query string (starting by ?) to the routed url
6666
* - 'confirm' - displays a javascript confirmation alert when the link is clicked
67-
* - 'popup' - if set to true, the link opens a new browser window
67+
* - 'popup' - if set to true, the link opens a new browser window
6868
* - 'post' - if set to true, the link submits a POST request instead of GET (caution: do not use inside a form)
6969
*
7070
* <b>Note:</b> The 'popup' and 'post' options are not compatible with each other.
@@ -142,14 +142,14 @@ function link_to($name = '', $internal_uri = '', $options = array())
142142
* - 'absolute' - if set to true, the helper outputs an absolute URL
143143
* - 'query_string' - to append a query string (starting by ?) to the routed url
144144
* - 'confirm' - displays a javascript confirmation alert when the link is clicked
145-
* - 'popup' - if set to true, the link opens a new browser window
145+
* - 'popup' - if set to true, the link opens a new browser window
146146
* - 'post' - if set to true, the link submits a POST request instead of GET (caution: do not use inside a form)
147147
*
148148
* <b>Examples:</b>
149149
* <code>
150150
* echo link_to_if($user->isAdministrator(), 'Delete this page', 'my_module/my_action');
151151
* => <a href="/path/to/my/action">Delete this page</a>
152-
* echo link_to_if(!$user->isAdministrator(), 'Delete this page', 'my_module/my_action');
152+
* echo link_to_if(!$user->isAdministrator(), 'Delete this page', 'my_module/my_action');
153153
* => <span>Delete this page</span>
154154
* </code>
155155
*
@@ -191,14 +191,14 @@ function link_to_if($condition, $name = '', $internal_uri = '', $options = array
191191
* - 'absolute' - if set to true, the helper outputs an absolute URL
192192
* - 'query_string' - to append a query string (starting by ?) to the routed url
193193
* - 'confirm' - displays a javascript confirmation alert when the link is clicked
194-
* - 'popup' - if set to true, the link opens a new browser window
194+
* - 'popup' - if set to true, the link opens a new browser window
195195
* - 'post' - if set to true, the link submits a POST request instead of GET (caution: do not use inside a form)
196196
*
197197
* <b>Examples:</b>
198198
* <code>
199199
* echo link_to_unless($user->isAdministrator(), 'Delete this page', 'my_module/my_action');
200200
* => <span>Delete this page</span>
201-
* echo link_to_unless(!$user->isAdministrator(), 'Delete this page', 'my_module/my_action');
201+
* echo link_to_unless(!$user->isAdministrator(), 'Delete this page', 'my_module/my_action');
202202
* => <a href="/path/to/my/action">Delete this page</a>
203203
* </code>
204204
*
@@ -223,7 +223,7 @@ function link_to_unless($condition, $name = '', $url = '', $options = array())
223223
* - 'absolute' - if set to true, the helper outputs an absolute URL
224224
* - 'query_string' - to append a query string (starting by ?) to the routed url
225225
* - 'confirm' - displays a javascript confirmation alert when the button is clicked
226-
* - 'popup' - if set to true, the button opens a new browser window
226+
* - 'popup' - if set to true, the button opens a new browser window
227227
* - 'post' - if set to true, the button submits a POST request instead of GET (caution: do not use inside a form)
228228
*
229229
* <b>Examples:</b>
@@ -428,7 +428,7 @@ function _encodeText($text)
428428

429429
for ($i = 0; $i < strlen($text); $i++)
430430
{
431-
$char = $text{$i};
431+
$char = $text[$i];
432432
$r = rand(0, 100);
433433

434434
# roughly 10% raw, 45% hex, 45% dec

lib/vendor/pake/pakeGetopt.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function parse_short_option($arg)
151151
{
152152
for ($i = 0; $i < strlen($arg); $i++)
153153
{
154-
$opt = $arg{$i};
154+
$opt = $arg[$i];
155155
$opt_arg = true;
156156

157157
/* option exists? */

lib/vendor/phing/system/io/UnixFileSystem.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ function getPathSeparator() {
6767
* This way we iterate through the whole pathname string only once.
6868
*/
6969
function normalize($strPathname) {
70-
70+
7171
if (empty($strPathname)) {
7272
return;
7373
}
74-
74+
7575
// Resolve home directories. We assume /home is where all home
7676
// directories reside, b/c there is no other way to do this with
7777
// PHP AFAIK.
@@ -88,7 +88,7 @@ function normalize($strPathname) {
8888
$n = strlen($strPathname);
8989
$prevChar = 0;
9090
for ($i=0; $i < $n; $i++) {
91-
$c = $strPathname{$i};
91+
$c = $strPathname[$i];
9292
if (($prevChar === '/') && ($c === '/')) {
9393
return self::normalizer($strPathname, $n, $i - 1);
9494
}
@@ -122,7 +122,7 @@ protected function normalizer($pathname, $len, $offset) {
122122
}
123123
$prevChar = 0;
124124
for ($i = $offset; $i < $n; $i++) {
125-
$c = $pathname{$i};
125+
$c = $pathname[$i];
126126
if (($prevChar === '/') && ($c === '/')) {
127127
continue;
128128
}
@@ -185,10 +185,10 @@ function resolveFile(PhingFile $f) {
185185
return $f->getPath();
186186
} else {
187187
return $this->resolve(Phing::getProperty("user.dir"), $f->getPath());
188-
}
188+
}
189189
}
190190

191-
/* -- most of the following is mapped to the php natives wrapped by FileSystem */
191+
/* -- most of the following is mapped to the php natives wrapped by FileSystem */
192192

193193
/* -- Attribute accessors -- */
194194
function getBooleanAttributes($f) {
@@ -255,12 +255,12 @@ function lister($f) {
255255
function fromURIPath($p) {
256256
if (StringHelper::endsWith("/", $p) && (strlen($p) > 1)) {
257257

258-
// "/foo/" --> "/foo", but "/" --> "/"
258+
// "/foo/" --> "/foo", but "/" --> "/"
259259
$p = substr($p, 0, strlen($p) - 1);
260260

261261
}
262262

263263
return $p;
264264
}
265-
265+
266266
}

lib/vendor/phing/system/io/Win32FileSystem.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* This software consists of voluntary contributions made by many individuals
1818
* and is licensed under the LGPL. For more information please see
19-
* <http://phing.info>.
19+
* <http://phing.info>.
2020
*/
2121

2222
include_once 'phing/system/io/FileSystem.php';
@@ -194,7 +194,7 @@ function normalize($strPath) {
194194
$altSlash = $this->altSlash;
195195
$prev = 0;
196196
for ($i = 0; $i < $n; $i++) {
197-
$c = $strPath{$i};
197+
$c = $strPath[$i];
198198
if ($c === $altSlash) {
199199
return $this->normalizer($strPath, $n, ($prev === $slash) ? $i - 1 : $i);
200200
}
@@ -394,7 +394,7 @@ function resolveFile(PhingFile $f) {
394394
}
395395
return (string) $drive.':'.$this->slashify(substr($path,2)); //fake it
396396
}
397-
397+
398398
throw new Exception("Unresolvable path: " . $path);
399399
}
400400

@@ -449,7 +449,7 @@ function listRoots() {
449449
function compare($f1, $f2) {
450450
$f1Path = $f1->getPath();
451451
$f2Path = $f2->getPath();
452-
return (boolean) strcasecmp((string) $f1Path, (string) $f2Path);
452+
return (boolean) strcasecmp((string) $f1Path, (string) $f2Path);
453453
}
454454

455455

lib/vendor/phing/tasks/system/CvsPassTask.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* and is licensed under the LGPL. For more information please see
1919
* <http://phing.info>.
2020
*/
21-
21+
2222
require_once 'phing/Task.php';
2323
include_once 'phing/system/io/BufferedReader.php';
2424
include_once 'phing/system/io/BufferedWriter.php';
@@ -35,7 +35,7 @@
3535
class CVSPassTask extends Task {
3636

3737
/** CVS Root */
38-
private $cvsRoot;
38+
private $cvsRoot;
3939
/** Password file to add password to */
4040
private $passFile;
4141
/** Password to add to file */
@@ -58,7 +58,7 @@ class CVSPassTask extends Task {
5858
192, 159, 244, 239, 185, 168, 215, 144, 139, 165, 180, 157, 147, 186, 214, 176,
5959
227, 231, 219, 169, 175, 156, 206, 198, 129, 164, 150, 210, 154, 177, 134, 127,
6060
182, 128, 158, 208, 162, 132, 167, 209, 149, 241, 153, 251, 237, 236, 171, 195,
61-
243, 233, 253, 240, 194, 250, 191, 155, 142, 137, 245, 235, 163, 242, 178, 152
61+
243, 233, 253, 240, 194, 250, 191, 155, 142, 137, 245, 235, 163, 242, 178, 152
6262
);
6363

6464
/**
@@ -90,13 +90,13 @@ public final function main() {
9090

9191
$reader = null;
9292
$writer = null;
93-
93+
9494
try {
9595
$buf = "";
9696

9797
if ($this->passFile->exists()) {
9898
$reader = new BufferedReader(new FileReader($this->passFile));
99-
99+
100100
$line = null;
101101
while (($line = $reader->readLine()) !== null) {
102102
if (!StringHelper::startsWith($this->cvsRoot, $line)) {
@@ -112,36 +112,36 @@ public final function main() {
112112
$writer = new BufferedWriter(new FileWriter($this->passFile));
113113
$writer->write($pwdfile);
114114
$writer->newLine();
115-
115+
116116
$writer->close();
117117
if ($reader) {
118118
$reader->close();
119119
}
120-
120+
121121
} catch (IOException $e) {
122122
if ($reader) {
123123
try {
124124
$reader->close();
125-
} catch (Exception $e) {}
125+
} catch (Exception $e) {}
126126
}
127-
127+
128128
if ($writer) {
129129
try {
130130
$writer->close();
131-
} catch (Exception $e) {}
131+
} catch (Exception $e) {}
132132
}
133-
133+
134134
throw new BuildException($e);
135135
}
136136
}
137-
137+
138138
/**
139139
* "Encode" the password.
140140
*/
141141
private final function mangle($password){
142142
$buf = "";
143143
for ($i = 0, $plen = strlen($password); $i < $plen; $i++) {
144-
$buf .= chr(self::$shifts[ord($password{$i})]);
144+
$buf .= chr(self::$shifts[ord($password[$i])]);
145145
}
146146
return $buf;
147147
}

lib/vendor/phing/util/StringHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function toCharArray($str) {
6161
$ret=array();
6262
$len=strlen($str);
6363
for ($i=0; $i < $len; $i++) {
64-
$ret[] = $str{$i};
64+
$ret[] = $str[$i];
6565
}
6666
return $ret;
6767
}

0 commit comments

Comments
 (0)