Commit c1268315 by Alexander Makarov

Merge pull request #1340 from pmoust/ocd

Removed whitespace etc.. *cringe*
parents bf708aa8 58bd2fb9
......@@ -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
......
......@@ -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;
......
......@@ -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 <qiang.xue@gmail.com>
* @since 2.0
*/
......
<?php
namespace Codeception\Module;
// here you can define custom functions for CodeGuy
// here you can define custom functions for CodeGuy
class CodeHelper extends \Codeception\Module
{
......
<?php
namespace Codeception\Module;
// here you can define custom functions for TestGuy
// here you can define custom functions for TestGuy
class TestHelper extends \Codeception\Module
{
......
<?php
namespace Codeception\Module;
// here you can define custom functions for WebGuy
// here you can define custom functions for WebGuy
class WebHelper extends \Codeception\Module
{
......
......@@ -25,6 +25,6 @@ use Codeception\Module\CodeHelper;
class CodeGuy extends \Codeception\AbstractGuy
{
}
......@@ -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`.
......
......@@ -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
......
......@@ -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:
......
......@@ -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.
......
......@@ -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
......
......@@ -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
......
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
-------------------------------
......
......@@ -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).
......
......@@ -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);
......
......@@ -196,13 +196,13 @@ EOD;
//http://www.postgresql.org/message-id/26677.1086673982@sss.pgh.pa.us
$sql = <<<SQL
select
select
(select string_agg(attname,',') attname from pg_attribute where attrelid=ct.conrelid and attnum = any(ct.conkey)) as columns,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
(select string_agg(attname,',') attname from pg_attribute where attrelid=ct.confrelid and attnum = any(ct.confkey)) as foreign_columns
from
pg_constraint ct
pg_constraint ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
left join pg_class fc on fc.oid=ct.confrelid
......@@ -241,7 +241,7 @@ SQL;
$tableName = $this->db->quoteValue($table->name);
$schemaName = $this->db->quoteValue($table->schemaName);
$sql = <<<SQL
SELECT
SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
......@@ -266,11 +266,11 @@ SELECT
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
......
......@@ -174,7 +174,7 @@ class Request extends \yii\base\Request
{
return $this->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.
......
......@@ -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');
* ~~~
......
<?php
/**
*
*
*
*
* @author Carsten Brandt <mail@cebe.cc>
*/
......
......@@ -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();
......
......@@ -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([
......
<?php
/**
*
*
*
*
* @author Carsten Brandt <mail@cebe.cc>
*/
......
......@@ -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
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment