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
Hide 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
...
@@ -63,7 +63,7 @@ class PropertyDoc extends BaseDoc
$this
->
defaultValue
=
PrettyPrinter
::
getRepresentationOfValue
(
$reflector
->
getNode
()
->
default
);
$this
->
defaultValue
=
PrettyPrinter
::
getRepresentationOfValue
(
$reflector
->
getNode
()
->
default
);
}
}
foreach
(
$this
->
tags
as
$
i
=>
$
tag
)
{
foreach
(
$this
->
tags
as
$tag
)
{
if
(
$tag
instanceof
VarTag
)
{
if
(
$tag
instanceof
VarTag
)
{
$this
->
type
=
$tag
->
getType
();
$this
->
type
=
$tag
->
getType
();
$this
->
types
=
$tag
->
getTypes
();
$this
->
types
=
$tag
->
getTypes
();
...
...
extensions/authclient/AuthAction.php
View file @
4a201c7a
...
@@ -315,7 +315,7 @@ class AuthAction extends Action
...
@@ -315,7 +315,7 @@ class AuthAction extends Action
return
Yii
::
$app
->
getResponse
()
->
redirect
(
$url
);
return
Yii
::
$app
->
getResponse
()
->
redirect
(
$url
);
}
else
{
}
else
{
// Upgrade to access token.
// Upgrade to access token.
$
accessToken
=
$
client
->
fetchAccessToken
();
$client
->
fetchAccessToken
();
return
$this
->
authSuccess
(
$client
);
return
$this
->
authSuccess
(
$client
);
}
}
}
}
...
...
extensions/gii/generators/model/Generator.php
View file @
4a201c7a
...
@@ -252,7 +252,7 @@ class Generator extends \yii\gii\Generator
...
@@ -252,7 +252,7 @@ class Generator extends \yii\gii\Generator
try
{
try
{
$db
=
$this
->
getDbConnection
();
$db
=
$this
->
getDbConnection
();
$uniqueIndexes
=
$db
->
getSchema
()
->
findUniqueIndexes
(
$table
);
$uniqueIndexes
=
$db
->
getSchema
()
->
findUniqueIndexes
(
$table
);
foreach
(
$uniqueIndexes
as
$
indexName
=>
$
uniqueColumns
)
{
foreach
(
$uniqueIndexes
as
$uniqueColumns
)
{
// Avoid validating auto incrementable columns
// Avoid validating auto incrementable columns
if
(
!
$this
->
isUniqueColumnAutoIncrementable
(
$table
,
$uniqueColumns
))
{
if
(
!
$this
->
isUniqueColumnAutoIncrementable
(
$table
,
$uniqueColumns
))
{
$attributesCount
=
count
(
$uniqueColumns
);
$attributesCount
=
count
(
$uniqueColumns
);
...
...
extensions/redis/ActiveQuery.php
View file @
4a201c7a
...
@@ -288,7 +288,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
...
@@ -288,7 +288,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
if
(
count
(
$this
->
where
)
==
1
)
{
if
(
count
(
$this
->
where
)
==
1
)
{
$pks
=
(
array
)
reset
(
$this
->
where
);
$pks
=
(
array
)
reset
(
$this
->
where
);
}
else
{
}
else
{
foreach
(
$this
->
where
as
$
column
=>
$
values
)
{
foreach
(
$this
->
where
as
$values
)
{
if
(
is_array
(
$values
))
{
if
(
is_array
(
$values
))
{
// TODO support composite IN for composite PK
// TODO support composite IN for composite PK
throw
new
NotSupportedException
(
'Find by composite PK is not supported by redis ActiveRecord.'
);
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;
...
@@ -336,7 +336,7 @@ EOF;
}
}
$columnAlias
=
$this
->
addColumn
(
$column
,
$columns
);
$columnAlias
=
$this
->
addColumn
(
$column
,
$columns
);
$parts
=
[];
$parts
=
[];
foreach
(
$values
as
$
i
=>
$
value
)
{
foreach
(
$values
as
$value
)
{
if
(
is_array
(
$value
))
{
if
(
is_array
(
$value
))
{
$value
=
isset
(
$value
[
$column
])
?
$value
[
$column
]
:
null
;
$value
=
isset
(
$value
[
$column
])
?
$value
[
$column
]
:
null
;
}
}
...
...
tests/unit/extensions/elasticsearch/ActiveRecordTest.php
View file @
4a201c7a
...
@@ -379,7 +379,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
...
@@ -379,7 +379,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public
function
testFindAsArrayFields
()
public
function
testFindAsArrayFields
()
{
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
fields
([
'id'
,
'name'
])
->
all
();
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
fields
([
'id'
,
'name'
])
->
all
();
...
@@ -454,7 +453,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
...
@@ -454,7 +453,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public
function
testFindIndexByAsArrayFields
()
public
function
testFindIndexByAsArrayFields
()
{
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
indexBy
(
'name'
)
->
asArray
()
->
fields
(
'id'
,
'name'
)
->
all
();
$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
...
@@ -206,7 +206,6 @@ trait ActiveRecordTestTrait
public
function
testfindIndexByAsArray
()
public
function
testfindIndexByAsArray
()
{
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
indexBy
(
'name'
)
->
all
();
$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
...
@@ -13,7 +13,7 @@ class PostgreSQLConnectionTest extends ConnectionTest
public
function
testConnection
()
public
function
testConnection
()
{
{
$
connection
=
$
this
->
getConnection
(
true
);
$this
->
getConnection
(
true
);
}
}
public
function
testQuoteValue
()
public
function
testQuoteValue
()
...
...
tests/unit/framework/validators/CompareValidatorTest.php
View file @
4a201c7a
...
@@ -162,7 +162,7 @@ class CompareValidatorTest extends TestCase
...
@@ -162,7 +162,7 @@ class CompareValidatorTest extends TestCase
$this
->
assertTrue
(
strlen
(
$val
->
message
)
>
1
);
$this
->
assertTrue
(
strlen
(
$val
->
message
)
>
1
);
}
}
try
{
try
{
$val
=
new
CompareValidator
([
'operator'
=>
'<>'
]);
new
CompareValidator
([
'operator'
=>
'<>'
]);
}
catch
(
InvalidConfigException
$e
)
{
}
catch
(
InvalidConfigException
$e
)
{
return
;
return
;
}
}
...
...
tests/unit/framework/validators/ExistValidatorTest.php
View file @
4a201c7a
...
@@ -28,7 +28,7 @@ class ExistValidatorTest extends DatabaseTestCase
...
@@ -28,7 +28,7 @@ class ExistValidatorTest extends DatabaseTestCase
{
{
try
{
try
{
$val
=
new
ExistValidator
();
$val
=
new
ExistValidator
();
$
result
=
$
val
->
validate
(
'ref'
);
$val
->
validate
(
'ref'
);
$this
->
fail
(
'Exception should have been thrown at this time'
);
$this
->
fail
(
'Exception should have been thrown at this time'
);
}
catch
(
Exception
$e
)
{
}
catch
(
Exception
$e
)
{
$this
->
assertInstanceOf
(
'yii\base\InvalidConfigException'
,
$e
);
$this
->
assertInstanceOf
(
'yii\base\InvalidConfigException'
,
$e
);
...
...
tests/unit/framework/validators/FilterValidatorTest.php
View file @
4a201c7a
...
@@ -18,7 +18,7 @@ class FilterValidatorTest extends TestCase
...
@@ -18,7 +18,7 @@ class FilterValidatorTest extends TestCase
public
function
testAssureExceptionOnInit
()
public
function
testAssureExceptionOnInit
()
{
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$val
=
new
FilterValidator
();
new
FilterValidator
();
}
}
public
function
testValidateAttribute
()
public
function
testValidateAttribute
()
...
...
tests/unit/framework/validators/RangeValidatorTest.php
View file @
4a201c7a
...
@@ -18,7 +18,7 @@ class RangeValidatorTest extends TestCase
...
@@ -18,7 +18,7 @@ class RangeValidatorTest extends TestCase
public
function
testInitException
()
public
function
testInitException
()
{
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
,
'The "range" property must be set.'
);
$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
()
public
function
testAssureMessageSetOnInit
()
...
...
tests/unit/framework/web/CacheSessionTest.php
View file @
4a201c7a
...
@@ -31,6 +31,6 @@ class CacheSessionTest extends \yiiunit\TestCase
...
@@ -31,6 +31,6 @@ class CacheSessionTest extends \yiiunit\TestCase
public
function
testInvalidCache
()
public
function
testInvalidCache
()
{
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$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