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
71835d97
Commit
71835d97
authored
Mar 07, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More short syntax for arrays
parent
2c1bd7f2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
7 deletions
+8
-7
OpenId.php
extensions/authclient/OpenId.php
+1
-1
ActiveField.php
extensions/gii/components/ActiveField.php
+1
-1
ViewRendererStaticClassProxy.php
extensions/twig/ViewRendererStaticClassProxy.php
+2
-1
CustomerQuery.php
tests/unit/data/ar/elasticsearch/CustomerQuery.php
+1
-1
ElasticSearchTestCase.php
...s/unit/extensions/elasticsearch/ElasticSearchTestCase.php
+1
-1
FileHelperTest.php
tests/unit/framework/helpers/FileHelperTest.php
+2
-2
No files found.
extensions/authclient/OpenId.php
View file @
71835d97
...
...
@@ -239,7 +239,7 @@ class OpenId extends BaseClient implements ClientInterface
curl_setopt
(
$curl
,
CURLOPT_HEADER
,
false
);
curl_setopt
(
$curl
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$curl
,
CURLOPT_HTTPHEADER
,
array
(
'Accept: application/xrds+xml, */*'
)
);
curl_setopt
(
$curl
,
CURLOPT_HTTPHEADER
,
[
'Accept: application/xrds+xml, */*'
]
);
if
(
$this
->
verifyPeer
!==
null
)
{
curl_setopt
(
$curl
,
CURLOPT_SSL_VERIFYPEER
,
$this
->
verifyPeer
);
...
...
extensions/gii/components/ActiveField.php
View file @
71835d97
...
...
@@ -64,7 +64,7 @@ class ActiveField extends \yii\widgets\ActiveField
static
$counter
=
0
;
$this
->
inputOptions
[
'class'
]
.=
' typeahead-'
.
(
++
$counter
);
foreach
(
$data
as
&
$item
)
{
$item
=
array
(
'word'
=>
$item
)
;
$item
=
[
'word'
=>
$item
]
;
}
$this
->
form
->
getView
()
->
registerJs
(
"yii.gii.autocomplete(
$counter
, "
.
Json
::
encode
(
$data
)
.
");"
);
return
$this
;
...
...
extensions/twig/ViewRendererStaticClassProxy.php
View file @
71835d97
...
...
@@ -38,6 +38,6 @@ class ViewRendererStaticClassProxy
public
function
__call
(
$method
,
$arguments
)
{
return
call_user_func_array
(
array
(
$this
->
_staticClassName
,
$method
)
,
$arguments
);
return
call_user_func_array
(
[
$this
->
_staticClassName
,
$method
]
,
$arguments
);
}
}
\ No newline at end of file
tests/unit/data/ar/elasticsearch/CustomerQuery.php
View file @
71835d97
...
...
@@ -9,7 +9,7 @@ class CustomerQuery extends ActiveQuery
{
public
function
active
()
{
$this
->
andWhere
(
array
(
'status'
=>
1
)
);
$this
->
andWhere
(
[
'status'
=>
1
]
);
return
$this
;
}
}
tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php
View file @
71835d97
...
...
@@ -41,7 +41,7 @@ class ElasticSearchTestCase extends TestCase
public
function
getConnection
(
$reset
=
true
)
{
$databases
=
$this
->
getParam
(
'databases'
);
$params
=
isset
(
$databases
[
'elasticsearch'
])
?
$databases
[
'elasticsearch'
]
:
array
()
;
$params
=
isset
(
$databases
[
'elasticsearch'
])
?
$databases
[
'elasticsearch'
]
:
[]
;
$db
=
new
Connection
();
if
(
$reset
)
{
$db
->
open
();
...
...
tests/unit/framework/helpers/FileHelperTest.php
View file @
71835d97
...
...
@@ -254,12 +254,12 @@ class FileHelperTest extends TestCase
public
function
testFindFilesExclude
()
{
$basePath
=
$this
->
testFilePath
.
DIRECTORY_SEPARATOR
;
$dirs
=
array
(
''
,
'one'
,
'one'
.
DIRECTORY_SEPARATOR
.
'two'
,
'three'
)
;
$dirs
=
[
''
,
'one'
,
'one'
.
DIRECTORY_SEPARATOR
.
'two'
,
'three'
]
;
$files
=
array_fill_keys
(
array_map
(
function
(
$n
){
return
"a.
$n
"
;},
range
(
1
,
8
)),
'file contents'
);
$tree
=
$files
;
$root
=
$files
;
$flat
=
array
()
;
$flat
=
[]
;
foreach
(
$dirs
as
$dir
)
{
foreach
(
$files
as
$fileName
=>
$contents
)
{
$flat
[]
=
rtrim
(
$basePath
.
$dir
,
DIRECTORY_SEPARATOR
)
.
DIRECTORY_SEPARATOR
.
$fileName
;
...
...
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