Skip to content

Commit

Permalink
more on short array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Oct 22, 2013
1 parent 40031b9 commit 40d06e6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions apps/basic/tests/acceptance/WebGuy.php
Expand Up @@ -36,7 +36,7 @@ class WebGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
* $I->submitForm('#login', ['login' => 'davert', 'password' => '123456']);
*
* ```
*
Expand All @@ -55,7 +55,7 @@ class WebGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
* $I->submitForm('#userForm', ['user' => ['login' => 'Davert', 'password' => '123456', 'agree' => true]]);
*
* ```
* Note, that pricing plan will be set to Paid, as it's selected on page.
Expand Down Expand Up @@ -89,8 +89,8 @@ public function submitForm($selector, $params) {
*
* ``` php
* <?php
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true); // POST
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true); // GET
* $I->sendAjaxPostRequest('/updateSettings', ['notifications' => true]; // POST
* $I->sendAjaxGetRequest('/updateSettings', ['notifications' => true]; // GET
*
* ```
*
Expand Down Expand Up @@ -202,12 +202,12 @@ public function amHttpAuthenticated($username, $password) {
* // from the official Guzzle manual
* $I->amGoingTo('Sign all requests with OAuth');
* $I->executeInGuzzle(function (\Guzzle\Http\Client $client) {
* $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(array(
* $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin([
* 'consumer_key' => '***',
* 'consumer_secret' => '***',
* 'token' => '***',
* 'token_secret' => '***'
* )));
* ]));
* });
* ?>
* ```
Expand Down
8 changes: 4 additions & 4 deletions apps/basic/tests/functional/TestGuy.php
Expand Up @@ -832,7 +832,7 @@ public function dontSeeInField($field, $value) {
*
* ``` php
* <?php
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
* $I->submitForm('#login', ['login' => 'davert', 'password' => '123456']);
*
* ```
*
Expand All @@ -851,7 +851,7 @@ public function dontSeeInField($field, $value) {
*
* ``` php
* <?php
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
* $I->submitForm('#userForm', ['user' => ['login' => 'Davert', 'password' => '123456', 'agree' => true]]);
*
* ```
* Note, that pricing plan will be set to Paid, as it's selected on page.
Expand Down Expand Up @@ -1042,8 +1042,8 @@ public function sendAjaxGetRequest($uri, $params = null) {
*
* ``` php
* <?php
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true); // POST
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true); // GET
* $I->sendAjaxPostRequest('/updateSettings', ['notifications' => true]; // POST
* $I->sendAjaxGetRequest('/updateSettings', ['notifications' => true]; // GET
*
* ```
*
Expand Down
2 changes: 1 addition & 1 deletion extensions/composer/yii/composer/InstallerPlugin.php
Expand Up @@ -28,7 +28,7 @@ public function activate(Composer $composer, IOInterface $io)
$composer->getInstallationManager()->addInstaller($installer);
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yii-extensions.php';
if (!is_file($file)) {
file_put_contents($file, "<?php\nreturn array();\n");
file_put_contents($file, "<?php\nreturn [];\n");
}
}
}
2 changes: 1 addition & 1 deletion framework/yii/base/Application.php
Expand Up @@ -128,7 +128,7 @@ abstract class Application extends Module
* ]
* ~~~
*/
public $extensions = array();
public $extensions = [];

/**
* @var string Used to reserve memory for fatal error handler.
Expand Down

0 comments on commit 40d06e6

Please sign in to comment.