Skip to content

Commit d0a2c82

Browse files
committed
coding style: removed space after reference &
1 parent 19060ea commit d0a2c82

22 files changed

+50
-50
lines changed

src/Database/Drivers/MsSqlDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function formatLike($value, $pos)
7676
/**
7777
* Injects LIMIT/OFFSET to the SQL query.
7878
*/
79-
public function applyLimit(& $sql, $limit, $offset)
79+
public function applyLimit(&$sql, $limit, $offset)
8080
{
8181
if ($offset) {
8282
throw new Nette\NotSupportedException('Offset is not supported by this database.');

src/Database/Drivers/MySqlDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function formatLike($value, $pos)
123123
/**
124124
* Injects LIMIT/OFFSET to the SQL query.
125125
*/
126-
public function applyLimit(& $sql, $limit, $offset)
126+
public function applyLimit(&$sql, $limit, $offset)
127127
{
128128
if ($limit < 0 || $offset < 0) {
129129
throw new Nette\InvalidArgumentException('Negative offset or limit.');

src/Database/Drivers/OciDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function formatLike($value, $pos)
101101
/**
102102
* Injects LIMIT/OFFSET to the SQL query.
103103
*/
104-
public function applyLimit(& $sql, $limit, $offset)
104+
public function applyLimit(&$sql, $limit, $offset)
105105
{
106106
if ($limit < 0 || $offset < 0) {
107107
throw new Nette\InvalidArgumentException('Negative offset or limit.');

src/Database/Drivers/OdbcDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function formatLike($value, $pos)
7575
/**
7676
* Injects LIMIT/OFFSET to the SQL query.
7777
*/
78-
public function applyLimit(& $sql, $limit, $offset)
78+
public function applyLimit(&$sql, $limit, $offset)
7979
{
8080
if ($offset) {
8181
throw new Nette\NotSupportedException('Offset is not supported by this database.');

src/Database/Drivers/PgSqlDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function formatLike($value, $pos)
106106
/**
107107
* Injects LIMIT/OFFSET to the SQL query.
108108
*/
109-
public function applyLimit(& $sql, $limit, $offset)
109+
public function applyLimit(&$sql, $limit, $offset)
110110
{
111111
if ($limit < 0 || $offset < 0) {
112112
throw new Nette\InvalidArgumentException('Negative offset or limit.');

src/Database/Drivers/SqliteDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function formatLike($value, $pos)
112112
/**
113113
* Injects LIMIT/OFFSET to the SQL query.
114114
*/
115-
public function applyLimit(& $sql, $limit, $offset)
115+
public function applyLimit(&$sql, $limit, $offset)
116116
{
117117
if ($limit < 0 || $offset < 0) {
118118
throw new Nette\InvalidArgumentException('Negative offset or limit.');

src/Database/Drivers/SqlsrvDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function formatLike($value, $pos)
9292
/**
9393
* Injects LIMIT/OFFSET to the SQL query.
9494
*/
95-
public function applyLimit(& $sql, $limit, $offset)
95+
public function applyLimit(&$sql, $limit, $offset)
9696
{
9797
if ($limit < 0 || $offset < 0) {
9898
throw new Nette\InvalidArgumentException('Negative offset or limit.');

src/Database/ISupplementalDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function formatLike($value, $pos);
6666
* @param int|NULL
6767
* @return void
6868
*/
69-
function applyLimit(& $sql, $limit, $offset);
69+
function applyLimit(&$sql, $limit, $offset);
7070

7171
/**
7272
* Normalizes result row.

src/Database/Structure.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function loadStructure()
185185
}
186186

187187
if (isset($structure['hasMany'])) {
188-
foreach ($structure['hasMany'] as & $table) {
188+
foreach ($structure['hasMany'] as &$table) {
189189
uksort($table, function ($a, $b) {
190190
return strlen($a) - strlen($b);
191191
});
@@ -217,7 +217,7 @@ protected function analyzePrimaryKey(array $columns)
217217
}
218218

219219

220-
protected function analyzeForeignKeys(& $structure, $table)
220+
protected function analyzeForeignKeys(&$structure, $table)
221221
{
222222
$lowerTable = strtolower($table);
223223
foreach ($this->connection->getSupplementalDriver()->getForeignKeys($table) as $row) {

src/Database/Table/GroupedSelection.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function order($columns, ...$params)
8787

8888
public function aggregation($function)
8989
{
90-
$aggregation = & $this->getRefTable($refPath)->aggregation[$refPath . $function . $this->sqlBuilder->getSelectQueryHash($this->getPreviousAccessedColumns())];
90+
$aggregation = &$this->getRefTable($refPath)->aggregation[$refPath . $function . $this->sqlBuilder->getSelectQueryHash($this->getPreviousAccessedColumns())];
9191

9292
if ($aggregation === NULL) {
9393
$aggregation = [];
@@ -146,8 +146,8 @@ protected function execute()
146146
$offset = [];
147147
$this->accessColumn($this->column);
148148
foreach ((array) $this->rows as $key => $row) {
149-
$ref = & $data[$row[$this->column]];
150-
$skip = & $offset[$row[$this->column]];
149+
$ref = &$data[$row[$this->column]];
150+
$skip = &$offset[$row[$this->column]];
151151
if ($limit === NULL || $rows <= 1 || (count($ref) < $limit && $skip >= $this->sqlBuilder->getOffset())) {
152152
$ref[$key] = $row;
153153
} else {
@@ -158,7 +158,7 @@ protected function execute()
158158
}
159159

160160
$this->refCacheCurrent['data'] = $data;
161-
$this->data = & $this->refCacheCurrent['data'][$this->active];
161+
$this->data = &$this->refCacheCurrent['data'][$this->active];
162162
}
163163

164164
$this->observeCache = $this;
@@ -173,7 +173,7 @@ protected function execute()
173173
}
174174

175175

176-
protected function getRefTable(& $refPath)
176+
protected function getRefTable(&$refPath)
177177
{
178178
$refObj = $this->refTable;
179179
$refPath = $this->name . '.';
@@ -189,15 +189,15 @@ protected function getRefTable(& $refPath)
189189
protected function loadRefCache()
190190
{
191191
$hash = $this->getSpecificCacheKey();
192-
$referencing = & $this->refCache['referencing'][$this->getGeneralCacheKey()];
193-
$this->observeCache = & $referencing['observeCache'];
194-
$this->refCacheCurrent = & $referencing[$hash];
195-
$this->accessedColumns = & $referencing[$hash]['accessed'];
196-
$this->specificCacheKey = & $referencing[$hash]['specificCacheKey'];
197-
$this->rows = & $referencing[$hash]['rows'];
192+
$referencing = &$this->refCache['referencing'][$this->getGeneralCacheKey()];
193+
$this->observeCache = &$referencing['observeCache'];
194+
$this->refCacheCurrent = &$referencing[$hash];
195+
$this->accessedColumns = &$referencing[$hash]['accessed'];
196+
$this->specificCacheKey = &$referencing[$hash]['specificCacheKey'];
197+
$this->rows = &$referencing[$hash]['rows'];
198198

199199
if (isset($referencing[$hash]['data'][$this->active])) {
200-
$this->data = & $referencing[$hash]['data'][$this->active];
200+
$this->data = &$referencing[$hash]['data'][$this->active];
201201
}
202202
}
203203

0 commit comments

Comments
 (0)