Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
625fe984
Commit
625fe984
authored
Jun 11, 2017
by
Bas de Nooijer
Committed by
GitHub
Jun 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #509 from localheinz/fix/default
Fix: Move assignment of default values before condition
parents
d25ae0d8
7685d2f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
library/Solarium/Core/Client/Adapter/Http.php
library/Solarium/Core/Client/Adapter/Http.php
+2
-2
library/Solarium/Core/Query/Helper.php
library/Solarium/Core/Query/Helper.php
+2
-2
library/Solarium/QueryType/Analysis/ResponseParser/Field.php
library/Solarium/QueryType/Analysis/ResponseParser/Field.php
+2
-2
library/Solarium/QueryType/Select/ResponseParser/ResponseParser.php
...larium/QueryType/Select/ResponseParser/ResponseParser.php
+4
-4
No files found.
library/Solarium/Core/Client/Adapter/Http.php
View file @
625fe984
...
@@ -183,10 +183,10 @@ class Http extends Configurable implements AdapterInterface
...
@@ -183,10 +183,10 @@ class Http extends Configurable implements AdapterInterface
// @codeCoverageIgnoreStart
// @codeCoverageIgnoreStart
$data
=
@
file_get_contents
(
$uri
,
false
,
$context
);
$data
=
@
file_get_contents
(
$uri
,
false
,
$context
);
$headers
=
array
();
if
(
isset
(
$http_response_header
))
{
if
(
isset
(
$http_response_header
))
{
$headers
=
$http_response_header
;
$headers
=
$http_response_header
;
}
else
{
$headers
=
array
();
}
}
return
array
(
$data
,
$headers
);
return
array
(
$data
,
$headers
);
...
...
library/Solarium/Core/Query/Helper.php
View file @
625fe984
...
@@ -460,10 +460,10 @@ class Helper
...
@@ -460,10 +460,10 @@ class Helper
*/
*/
public
function
cacheControl
(
$useCache
,
$cost
=
null
)
public
function
cacheControl
(
$useCache
,
$cost
=
null
)
{
{
$cache
=
'false'
;
if
(
$useCache
===
true
)
{
if
(
$useCache
===
true
)
{
$cache
=
'true'
;
$cache
=
'true'
;
}
else
{
$cache
=
'false'
;
}
}
$result
=
'{!cache='
.
$cache
;
$result
=
'{!cache='
.
$cache
;
...
...
library/Solarium/QueryType/Analysis/ResponseParser/Field.php
View file @
625fe984
...
@@ -64,10 +64,10 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
...
@@ -64,10 +64,10 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
{
{
$data
=
$result
->
getData
();
$data
=
$result
->
getData
();
$items
=
array
();
if
(
isset
(
$data
[
'analysis'
]))
{
if
(
isset
(
$data
[
'analysis'
]))
{
$items
=
$this
->
parseAnalysis
(
$result
,
$data
[
'analysis'
]);
$items
=
$this
->
parseAnalysis
(
$result
,
$data
[
'analysis'
]);
}
else
{
$items
=
array
();
}
}
return
$this
->
addHeaderInfo
(
$data
,
array
(
'items'
=>
$items
));
return
$this
->
addHeaderInfo
(
$data
,
array
(
'items'
=>
$items
));
...
...
library/Solarium/QueryType/Select/ResponseParser/ResponseParser.php
View file @
625fe984
...
@@ -95,16 +95,16 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
...
@@ -95,16 +95,16 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
}
}
}
}
$numFound
=
null
;
if
(
isset
(
$data
[
'response'
][
'numFound'
]))
{
if
(
isset
(
$data
[
'response'
][
'numFound'
]))
{
$numFound
=
$data
[
'response'
][
'numFound'
];
$numFound
=
$data
[
'response'
][
'numFound'
];
}
else
{
$numFound
=
null
;
}
}
$maxScore
=
null
;
if
(
isset
(
$data
[
'response'
][
'maxScore'
]))
{
if
(
isset
(
$data
[
'response'
][
'maxScore'
]))
{
$maxScore
=
$data
[
'response'
][
'maxScore'
];
$maxScore
=
$data
[
'response'
][
'maxScore'
];
}
else
{
$maxScore
=
null
;
}
}
return
$this
->
addHeaderInfo
(
return
$this
->
addHeaderInfo
(
...
...
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