Skip to content

Commit

Permalink
csfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jan 22, 2017
1 parent 46f9765 commit e6916d2
Show file tree
Hide file tree
Showing 28 changed files with 68 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -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-2016, HiQDev (http://hiqdev.com/)
@copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
EOF;

return PhpCsFixer\Config::create()
Expand Down
9 changes: 4 additions & 5 deletions src/AbstractConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand All @@ -19,14 +19,13 @@

/**
* Abstract connection class.
*
*/
abstract class AbstractConnection extends Component
{
const EVENT_AFTER_OPEN = 'afterOpen';

/**
* @var string to be specified in concrete implementation.
* @var string to be specified in concrete implementation
*/
public $queryBuilderClass;

Expand All @@ -46,7 +45,7 @@ abstract class AbstractConnection extends Component
public $config = [];

/**
* @var object request handler common for all requests of this connection.
* @var object request handler common for all requests of this connection
*/
protected $_handler;

Expand Down Expand Up @@ -154,7 +153,7 @@ public function createCommand(array $config = [])
}

/**
* @return QueryBuilder the query builder for this connection.
* @return QueryBuilder the query builder for this connection
*/
public function getQueryBuilder()
{
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
4 changes: 2 additions & 2 deletions src/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;

abstract class AbstractRequest implements \Serializable
{
/**
* @var string response implementation to be specified in concrete implementation.
* @var string response implementation to be specified in concrete implementation
*/
protected $responseClass;

Expand Down
2 changes: 1 addition & 1 deletion src/AbstractResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
2 changes: 1 addition & 1 deletion src/ActiveDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
6 changes: 2 additions & 4 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;

use yii\db\ActiveQueryInterface;
use yii\db\ActiveQueryTrait;
use yii\db\ActiveRelationTrait;
use yii\helpers\ArrayHelper;

class ActiveQuery extends Query implements ActiveQueryInterface
{
Expand Down Expand Up @@ -207,7 +206,7 @@ private function joinWithRelation($parent, $child)
}
}

public function select($columns, $option = NULL)
public function select($columns, $option = null)
{
$this->select = $columns;

Expand Down Expand Up @@ -385,5 +384,4 @@ private function addInverseRelation($relatedModel)
$inverseRelation = $relatedModel->getRelation($this->inverseOf);
$relatedModel->populateRelation($this->inverseOf, $inverseRelation->multiple ? [$this->primaryModel] : $this->primaryModel);
}

}
2 changes: 1 addition & 1 deletion src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
4 changes: 2 additions & 2 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down Expand Up @@ -195,7 +195,7 @@ public function updateFormName()
* }
* 3) foreach ($selection as $id) {
* $res[$id] = [reset($model->primaryKey()) => $id];
* }
* }.
* @param array|callable $data - the data to be proceeded.
* If is callable - gets arguments:
* - model
Expand Down
2 changes: 1 addition & 1 deletion src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
2 changes: 1 addition & 1 deletion src/ErrorResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand Down
4 changes: 2 additions & 2 deletions src/ProxyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;
Expand All @@ -18,7 +18,7 @@ abstract class ProxyRequest extends AbstractRequest
protected $worker;

/**
* @var string transport implementation to be specified in concrete implementation.
* @var string transport implementation to be specified in concrete implementation
*/
public $handlerClass;

Expand Down
9 changes: 3 additions & 6 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;

use Yii;
use yii\base\Component;
use yii\db\QueryInterface;
use yii\helpers\ArrayHelper;

/**
* Query represents API query in a way that is independent from a concrete API.
Expand All @@ -32,7 +29,7 @@
* - from: entity being queried, e.g. user
* - join: data how to join with other entities
* - other standard query options provided with QueryTrait:
* - where, limit, offset, orderBy, indexBy
* - where, limit, offset, orderBy, indexBy.
*/
class Query extends \yii\db\Query implements QueryInterface
{
Expand All @@ -52,7 +49,7 @@ class Query extends \yii\db\Query implements QueryInterface

public static function instantiate($action, $from, array $options = [])
{
$query = new static;
$query = new static();

return $query->action($action)->from($from)->options($options);
}
Expand Down
8 changes: 2 additions & 6 deletions src/QueryBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart;

use yii\base\InvalidParamException;
use yii\base\NotSupportedException;
use yii\helpers\ArrayHelper;

/**
* QueryBuilder interface.
*
Expand All @@ -31,7 +27,7 @@ public function buildHeaders(Query $query);

/**
* Builds transport protocol version.
* @param Query $query
* @param Query $query
* @return string
*/
public function buildProtocolVersion(Query $query);
Expand Down
2 changes: 1 addition & 1 deletion src/config/hisite.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

return [
Expand Down
8 changes: 8 additions & 0 deletions src/curl/Request.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* 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-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\curl;

Expand Down
8 changes: 8 additions & 0 deletions src/curl/Response.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* 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-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\curl;

Expand Down
3 changes: 1 addition & 2 deletions src/debug/DebugAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\debug;

use Yii;
use yii\base\NotSupportedException;
use yii\helpers\ArrayHelper;
use yii\web\HttpException;
use yii\web\Response;
Expand Down
4 changes: 2 additions & 2 deletions src/debug/DebugPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\debug;

use hiqdev\hiart\Command;
use Yii;
use yii\base\ViewContextInterface;
use yii\base\InvalidConfigException;
use yii\base\ViewContextInterface;
use yii\log\Logger;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/debug/Timing.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\debug;
Expand Down Expand Up @@ -119,7 +119,7 @@ public function getNewTabLink()

public function getFullUri()
{
return $this->getBaseUri() . '/'. $this->request->getUri();
return $this->getBaseUri() . '/' . $this->request->getUri();
}

public function getBaseUri()
Expand Down
8 changes: 8 additions & 0 deletions src/rest/Connection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* 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-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\rest;

Expand Down
9 changes: 8 additions & 1 deletion src/rest/QueryBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* 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-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\rest;

Expand Down Expand Up @@ -57,5 +65,4 @@ public function buildBody(Query $query)
{
return null;
}

}
2 changes: 1 addition & 1 deletion src/views/debug/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use yii\web\View;

$this->registerCss(<<<CSS
$this->registerCss(<<<'CSS'
.string { color: green; }
.number { color: darkorange; }
.boolean { color: blue; }
Expand Down
2 changes: 1 addition & 1 deletion tests/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://github.com/hiqdev/yii2-hiart
* @package yii2-hiart
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\hiart\tests;
Expand Down
Loading

0 comments on commit e6916d2

Please sign in to comment.