mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-29 22:21:33 +08:00
more on short array syntax
This commit is contained in:
@@ -36,7 +36,7 @@ class WebGuy extends \Codeception\AbstractGuy
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
|
* $I->submitForm('#login', ['login' => 'davert', 'password' => '123456']);
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@@ -55,7 +55,7 @@ class WebGuy extends \Codeception\AbstractGuy
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?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.
|
* Note, that pricing plan will be set to Paid, as it's selected on page.
|
||||||
@@ -89,8 +89,8 @@ class WebGuy extends \Codeception\AbstractGuy
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true); // POST
|
* $I->sendAjaxPostRequest('/updateSettings', ['notifications' => true]; // POST
|
||||||
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true); // GET
|
* $I->sendAjaxGetRequest('/updateSettings', ['notifications' => true]; // GET
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@@ -202,12 +202,12 @@ class WebGuy extends \Codeception\AbstractGuy
|
|||||||
* // from the official Guzzle manual
|
* // from the official Guzzle manual
|
||||||
* $I->amGoingTo('Sign all requests with OAuth');
|
* $I->amGoingTo('Sign all requests with OAuth');
|
||||||
* $I->executeInGuzzle(function (\Guzzle\Http\Client $client) {
|
* $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_key' => '***',
|
||||||
* 'consumer_secret' => '***',
|
* 'consumer_secret' => '***',
|
||||||
* 'token' => '***',
|
* 'token' => '***',
|
||||||
* 'token_secret' => '***'
|
* 'token_secret' => '***'
|
||||||
* )));
|
* ]));
|
||||||
* });
|
* });
|
||||||
* ?>
|
* ?>
|
||||||
* ```
|
* ```
|
||||||
|
|||||||
@@ -832,7 +832,7 @@ class TestGuy extends \Codeception\AbstractGuy
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
|
* $I->submitForm('#login', ['login' => 'davert', 'password' => '123456']);
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@@ -851,7 +851,7 @@ class TestGuy extends \Codeception\AbstractGuy
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?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.
|
* Note, that pricing plan will be set to Paid, as it's selected on page.
|
||||||
@@ -1042,8 +1042,8 @@ class TestGuy extends \Codeception\AbstractGuy
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true); // POST
|
* $I->sendAjaxPostRequest('/updateSettings', ['notifications' => true]; // POST
|
||||||
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true); // GET
|
* $I->sendAjaxGetRequest('/updateSettings', ['notifications' => true]; // GET
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class InstallerPlugin implements PluginInterface
|
|||||||
$composer->getInstallationManager()->addInstaller($installer);
|
$composer->getInstallationManager()->addInstaller($installer);
|
||||||
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yii-extensions.php';
|
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yii-extensions.php';
|
||||||
if (!is_file($file)) {
|
if (!is_file($file)) {
|
||||||
file_put_contents($file, "<?php\nreturn array();\n");
|
file_put_contents($file, "<?php\nreturn [];\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ abstract class Application extends Module
|
|||||||
* ]
|
* ]
|
||||||
* ~~~
|
* ~~~
|
||||||
*/
|
*/
|
||||||
public $extensions = array();
|
public $extensions = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Used to reserve memory for fatal error handler.
|
* @var string Used to reserve memory for fatal error handler.
|
||||||
|
|||||||
Reference in New Issue
Block a user