Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
4a201c7a
Commit
4a201c7a
authored
Feb 07, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused variables
parent
dd26d39d
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
11 additions
and
14 deletions
+11
-14
PropertyDoc.php
extensions/apidoc/models/PropertyDoc.php
+1
-1
AuthAction.php
extensions/authclient/AuthAction.php
+1
-1
Generator.php
extensions/gii/generators/model/Generator.php
+1
-1
ActiveQuery.php
extensions/redis/ActiveQuery.php
+1
-1
LuaScriptBuilder.php
extensions/redis/LuaScriptBuilder.php
+1
-1
ActiveRecordTest.php
tests/unit/extensions/elasticsearch/ActiveRecordTest.php
+0
-2
ActiveRecordTestTrait.php
tests/unit/framework/ar/ActiveRecordTestTrait.php
+0
-1
PostgreSQLConnectionTest.php
tests/unit/framework/db/pgsql/PostgreSQLConnectionTest.php
+1
-1
CompareValidatorTest.php
tests/unit/framework/validators/CompareValidatorTest.php
+1
-1
ExistValidatorTest.php
tests/unit/framework/validators/ExistValidatorTest.php
+1
-1
FilterValidatorTest.php
tests/unit/framework/validators/FilterValidatorTest.php
+1
-1
RangeValidatorTest.php
tests/unit/framework/validators/RangeValidatorTest.php
+1
-1
CacheSessionTest.php
tests/unit/framework/web/CacheSessionTest.php
+1
-1
No files found.
extensions/apidoc/models/PropertyDoc.php
View file @
4a201c7a
...
...
@@ -63,7 +63,7 @@ class PropertyDoc extends BaseDoc
$this
->
defaultValue
=
PrettyPrinter
::
getRepresentationOfValue
(
$reflector
->
getNode
()
->
default
);
}
foreach
(
$this
->
tags
as
$
i
=>
$
tag
)
{
foreach
(
$this
->
tags
as
$tag
)
{
if
(
$tag
instanceof
VarTag
)
{
$this
->
type
=
$tag
->
getType
();
$this
->
types
=
$tag
->
getTypes
();
...
...
extensions/authclient/AuthAction.php
View file @
4a201c7a
...
...
@@ -315,7 +315,7 @@ class AuthAction extends Action
return
Yii
::
$app
->
getResponse
()
->
redirect
(
$url
);
}
else
{
// Upgrade to access token.
$
accessToken
=
$
client
->
fetchAccessToken
();
$client
->
fetchAccessToken
();
return
$this
->
authSuccess
(
$client
);
}
}
...
...
extensions/gii/generators/model/Generator.php
View file @
4a201c7a
...
...
@@ -252,7 +252,7 @@ class Generator extends \yii\gii\Generator
try
{
$db
=
$this
->
getDbConnection
();
$uniqueIndexes
=
$db
->
getSchema
()
->
findUniqueIndexes
(
$table
);
foreach
(
$uniqueIndexes
as
$
indexName
=>
$
uniqueColumns
)
{
foreach
(
$uniqueIndexes
as
$uniqueColumns
)
{
// Avoid validating auto incrementable columns
if
(
!
$this
->
isUniqueColumnAutoIncrementable
(
$table
,
$uniqueColumns
))
{
$attributesCount
=
count
(
$uniqueColumns
);
...
...
extensions/redis/ActiveQuery.php
View file @
4a201c7a
...
...
@@ -288,7 +288,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
if
(
count
(
$this
->
where
)
==
1
)
{
$pks
=
(
array
)
reset
(
$this
->
where
);
}
else
{
foreach
(
$this
->
where
as
$
column
=>
$
values
)
{
foreach
(
$this
->
where
as
$values
)
{
if
(
is_array
(
$values
))
{
// TODO support composite IN for composite PK
throw
new
NotSupportedException
(
'Find by composite PK is not supported by redis ActiveRecord.'
);
...
...
extensions/redis/LuaScriptBuilder.php
View file @
4a201c7a
...
...
@@ -336,7 +336,7 @@ EOF;
}
$columnAlias
=
$this
->
addColumn
(
$column
,
$columns
);
$parts
=
[];
foreach
(
$values
as
$
i
=>
$
value
)
{
foreach
(
$values
as
$value
)
{
if
(
is_array
(
$value
))
{
$value
=
isset
(
$value
[
$column
])
?
$value
[
$column
]
:
null
;
}
...
...
tests/unit/extensions/elasticsearch/ActiveRecordTest.php
View file @
4a201c7a
...
...
@@ -379,7 +379,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public
function
testFindAsArrayFields
()
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
fields
([
'id'
,
'name'
])
->
all
();
...
...
@@ -454,7 +453,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public
function
testFindIndexByAsArrayFields
()
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
indexBy
(
'name'
)
->
asArray
()
->
fields
(
'id'
,
'name'
)
->
all
();
...
...
tests/unit/framework/ar/ActiveRecordTestTrait.php
View file @
4a201c7a
...
...
@@ -206,7 +206,6 @@ trait ActiveRecordTestTrait
public
function
testfindIndexByAsArray
()
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
indexBy
(
'name'
)
->
all
();
...
...
tests/unit/framework/db/pgsql/PostgreSQLConnectionTest.php
View file @
4a201c7a
...
...
@@ -13,7 +13,7 @@ class PostgreSQLConnectionTest extends ConnectionTest
public
function
testConnection
()
{
$
connection
=
$
this
->
getConnection
(
true
);
$this
->
getConnection
(
true
);
}
public
function
testQuoteValue
()
...
...
tests/unit/framework/validators/CompareValidatorTest.php
View file @
4a201c7a
...
...
@@ -162,7 +162,7 @@ class CompareValidatorTest extends TestCase
$this
->
assertTrue
(
strlen
(
$val
->
message
)
>
1
);
}
try
{
$val
=
new
CompareValidator
([
'operator'
=>
'<>'
]);
new
CompareValidator
([
'operator'
=>
'<>'
]);
}
catch
(
InvalidConfigException
$e
)
{
return
;
}
...
...
tests/unit/framework/validators/ExistValidatorTest.php
View file @
4a201c7a
...
...
@@ -28,7 +28,7 @@ class ExistValidatorTest extends DatabaseTestCase
{
try
{
$val
=
new
ExistValidator
();
$
result
=
$
val
->
validate
(
'ref'
);
$val
->
validate
(
'ref'
);
$this
->
fail
(
'Exception should have been thrown at this time'
);
}
catch
(
Exception
$e
)
{
$this
->
assertInstanceOf
(
'yii\base\InvalidConfigException'
,
$e
);
...
...
tests/unit/framework/validators/FilterValidatorTest.php
View file @
4a201c7a
...
...
@@ -18,7 +18,7 @@ class FilterValidatorTest extends TestCase
public
function
testAssureExceptionOnInit
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$val
=
new
FilterValidator
();
new
FilterValidator
();
}
public
function
testValidateAttribute
()
...
...
tests/unit/framework/validators/RangeValidatorTest.php
View file @
4a201c7a
...
...
@@ -18,7 +18,7 @@ class RangeValidatorTest extends TestCase
public
function
testInitException
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
,
'The "range" property must be set.'
);
$val
=
new
RangeValidator
([
'range'
=>
'not an array'
]);
new
RangeValidator
([
'range'
=>
'not an array'
]);
}
public
function
testAssureMessageSetOnInit
()
...
...
tests/unit/framework/web/CacheSessionTest.php
View file @
4a201c7a
...
...
@@ -31,6 +31,6 @@ class CacheSessionTest extends \yiiunit\TestCase
public
function
testInvalidCache
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$session
=
new
CacheSession
([
'cache'
=>
'invalid'
]);
new
CacheSession
([
'cache'
=>
'invalid'
]);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment