From 1445eb01b47f60d4d16f78245369516863375bf9 Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Sun, 25 Oct 2015 21:17:53 +0000 Subject: [PATCH] php-cs-fixed --- .php_cs | 2 +- src/ActiveDataProvider.php | 2 +- src/ActiveQuery.php | 8 ++++---- src/ActiveRecord.php | 2 +- src/Collection.php | 2 +- src/Command.php | 2 +- src/Connection.php | 2 +- src/DebugAction.php | 2 +- src/DebugPanel.php | 2 +- src/ErrorResponseException.php | 2 +- src/HiArtException.php | 2 +- src/Query.php | 2 +- src/QueryBuilder.php | 27 +++++++++++++-------------- 13 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.php_cs b/.php_cs index 16a742b..f8d291c 100644 --- a/.php_cs +++ b/.php_cs @@ -6,7 +6,7 @@ Tools to use API as ActiveRecord for Yii2 @link https://github.com/hiqdev/yii2-hiart @package yii2-hiart @license BSD-3-Clause -@copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) +@copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) EOF; Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header); diff --git a/src/ActiveDataProvider.php b/src/ActiveDataProvider.php index 08690ba..d5ed709 100644 --- a/src/ActiveDataProvider.php +++ b/src/ActiveDataProvider.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/ActiveQuery.php b/src/ActiveQuery.php index 93c6de5..386498c 100644 --- a/src/ActiveQuery.php +++ b/src/ActiveQuery.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; @@ -103,10 +103,10 @@ public function createCommand($db = null) /** * Executes query and returns all results as an array. * - * @param Connection $db the DB connection used to create the DB command. - * If null, the DB connection returned by [[modelClass]] will be used. + * @param Connection $db the DB connection used to create the DB command. + * If null, the DB connection returned by [[modelClass]] will be used. + * @param array $options Options that will be passed to search command * - * @param array $options Options that will be passed to search command * @return array the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null, $options = []) diff --git a/src/ActiveRecord.php b/src/ActiveRecord.php index 68f2f19..7aeb9b4 100644 --- a/src/ActiveRecord.php +++ b/src/ActiveRecord.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/Collection.php b/src/Collection.php index 85491dd..eb8b4b7 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/Command.php b/src/Command.php index d9fc569..57565f5 100644 --- a/src/Command.php +++ b/src/Command.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/Connection.php b/src/Connection.php index e26e5c1..892c25c 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/DebugAction.php b/src/DebugAction.php index eb7274d..52de1bc 100644 --- a/src/DebugAction.php +++ b/src/DebugAction.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/DebugPanel.php b/src/DebugPanel.php index 7941fdf..370b9c6 100644 --- a/src/DebugPanel.php +++ b/src/DebugPanel.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/ErrorResponseException.php b/src/ErrorResponseException.php index 5c24cec..8ba2d9f 100644 --- a/src/ErrorResponseException.php +++ b/src/ErrorResponseException.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/HiArtException.php b/src/HiArtException.php index 9c1df0e..9fa19b5 100644 --- a/src/HiArtException.php +++ b/src/HiArtException.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/Query.php b/src/Query.php index 60de4e9..e119978 100644 --- a/src/Query.php +++ b/src/Query.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index 1a0f0ca..782a282 100644 --- a/src/QueryBuilder.php +++ b/src/QueryBuilder.php @@ -6,7 +6,7 @@ * @link https://github.com/hiqdev/yii2-hiart * @package yii2-hiart * @license BSD-3-Clause - * @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/) + * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/) */ namespace hiqdev\hiart; @@ -20,7 +20,7 @@ class QueryBuilder extends \yii\base\Object { private $_sort = [ - SORT_ASC => '_asc', + SORT_ASC => '_asc', SORT_DESC => '_desc', ]; @@ -57,22 +57,22 @@ public function build($query) return [ 'queryParts' => $parts, - 'index' => $query->index, - 'type' => $query->type, - 'options' => $options, + 'index' => $query->index, + 'type' => $query->type, + 'options' => $options, ]; } public function buildCondition($condition) { static $builders = [ - 'and' => 'buildAndCondition', + 'and' => 'buildAndCondition', 'between' => 'buildBetweenCondition', - 'eq' => 'buildEqCondition', - 'in' => 'buildInCondition', - 'like' => 'buildLikeCondition', - 'gt' => 'buildGreaterThenCondition', - 'lt' => 'buildLessThanCondition', + 'eq' => 'buildEqCondition', + 'in' => 'buildInCondition', + 'like' => 'buildLikeCondition', + 'gt' => 'buildGreaterThenCondition', + 'lt' => 'buildLessThanCondition', ]; if (empty($condition)) { return []; @@ -134,7 +134,6 @@ private function buildLessThanCondition($operator, $operands) return [$operands[0] . '_lt' => $operands[1]]; } - private function buildAndCondition($operator, $operands) { $parts = []; @@ -157,10 +156,10 @@ private function buildBetweenCondition($operator, $operands) private function buildInCondition($operator, $operands) { - $key = array_shift($operands); + $key = array_shift($operands); $value = array_shift($operands); - return [$key . '_in' => (array)$value]; + return [$key . '_in' => (array) $value]; } private function buildEqCondition($operator, $operands)