Browse Source

array syntax fix.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
ffded7a1b5
  1. 2
      extensions/bootstrap/Progress.php
  2. 8
      extensions/swiftmailer/Mailer.php
  3. 10
      framework/yii/web/AssetConverter.php
  4. 2
      tests/unit/framework/mail/BaseMessageTest.php

2
extensions/bootstrap/Progress.php

@ -48,7 +48,7 @@ use yii\helpers\Html;
* 'bars' => [
* ['percent' => 30, 'options' => ['class' => 'bar-danger']],
* ['percent' => 30, 'label' => 'test', 'options' => ['class' => 'bar-success']],
* ['percent' => 35, 'options' => array['class' => 'bar-warning']],
* ['percent' => 35, 'options' => ['class' => 'bar-warning']],
* ]
* ]);
* ```

8
extensions/swiftmailer/Mailer.php

@ -17,9 +17,9 @@ use yii\mail\BaseMailer;
* To use Mailer, you should configure it in the application configuration like the following,
*
* ~~~
* 'components' => array(
* 'components' => [
* ...
* 'email' => array(
* 'email' => [
* 'class' => 'yii\swiftmailer\Mailer',
* 'transport' => [
* 'class' => 'Swift_SmtpTransport',
@ -29,9 +29,9 @@ use yii\mail\BaseMailer;
* 'port' => '587',
* 'encryption' => 'tls',
* ],
* ),
* ],
* ...
* ),
* ],
* ~~~
*
* You may also skip the configuration of the [[transport]] property. In that case, the default

10
framework/yii/web/AssetConverter.php

@ -74,11 +74,11 @@ class AssetConverter extends Component implements AssetConverterInterface
'{from}' => escapeshellarg("$basePath/$asset"),
'{to}' => escapeshellarg("$basePath/$result"),
]);
$descriptor = array(
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
$pipes = array();
$descriptor = [
1 => ['pipe', 'w'],
2 => ['pipe', 'w'],
];
$pipes = [];
$proc = proc_open($command, $descriptor, $pipes, $basePath);
$stdout = stream_get_contents($pipes[1]);
$stderr = stream_get_contents($pipes[2]);

2
tests/unit/framework/mail/BaseMessageTest.php

@ -69,7 +69,7 @@ class BaseMessageTest extends TestCase
class TestMailer extends BaseMailer
{
public $messageClass = 'yiiunit\framework\mail\TestMessage';
public $sentMessages = array();
public $sentMessages = [];
protected function sendMessage($message)
{

Loading…
Cancel
Save