From a28e74708bb69f6f4e759895777207ce9ad8e342 Mon Sep 17 00:00:00 2001 From: Panagiotis Moustafellos Date: Wed, 27 Nov 2013 19:48:16 +0200 Subject: [PATCH 1/9] swapped to return []; (OCD kicking in?) --- apps/advanced/environments/dev/backend/config/params-local.php | 3 +-- apps/advanced/environments/dev/common/config/params-local.php | 3 +-- apps/advanced/environments/dev/console/config/main-local.php | 3 +-- apps/advanced/environments/dev/console/config/params-local.php | 3 +-- apps/advanced/environments/dev/frontend/config/params-local.php | 3 +-- apps/advanced/environments/prod/backend/config/main-local.php | 3 +-- apps/advanced/environments/prod/backend/config/params-local.php | 3 +-- apps/advanced/environments/prod/common/config/params-local.php | 3 +-- apps/advanced/environments/prod/console/config/main-local.php | 3 +-- apps/advanced/environments/prod/console/config/params-local.php | 3 +-- apps/advanced/environments/prod/frontend/config/main-local.php | 3 +-- apps/advanced/environments/prod/frontend/config/params-local.php | 3 +-- 12 files changed, 12 insertions(+), 24 deletions(-) diff --git a/apps/advanced/environments/dev/backend/config/params-local.php b/apps/advanced/environments/dev/backend/config/params-local.php index d0b9c34..881ab67 100644 --- a/apps/advanced/environments/dev/backend/config/params-local.php +++ b/apps/advanced/environments/dev/backend/config/params-local.php @@ -1,3 +1,2 @@ Date: Wed, 27 Nov 2013 19:53:11 +0200 Subject: [PATCH 2/9] Removed trailing whitespace.. (OCD really kicking in) --- README.md | 4 +- apps/advanced/frontend/widgets/Alert.php | 12 +-- apps/basic/commands/HelloController.php | 2 +- apps/basic/tests/_helpers/CodeHelper.php | 2 +- apps/basic/tests/_helpers/TestHelper.php | 2 +- apps/basic/tests/_helpers/WebHelper.php | 2 +- apps/basic/tests/acceptance/WebGuy.php | 100 ++++++++++---------- apps/basic/tests/functional/TestGuy.php | 104 ++++++++++----------- apps/basic/tests/unit/CodeGuy.php | 2 +- docs/guide/active-record.md | 2 +- docs/guide/authentication.md | 2 +- docs/guide/composer.md | 2 +- docs/guide/images/structure.vsd | Bin 80896 -> 80895 bytes docs/guide/installation.md | 2 +- docs/guide/model.md | 4 +- docs/guide/mvc.md | 2 +- docs/guide/security.md | 2 +- docs/guide/upgrade-from-v1.md | 2 +- docs/internals/exception_hierarchy.vsd | Bin 151040 -> 151038 bytes framework/yii/assets/jquery.maskedinput.js | 6 +- framework/yii/db/pgsql/Schema.php | 14 +-- framework/yii/web/Request.php | 4 +- framework/yii/web/Response.php | 16 ++-- tests/unit/data/i18n/test.mo | Bin 1426 -> 1422 bytes tests/unit/framework/ar/ActiveRecordTestTrait.php | 4 +- tests/unit/framework/base/ExceptionTest.php | 2 +- .../unit/framework/data/ActiveDataProviderTest.php | 2 +- tests/unit/framework/web/AssetBundleTest.php | 4 +- .../framework/web/XmlResponseFormatterTest.php | 2 +- 29 files changed, 151 insertions(+), 151 deletions(-) diff --git a/README.md b/README.md index 3bc2d67..35a50f5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ without prior notices. **Yii 2.0 is not ready for production use yet.** [![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2/v/stable.png)](https://packagist.org/packages/yiisoft/yii2) [![Total Downloads](https://poser.pugx.org/yiisoft/yii2/downloads.png)](https://packagist.org/packages/yiisoft/yii2) -[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2) +[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2) [![Dependency Status](https://www.versioneye.com/php/yiisoft:yii2/dev-master/badge.png)](https://www.versioneye.com/php/yiisoft:yii2/dev-master) @@ -24,7 +24,7 @@ DIRECTORY STRUCTURE benchmark/ app demonstrating the minimal overhead introduced by the framework build/ internally used build tools docs/ documentation - extensions/ extensions + extensions/ extensions framework/ framework files yii/ framework source files tests/ tests of the core framework code diff --git a/apps/advanced/frontend/widgets/Alert.php b/apps/advanced/frontend/widgets/Alert.php index e070e1b..390f359 100644 --- a/apps/advanced/frontend/widgets/Alert.php +++ b/apps/advanced/frontend/widgets/Alert.php @@ -27,13 +27,13 @@ class Alert extends \yii\bootstrap\Widget * - $value is the bootstrap alert type (i.e. danger, success, info, warning) */ public $alertTypes = [ - 'error' => 'danger', - 'danger' => 'danger', - 'success' => 'success', - 'info' => 'info', + 'error' => 'danger', + 'danger' => 'danger', + 'success' => 'success', + 'info' => 'info', 'warning' => 'warning' ]; - + /** * @var array the options for rendering the close button tag. */ @@ -49,7 +49,7 @@ class Alert extends \yii\bootstrap\Widget foreach ($flashes as $type => $message) { /* initialize css class for each alert box */ - $this->options['class'] = 'alert-' . $this->alertTypes[$type] . $appendCss; + $this->options['class'] = 'alert-' . $this->alertTypes[$type] . $appendCss; /* assign unique id to each alert box */ $this->options['id'] = $this->getId() . '-' . $type; diff --git a/apps/basic/commands/HelloController.php b/apps/basic/commands/HelloController.php index 29394cd..db36c5a 100644 --- a/apps/basic/commands/HelloController.php +++ b/apps/basic/commands/HelloController.php @@ -13,7 +13,7 @@ use yii\console\Controller; * This command echoes what the first argument that you have entered. * * This command is provided as an example for you to learn how to create console commands. - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/apps/basic/tests/_helpers/CodeHelper.php b/apps/basic/tests/_helpers/CodeHelper.php index 972c8f3..eea532c 100644 --- a/apps/basic/tests/_helpers/CodeHelper.php +++ b/apps/basic/tests/_helpers/CodeHelper.php @@ -1,7 +1,7 @@ dontSeeElement('.error'); @@ -834,7 +834,7 @@ class WebGuy extends \Codeception\AbstractGuy * Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath * * Example: - * + * * ``` php * dontSeeElement('.error'); @@ -854,7 +854,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -873,7 +873,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -892,7 +892,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -911,16 +911,16 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. * ---------------------------------------------- * * Fills a text field or textarea with value. - * + * * Example: - * + * * ``` php * fillField("//input[@type='text']", "Hello World!"); @@ -941,7 +941,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -981,7 +981,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1011,7 +1011,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1040,7 +1040,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1099,7 +1099,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1152,7 +1152,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1209,7 +1209,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1266,7 +1266,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1321,7 +1321,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1376,7 +1376,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1419,7 +1419,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1462,7 +1462,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1485,7 +1485,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1507,7 +1507,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1529,7 +1529,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1560,7 +1560,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1591,7 +1591,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1648,7 +1648,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1705,7 +1705,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1774,7 +1774,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1841,7 +1841,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1874,7 +1874,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1907,7 +1907,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1962,7 +1962,7 @@ class WebGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. diff --git a/apps/basic/tests/functional/TestGuy.php b/apps/basic/tests/functional/TestGuy.php index 553a44f..9da8947 100644 --- a/apps/basic/tests/functional/TestGuy.php +++ b/apps/basic/tests/functional/TestGuy.php @@ -27,7 +27,7 @@ use Codeception\Module\Yii2; class TestGuy extends \Codeception\AbstractGuy { - + /** * This method is generated. * Documentation taken from corresponding module. @@ -49,7 +49,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -79,7 +79,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -106,7 +106,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -133,7 +133,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -161,7 +161,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -220,7 +220,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -281,7 +281,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -336,7 +336,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -355,7 +355,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -412,7 +412,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -439,13 +439,13 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. * ---------------------------------------------- * - * Authenticates user for HTTP_AUTH + * Authenticates user for HTTP_AUTH * * @param $username * @param $password @@ -461,7 +461,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -494,7 +494,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -540,7 +540,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -605,7 +605,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -670,7 +670,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -733,7 +733,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -794,7 +794,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -853,7 +853,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -906,7 +906,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -963,7 +963,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1020,7 +1020,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1075,7 +1075,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1130,7 +1130,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1161,7 +1161,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1224,7 +1224,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1285,7 +1285,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1354,7 +1354,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1421,7 +1421,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1477,16 +1477,16 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. * ---------------------------------------------- * * Fills a text field or textarea with value. - * + * * Example: - * + * * ``` php * fillField("//input[@type='text']", "Hello World!"); @@ -1507,7 +1507,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1547,7 +1547,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1577,7 +1577,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1606,7 +1606,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1637,7 +1637,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1662,7 +1662,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1698,7 +1698,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1731,7 +1731,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1764,7 +1764,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1817,7 +1817,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1826,7 +1826,7 @@ class TestGuy extends \Codeception\AbstractGuy * Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath * * Example: - * + * * ``` php * dontSeeElement('.error'); @@ -1854,7 +1854,7 @@ class TestGuy extends \Codeception\AbstractGuy * Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath * * Example: - * + * * ``` php * dontSeeElement('.error'); @@ -1874,7 +1874,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1931,7 +1931,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -1988,7 +1988,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -2025,7 +2025,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -2068,7 +2068,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. @@ -2123,7 +2123,7 @@ class TestGuy extends \Codeception\AbstractGuy return new Maybe(); } - + /** * This method is generated. * Documentation taken from corresponding module. diff --git a/apps/basic/tests/unit/CodeGuy.php b/apps/basic/tests/unit/CodeGuy.php index 613c754..70165a6 100644 --- a/apps/basic/tests/unit/CodeGuy.php +++ b/apps/basic/tests/unit/CodeGuy.php @@ -25,6 +25,6 @@ use Codeception\Module\CodeHelper; class CodeGuy extends \Codeception\AbstractGuy { - + } diff --git a/docs/guide/active-record.md b/docs/guide/active-record.md index 90826b0..aa47751 100644 --- a/docs/guide/active-record.md +++ b/docs/guide/active-record.md @@ -3,7 +3,7 @@ Active Record Active Record implements the [Active Record design pattern](http://en.wikipedia.org/wiki/Active_record). The premise behind Active Record is that an individual [[ActiveRecord]] object is associated with a specific row in a database table. The object's attributes are mapped to the columns of the corresponding table. Referencing an Active Record attribute is equivalent to accessing -the corresponding table column for that record. +the corresponding table column for that record. As an example, say that the `Customer` ActiveRecord class is associated with the `tbl_customer` table. This would mean that the class's `name` attribute is automatically mapped to the `name` column in `tbl_customer`. diff --git a/docs/guide/authentication.md b/docs/guide/authentication.md index 0b81f14..e73b11d 100644 --- a/docs/guide/authentication.md +++ b/docs/guide/authentication.md @@ -3,7 +3,7 @@ Authentication Authentication is the act of verifying who a user is, and is the basis of the login process. Typically, authentication uses an identifier--a username or email address--and password, submitted through a form. The application then compares this information against that previously stored. -In Yii all this is done semi-automatically, leaving the developer to merely implement [[\yii\web\IdentityInterface]]. Typically, implementation is accomplished using the `User` model. You can find a full featured example in the +In Yii all this is done semi-automatically, leaving the developer to merely implement [[\yii\web\IdentityInterface]]. Typically, implementation is accomplished using the `User` model. You can find a full featured example in the [advanced application template](installation.md). Below only the interface methods are listed: ```php diff --git a/docs/guide/composer.md b/docs/guide/composer.md index 89eac35..8abef5a 100644 --- a/docs/guide/composer.md +++ b/docs/guide/composer.md @@ -9,7 +9,7 @@ Installing Composer In order to install Composer, check the official guide for your operating system: -* [Linux](http://getcomposer.org/doc/00-intro.md#installation-nix) +* [Linux](http://getcomposer.org/doc/00-intro.md#installation-nix) * [Windows](http://getcomposer.org/doc/00-intro.md#installation-windows) All of the details can be found in the guide, but you'll either download Composer directly from [http://getcomposer.org/](http://getcomposer.org/), or run the following command: diff --git a/docs/guide/images/structure.vsd b/docs/guide/images/structure.vsd index e683556d08d9ee8f8b33aa5b14879f97a7a90308..c3b795f92b5c0e7d384f7b8ac46738a9d31e8a13 100644 GIT binary patch delta 14 WcmZqp!Seq*%LeP(%{H}1_5lDo%m>W? delta 16 YcmezWou%Oi%LeOOMupARwMX^=07l0L?EnA( diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 1575163..6a99458 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -19,7 +19,7 @@ curl -s http://getcomposer.org/installer | php For problems or more information, see the official Composer guide: -* [Linux](http://getcomposer.org/doc/00-intro.md#installation-nix) +* [Linux](http://getcomposer.org/doc/00-intro.md#installation-nix) * [Windows](http://getcomposer.org/doc/00-intro.md#installation-windows) With Composer installed, you can create a new Yii site using one of Yii's ready-to-use application templates. diff --git a/docs/guide/model.md b/docs/guide/model.md index abf2b48..a02e1ad 100644 --- a/docs/guide/model.md +++ b/docs/guide/model.md @@ -59,7 +59,7 @@ Attribute Labels ---------------- Attribute labels are mainly used for display purpose. For example, given an attribute `firstName`, we can declare -a label `First Name` that is more user-friendly when displayed to end users in places such as form labels and +a label `First Name` that is more user-friendly when displayed to end users in places such as form labels and error messages. Given an attribute name, you can obtain its label by calling [[\yii\base\Model::getAttributeLabel()]]. To declare attribute labels, override the [[\yii\base\Model::attributeLabels()]] method. The overridden method returns a mapping of attribute names to attribute labels, as shown in the example below. If an attribute is not found @@ -86,7 +86,7 @@ Scenarios --------- A model may be used in different *scenarios*. For example, a `User` model may be used to collect user login inputs, -but it may also be used for user registration purposes. In the one scenario, every piece of data is required; in the other, only the username and password would be. +but it may also be used for user registration purposes. In the one scenario, every piece of data is required; in the other, only the username and password would be. To easily implement the business logic for different scenarios, each model has a property named `scenario` that stores the name of the scenario that the model is currently being used in. As will be explained in the next diff --git a/docs/guide/mvc.md b/docs/guide/mvc.md index 22f86a1..8579064 100644 --- a/docs/guide/mvc.md +++ b/docs/guide/mvc.md @@ -3,7 +3,7 @@ MVC Overview Yii implements the model-view-controller (MVC) design pattern, which is widely adopted in web and other application programming. MVC aims to separate business logic from -user interface considerations, allowing developers to more easily change individual components of an application without affecting, or even touching, another. +user interface considerations, allowing developers to more easily change individual components of an application without affecting, or even touching, another. In MVC, the *model* represents the information (the data) and the business rules to which the data must adhere. The *view* contains elements diff --git a/docs/guide/security.md b/docs/guide/security.md index f54a133..d74a661 100644 --- a/docs/guide/security.md +++ b/docs/guide/security.md @@ -1,7 +1,7 @@ Security ======== -Good security is vital to the health and success of many websites. Unfortunately, many developers may cut corners when it comes to security due to a lack of understanding or too large of an implementation hurdle. To make your Yii-based site as secure as possible, the Yii framework has baked in several excellent, and easy to use, security features. +Good security is vital to the health and success of many websites. Unfortunately, many developers may cut corners when it comes to security due to a lack of understanding or too large of an implementation hurdle. To make your Yii-based site as secure as possible, the Yii framework has baked in several excellent, and easy to use, security features. Hashing and verifying passwords ------------------------------- diff --git a/docs/guide/upgrade-from-v1.md b/docs/guide/upgrade-from-v1.md index 37a7511..c02a48d 100644 --- a/docs/guide/upgrade-from-v1.md +++ b/docs/guide/upgrade-from-v1.md @@ -135,7 +135,7 @@ Path alias is also closely related with class namespaces. It is recommended that alias be defined for each root namespace so that you can use Yii the class autoloader without any further configuration. For example, because `@yii` refers to the Yii installation directory, a class like `yii\web\Request` can be autoloaded by Yii. If you use a third party library -such as Zend Framework, you may define a path alias `@Zend` which refers to its installation +such as Zend Framework, you may define a path alias `@Zend` which refers to its installation directory and Yii will be able to autoload any class in this library. More on path aliases can be found in the [Basic concepts section](basics.md). diff --git a/docs/internals/exception_hierarchy.vsd b/docs/internals/exception_hierarchy.vsd index d044ea931510cc2c9749abefe7ef74f56e449d27..ce4060749587fc43f8131db45d9995e5f7cea361 100644 GIT binary patch delta 23 fcmZpe!})JEXTugoCxh+I28?l^wl7j*iqi%Fb7u(f delta 27 gcmex2o3mjKXTugoCj&->?LZ>#6Odk@#1y9u0FF@!F8}}l diff --git a/framework/yii/assets/jquery.maskedinput.js b/framework/yii/assets/jquery.maskedinput.js index 49a5a72..902b5d3 100644 --- a/framework/yii/assets/jquery.maskedinput.js +++ b/framework/yii/assets/jquery.maskedinput.js @@ -9,7 +9,7 @@ var el = document.createElement('input'), name = 'onpaste'; el.setAttribute(name, ''); - return (typeof el[name] === 'function')?'paste':'input'; + return (typeof el[name] === 'function')?'paste':'input'; } var pasteEventName = getPasteEvent() + ".mask", @@ -322,9 +322,9 @@ $.fn.extend({ .bind("keydown.mask", keydownEvent) .bind("keypress.mask", keypressEvent) .bind(pasteEventName, function() { - setTimeout(function() { + setTimeout(function() { var pos=checkVal(true); - input.caret(pos); + input.caret(pos); if (settings.completed && pos == input.val().length) settings.completed.call(input); }, 0); diff --git a/framework/yii/db/pgsql/Schema.php b/framework/yii/db/pgsql/Schema.php index dbf7237..8cc0a39 100644 --- a/framework/yii/db/pgsql/Schema.php +++ b/framework/yii/db/pgsql/Schema.php @@ -196,13 +196,13 @@ EOD; //http://www.postgresql.org/message-id/26677.1086673982@sss.pgh.pa.us $sql = <<db->quoteValue($table->name); $schemaName = $this->db->quoteValue($table->schemaName); $sql = <<getMethod() === 'OPTIONS'; } - + /** * Returns whether this is a HEAD request. * @return boolean whether this is a HEAD request. @@ -183,7 +183,7 @@ class Request extends \yii\base\Request { return $this->getMethod() === 'HEAD'; } - + /** * Returns whether this is a POST request. * @return boolean whether this is a POST request. diff --git a/framework/yii/web/Response.php b/framework/yii/web/Response.php index 3ebd358..bb77848 100644 --- a/framework/yii/web/Response.php +++ b/framework/yii/web/Response.php @@ -513,8 +513,8 @@ class Response extends \yii\base\Response * specified by that header using web server internals including all optimizations like caching-headers. * * As this header directive is non-standard different directives exists for different web servers applications: - * - * - Apache: [X-Sendfile](http://tn123.org/mod_xsendfile) + * + * - Apache: [X-Sendfile](http://tn123.org/mod_xsendfile) * - Lighttpd v1.4: [X-LIGHTTPD-send-file](http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file) * - Lighttpd v1.5: [X-Sendfile](http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file) * - Nginx: [X-Accel-Redirect](http://wiki.nginx.org/XSendfile) @@ -524,23 +524,23 @@ class Response extends \yii\base\Response * a proper xHeader should be sent. * * **Note** - * - * This option allows to download files that are not under web folders, and even files that are otherwise protected + * + * This option allows to download files that are not under web folders, and even files that are otherwise protected * (deny from all) like `.htaccess`. * * **Side effects** - * + * * If this option is disabled by the web server, when this method is called a download configuration dialog * will open but the downloaded file will have 0 bytes. * * **Known issues** - * + * * There is a Bug with Internet Explorer 6, 7 and 8 when X-SENDFILE is used over an SSL connection, it will show - * an error message like this: "Internet Explorer was not able to open this Internet site. The requested site + * an error message like this: "Internet Explorer was not able to open this Internet site. The requested site * is either unavailable or cannot be found.". You can work around this problem by removing the `Pragma`-header. * * **Example** - * + * * ~~~ * Yii::$app->request->xSendFile('/home/user/Pictures/picture1.jpg'); * ~~~ diff --git a/tests/unit/data/i18n/test.mo b/tests/unit/data/i18n/test.mo index d5f94f14a3b52a4ef0b2ddaeeb6bcff474f67594..2b25a7c3386a41ea8d309a1d4a72aca734ff7404 100644 GIT binary patch delta 39 vcmbQl-N(J5fN63elduq1fWK}~YFTD+W`3ToOJYf?)#MpWHk+?9?PUT0`ST4x delta 59 zcmeC E04od<`v3p{ diff --git a/tests/unit/framework/ar/ActiveRecordTestTrait.php b/tests/unit/framework/ar/ActiveRecordTestTrait.php index 5602096..9cd65b9 100644 --- a/tests/unit/framework/ar/ActiveRecordTestTrait.php +++ b/tests/unit/framework/ar/ActiveRecordTestTrait.php @@ -1,7 +1,7 @@ */ diff --git a/tests/unit/framework/base/ExceptionTest.php b/tests/unit/framework/base/ExceptionTest.php index 5a623b1..635b55c 100644 --- a/tests/unit/framework/base/ExceptionTest.php +++ b/tests/unit/framework/base/ExceptionTest.php @@ -8,7 +8,7 @@ use yii\base\InvalidCallException; class ExceptionTest extends TestCase { - public function testToArrayWithPrevious() + public function testToArrayWithPrevious() { $e = new InvalidCallException('bar', 0 ,new InvalidCallException('foo')); $array = $e->toArray(); diff --git a/tests/unit/framework/data/ActiveDataProviderTest.php b/tests/unit/framework/data/ActiveDataProviderTest.php index 4e4ca77..a58deab 100644 --- a/tests/unit/framework/data/ActiveDataProviderTest.php +++ b/tests/unit/framework/data/ActiveDataProviderTest.php @@ -160,7 +160,7 @@ class ActiveDataProviderTest extends DatabaseTestCase $this->assertEquals(2, count($provider->getModels())); } - public function testPaginationBeforeModels() + public function testPaginationBeforeModels() { $query = new Query; $provider = new ActiveDataProvider([ diff --git a/tests/unit/framework/web/AssetBundleTest.php b/tests/unit/framework/web/AssetBundleTest.php index 24c36d6..d989a13 100644 --- a/tests/unit/framework/web/AssetBundleTest.php +++ b/tests/unit/framework/web/AssetBundleTest.php @@ -1,7 +1,7 @@ */ diff --git a/tests/unit/framework/web/XmlResponseFormatterTest.php b/tests/unit/framework/web/XmlResponseFormatterTest.php index 800de66..bf1aa29 100644 --- a/tests/unit/framework/web/XmlResponseFormatterTest.php +++ b/tests/unit/framework/web/XmlResponseFormatterTest.php @@ -48,7 +48,7 @@ class XmlResponseFormatterTest extends \yiiunit\TestCase } /** - * @param mixed $data the data to be formatted + * @param mixed $data the data to be formatted * @param string $xml the expected XML body * @dataProvider formatScalarDataProvider */ From 5cb2283d894262ff0b9dc5e4d946c2340f567ba6 Mon Sep 17 00:00:00 2001 From: Panagiotis Moustafellos Date: Wed, 27 Nov 2013 21:52:10 +0200 Subject: [PATCH 3/9] Travis: Adding sphinx support --- .travis.yml | 1 + tests/unit/data/config.php | 2 +- tests/unit/data/sphinx/sphinx.conf | 4 ++-- tests/unit/data/travis/sphinx-setup.sh | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 tests/unit/data/travis/sphinx-setup.sh diff --git a/.travis.yml b/.travis.yml index cfea251..aadd537 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ before_script: - tests/unit/data/travis/apc-setup.sh - tests/unit/data/travis/memcache-setup.sh - tests/unit/data/travis/cubrid-setup.sh + - tests/unit/data/travis/sphinx-setup.sh #script: # - phpunit --coverage-clover tests/unit/runtime/coveralls/clover.xml --verbose --exclude-group mssql,oci,wincache,xcache,zenddata,vendor,sphinx diff --git a/tests/unit/data/config.php b/tests/unit/data/config.php index 5a068ae..0bd5e47 100644 --- a/tests/unit/data/config.php +++ b/tests/unit/data/config.php @@ -42,7 +42,7 @@ return [ 'sphinx' => [ 'sphinx' => [ 'dsn' => 'mysql:host=127.0.0.1;port=9306;', - 'username' => '', + 'username' => 'travis', 'password' => '', ], 'db' => [ diff --git a/tests/unit/data/sphinx/sphinx.conf b/tests/unit/data/sphinx/sphinx.conf index 30cf083..e38beda 100644 --- a/tests/unit/data/sphinx/sphinx.conf +++ b/tests/unit/data/sphinx/sphinx.conf @@ -14,7 +14,7 @@ source yii2_test_article_src type = mysql sql_host = localhost - sql_user = + sql_user = travis sql_pass = sql_db = yii2test sql_port = 3306 # optional, default is 3306 @@ -37,7 +37,7 @@ source yii2_test_item_src type = mysql sql_host = localhost - sql_user = + sql_user = travis sql_pass = sql_db = yii2test sql_port = 3306 # optional, default is 3306 diff --git a/tests/unit/data/travis/sphinx-setup.sh b/tests/unit/data/travis/sphinx-setup.sh new file mode 100755 index 0000000..1dbaae5 --- /dev/null +++ b/tests/unit/data/travis/sphinx-setup.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +SCRIPT=$(readlink -f "$0") +CWD=$(dirname "$SCRIPT") + +# install sphinxsearch: +echo 'yes' | sudo add-apt-repository ppa:builds/sphinxsearch-daily +sudo apt-get update +sudo apt-get install sphinxsearch + +# setup test Sphinx indexes: +indexer --config $CWD/../sphinx/sphinx.conf --all + +# run searchd: +searchd --config $CWD/../sphinx/sphinx.conf From 4b36d78efbf226bd7098cd575e802c3b060e19c3 Mon Sep 17 00:00:00 2001 From: Panagiotis Moustafellos Date: Wed, 27 Nov 2013 21:54:55 +0200 Subject: [PATCH 4/9] Revert "swapped to return []; (OCD kicking in?)" This reverts commit a28e74708bb69f6f4e759895777207ce9ad8e342. --- apps/advanced/environments/dev/backend/config/params-local.php | 3 ++- apps/advanced/environments/dev/common/config/params-local.php | 3 ++- apps/advanced/environments/dev/console/config/main-local.php | 3 ++- apps/advanced/environments/dev/console/config/params-local.php | 3 ++- apps/advanced/environments/dev/frontend/config/params-local.php | 3 ++- apps/advanced/environments/prod/backend/config/main-local.php | 3 ++- apps/advanced/environments/prod/backend/config/params-local.php | 3 ++- apps/advanced/environments/prod/common/config/params-local.php | 3 ++- apps/advanced/environments/prod/console/config/main-local.php | 3 ++- apps/advanced/environments/prod/console/config/params-local.php | 3 ++- apps/advanced/environments/prod/frontend/config/main-local.php | 3 ++- apps/advanced/environments/prod/frontend/config/params-local.php | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/apps/advanced/environments/dev/backend/config/params-local.php b/apps/advanced/environments/dev/backend/config/params-local.php index 881ab67..d0b9c34 100644 --- a/apps/advanced/environments/dev/backend/config/params-local.php +++ b/apps/advanced/environments/dev/backend/config/params-local.php @@ -1,2 +1,3 @@ Date: Wed, 27 Nov 2013 22:06:28 +0200 Subject: [PATCH 5/9] adding sphinx log dirs etc --- tests/unit/data/travis/sphinx-setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/data/travis/sphinx-setup.sh b/tests/unit/data/travis/sphinx-setup.sh index 1dbaae5..30ac33e 100755 --- a/tests/unit/data/travis/sphinx-setup.sh +++ b/tests/unit/data/travis/sphinx-setup.sh @@ -8,6 +8,12 @@ echo 'yes' | sudo add-apt-repository ppa:builds/sphinxsearch-daily sudo apt-get update sudo apt-get install sphinxsearch +# log files +sudo mkdir /var/log/sphinx +sudo touch /var/log/sphinx/searchd.log +sudo touch /var/log/sphinx/query.log +chmod -R 777 /var/log/sphinx # ugly + # setup test Sphinx indexes: indexer --config $CWD/../sphinx/sphinx.conf --all From 0d8ae877d375a11293da5771e9937684e707aebe Mon Sep 17 00:00:00 2001 From: Panagiotis Moustafellos Date: Wed, 27 Nov 2013 22:10:41 +0200 Subject: [PATCH 6/9] forcing travis build --- tests/unit/data/sphinx/force_travis.php | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/unit/data/sphinx/force_travis.php diff --git a/tests/unit/data/sphinx/force_travis.php b/tests/unit/data/sphinx/force_travis.php new file mode 100644 index 0000000..fd39dc6 --- /dev/null +++ b/tests/unit/data/sphinx/force_travis.php @@ -0,0 +1,9 @@ + Date: Wed, 27 Nov 2013 22:12:47 +0200 Subject: [PATCH 7/9] Revert "forcing travis build" This reverts commit 0d8ae877d375a11293da5771e9937684e707aebe. --- tests/unit/data/sphinx/force_travis.php | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 tests/unit/data/sphinx/force_travis.php diff --git a/tests/unit/data/sphinx/force_travis.php b/tests/unit/data/sphinx/force_travis.php deleted file mode 100644 index fd39dc6..0000000 --- a/tests/unit/data/sphinx/force_travis.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Wed, 27 Nov 2013 22:14:44 +0200 Subject: [PATCH 8/9] created log and spl dir --- tests/unit/data/travis/sphinx-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/data/travis/sphinx-setup.sh b/tests/unit/data/travis/sphinx-setup.sh index 30ac33e..47bf28c 100755 --- a/tests/unit/data/travis/sphinx-setup.sh +++ b/tests/unit/data/travis/sphinx-setup.sh @@ -12,7 +12,11 @@ sudo apt-get install sphinxsearch sudo mkdir /var/log/sphinx sudo touch /var/log/sphinx/searchd.log sudo touch /var/log/sphinx/query.log -chmod -R 777 /var/log/sphinx # ugly +sudo chmod -R 777 /var/log/sphinx # ugly (for travis) + +# spl dir +sudo mkdir /var/lib/sphinx +sudo chmod 777 /var/lib/sphinx # ugly (for travis) # setup test Sphinx indexes: indexer --config $CWD/../sphinx/sphinx.conf --all From 12fe9292fea811c5c618827fd1104de034527681 Mon Sep 17 00:00:00 2001 From: Panagiotis Moustafellos Date: Wed, 27 Nov 2013 22:23:11 +0200 Subject: [PATCH 9/9] proper db name (comply with yiitest) --- tests/unit/data/sphinx/sphinx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/data/sphinx/sphinx.conf b/tests/unit/data/sphinx/sphinx.conf index e38beda..91f5ee3 100644 --- a/tests/unit/data/sphinx/sphinx.conf +++ b/tests/unit/data/sphinx/sphinx.conf @@ -16,7 +16,7 @@ source yii2_test_article_src sql_host = localhost sql_user = travis sql_pass = - sql_db = yii2test + sql_db = yiitest sql_port = 3306 # optional, default is 3306 sql_query = \