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
afc78f7d
Commit
afc78f7d
authored
Jul 02, 2015
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exact null comparisons
parent
17c59842
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
15 additions
and
15 deletions
+15
-15
library/Solarium/Core/Client/Adapter/Zend2Http.php
library/Solarium/Core/Client/Adapter/Zend2Http.php
+1
-1
library/Solarium/Core/Client/Adapter/ZendHttp.php
library/Solarium/Core/Client/Adapter/ZendHttp.php
+1
-1
library/Solarium/Core/Client/Client.php
library/Solarium/Core/Client/Client.php
+2
-2
library/Solarium/Core/Client/Response.php
library/Solarium/Core/Client/Response.php
+1
-1
library/Solarium/Core/Query/Result/Result.php
library/Solarium/Core/Query/Result/Result.php
+1
-1
library/Solarium/Plugin/CustomizeRequest/Customization.php
library/Solarium/Plugin/CustomizeRequest/Customization.php
+1
-1
library/Solarium/Plugin/MinimumScoreFilter/QueryGroupResult.php
...y/Solarium/Plugin/MinimumScoreFilter/QueryGroupResult.php
+1
-1
library/Solarium/Plugin/ParallelExecution/ParallelExecution.php
...y/Solarium/Plugin/ParallelExecution/ParallelExecution.php
+1
-1
library/Solarium/Plugin/PrefetchIterator.php
library/Solarium/Plugin/PrefetchIterator.php
+2
-2
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
...olarium/QueryType/Select/Query/Component/MoreLikeThis.php
+2
-2
library/Solarium/QueryType/Update/Query/Document/Document.php
...ary/Solarium/QueryType/Update/Query/Document/Document.php
+2
-2
No files found.
library/Solarium/Core/Client/Adapter/Zend2Http.php
View file @
afc78f7d
...
@@ -140,7 +140,7 @@ class Zend2Http extends Configurable implements AdapterInterface
...
@@ -140,7 +140,7 @@ class Zend2Http extends Configurable implements AdapterInterface
*/
*/
public
function
getZendHttp
()
public
function
getZendHttp
()
{
{
if
(
null
==
$this
->
zendHttp
)
{
if
(
null
==
=
$this
->
zendHttp
)
{
$options
=
array
();
$options
=
array
();
// forward zendhttp options
// forward zendhttp options
...
...
library/Solarium/Core/Client/Adapter/ZendHttp.php
View file @
afc78f7d
...
@@ -142,7 +142,7 @@ class ZendHttp extends Configurable implements AdapterInterface
...
@@ -142,7 +142,7 @@ class ZendHttp extends Configurable implements AdapterInterface
*/
*/
public
function
getZendHttp
()
public
function
getZendHttp
()
{
{
if
(
null
==
$this
->
zendHttp
)
{
if
(
null
==
=
$this
->
zendHttp
)
{
$options
=
array
();
$options
=
array
();
// forward zendhttp options
// forward zendhttp options
...
...
library/Solarium/Core/Client/Client.php
View file @
afc78f7d
...
@@ -283,7 +283,7 @@ class Client extends Configurable
...
@@ -283,7 +283,7 @@ class Client extends Configurable
$this
->
endpoints
[
$key
]
=
$endpoint
;
$this
->
endpoints
[
$key
]
=
$endpoint
;
// if no default endpoint is set do so now
// if no default endpoint is set do so now
if
(
null
==
$this
->
defaultEndpoint
)
{
if
(
null
==
=
$this
->
defaultEndpoint
)
{
$this
->
defaultEndpoint
=
$key
;
$this
->
defaultEndpoint
=
$key
;
}
}
}
}
...
@@ -323,7 +323,7 @@ class Client extends Configurable
...
@@ -323,7 +323,7 @@ class Client extends Configurable
*/
*/
public
function
getEndpoint
(
$key
=
null
)
public
function
getEndpoint
(
$key
=
null
)
{
{
if
(
null
==
$key
)
{
if
(
null
==
=
$key
)
{
$key
=
$this
->
defaultEndpoint
;
$key
=
$this
->
defaultEndpoint
;
}
}
...
...
library/Solarium/Core/Client/Response.php
View file @
afc78f7d
...
@@ -149,7 +149,7 @@ class Response
...
@@ -149,7 +149,7 @@ class Response
}
}
}
}
if
(
null
==
$statusHeader
)
{
if
(
null
==
=
$statusHeader
)
{
throw
new
HttpException
(
"No HTTP status found"
);
throw
new
HttpException
(
"No HTTP status found"
);
}
}
...
...
library/Solarium/Core/Query/Result/Result.php
View file @
afc78f7d
...
@@ -145,7 +145,7 @@ class Result implements ResultInterface
...
@@ -145,7 +145,7 @@ class Result implements ResultInterface
*/
*/
public
function
getData
()
public
function
getData
()
{
{
if
(
null
==
$this
->
data
)
{
if
(
null
==
=
$this
->
data
)
{
switch
(
$this
->
query
->
getResponseWriter
())
{
switch
(
$this
->
query
->
getResponseWriter
())
{
case
AbstractQuery
::
WT_PHPS
:
case
AbstractQuery
::
WT_PHPS
:
$this
->
data
=
unserialize
(
$this
->
response
->
getBody
());
$this
->
data
=
unserialize
(
$this
->
response
->
getBody
());
...
...
library/Solarium/Plugin/CustomizeRequest/Customization.php
View file @
afc78f7d
...
@@ -227,7 +227,7 @@ class Customization extends Configurable
...
@@ -227,7 +227,7 @@ class Customization extends Configurable
return
false
;
return
false
;
}
}
if
(
null
==
$this
->
getKey
()
||
null
==
$this
->
getName
()
||
null
==
$this
->
getValue
())
{
if
(
null
==
=
$this
->
getKey
()
||
null
===
$this
->
getName
()
||
null
=
==
$this
->
getValue
())
{
return
false
;
return
false
;
}
}
...
...
library/Solarium/Plugin/MinimumScoreFilter/QueryGroupResult.php
View file @
afc78f7d
...
@@ -83,7 +83,7 @@ class QueryGroupResult extends StandardQueryGroupResult
...
@@ -83,7 +83,7 @@ class QueryGroupResult extends StandardQueryGroupResult
$this
->
filterRatio
=
$query
->
getFilterRatio
();
$this
->
filterRatio
=
$query
->
getFilterRatio
();
// Use the maximumScore of the first group as maximum for all groups
// Use the maximumScore of the first group as maximum for all groups
if
(
self
::
$overallMaximumScore
==
null
)
{
if
(
self
::
$overallMaximumScore
==
=
null
)
{
self
::
$overallMaximumScore
=
$maximumScore
;
self
::
$overallMaximumScore
=
$maximumScore
;
}
}
...
...
library/Solarium/Plugin/ParallelExecution/ParallelExecution.php
View file @
afc78f7d
...
@@ -92,7 +92,7 @@ class ParallelExecution extends AbstractPlugin
...
@@ -92,7 +92,7 @@ class ParallelExecution extends AbstractPlugin
$endpoint
=
$endpoint
->
getKey
();
$endpoint
=
$endpoint
->
getKey
();
}
}
if
(
$endpoint
==
null
)
{
if
(
$endpoint
==
=
null
)
{
$endpoint
=
$this
->
client
->
getEndpoint
()
->
getKey
();
$endpoint
=
$this
->
client
->
getEndpoint
()
->
getKey
();
}
}
...
...
library/Solarium/Plugin/PrefetchIterator.php
View file @
afc78f7d
...
@@ -179,7 +179,7 @@ class PrefetchIterator extends AbstractPlugin implements \Iterator, \Countable
...
@@ -179,7 +179,7 @@ class PrefetchIterator extends AbstractPlugin implements \Iterator, \Countable
public
function
count
()
public
function
count
()
{
{
// if no results are available yet, get them now
// if no results are available yet, get them now
if
(
null
==
$this
->
result
)
{
if
(
null
==
=
$this
->
result
)
{
$this
->
fetchNext
();
$this
->
fetchNext
();
}
}
...
@@ -239,7 +239,7 @@ class PrefetchIterator extends AbstractPlugin implements \Iterator, \Countable
...
@@ -239,7 +239,7 @@ class PrefetchIterator extends AbstractPlugin implements \Iterator, \Countable
$adjustedIndex
=
$this
->
position
%
$this
->
options
[
'prefetch'
];
$adjustedIndex
=
$this
->
position
%
$this
->
options
[
'prefetch'
];
// this condition prevent useless re-fetching of data if a count is done before the iterator is used
// this condition prevent useless re-fetching of data if a count is done before the iterator is used
if
(
$adjustedIndex
==
0
&&
(
$this
->
position
!==
0
||
null
==
$this
->
result
))
{
if
(
$adjustedIndex
==
=
0
&&
(
$this
->
position
!==
0
||
null
=
==
$this
->
result
))
{
$this
->
fetchNext
();
$this
->
fetchNext
();
}
}
...
...
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
View file @
afc78f7d
...
@@ -111,7 +111,7 @@ class MoreLikeThis extends AbstractComponent
...
@@ -111,7 +111,7 @@ class MoreLikeThis extends AbstractComponent
public
function
getFields
()
public
function
getFields
()
{
{
$fields
=
$this
->
getOption
(
'fields'
);
$fields
=
$this
->
getOption
(
'fields'
);
if
(
$fields
==
null
)
{
if
(
$fields
==
=
null
)
{
$fields
=
array
();
$fields
=
array
();
}
}
...
@@ -320,7 +320,7 @@ class MoreLikeThis extends AbstractComponent
...
@@ -320,7 +320,7 @@ class MoreLikeThis extends AbstractComponent
public
function
getQueryFields
()
public
function
getQueryFields
()
{
{
$queryfields
=
$this
->
getOption
(
'queryfields'
);
$queryfields
=
$this
->
getOption
(
'queryfields'
);
if
(
$queryfields
==
null
)
{
if
(
$queryfields
==
=
null
)
{
$queryfields
=
array
();
$queryfields
=
array
();
}
}
...
...
library/Solarium/QueryType/Update/Query/Document/Document.php
View file @
afc78f7d
...
@@ -225,7 +225,7 @@ class Document extends AbstractDocument implements DocumentInterface
...
@@ -225,7 +225,7 @@ class Document extends AbstractDocument implements DocumentInterface
*/
*/
public
function
setField
(
$key
,
$value
,
$boost
=
null
,
$modifier
=
null
)
public
function
setField
(
$key
,
$value
,
$boost
=
null
,
$modifier
=
null
)
{
{
if
(
$value
===
null
&&
$modifier
==
null
)
{
if
(
$value
===
null
&&
$modifier
==
=
null
)
{
$this
->
removeField
(
$key
);
$this
->
removeField
(
$key
);
}
else
{
}
else
{
if
(
$this
->
filterControlCharacters
&&
is_string
(
$value
))
{
if
(
$this
->
filterControlCharacters
&&
is_string
(
$value
))
{
...
@@ -435,7 +435,7 @@ class Document extends AbstractDocument implements DocumentInterface
...
@@ -435,7 +435,7 @@ class Document extends AbstractDocument implements DocumentInterface
*/
*/
public
function
getFields
()
public
function
getFields
()
{
{
if
(
count
(
$this
->
modifiers
)
>
0
&&
(
$this
->
key
==
null
||
!
isset
(
$this
->
fields
[
$this
->
key
])))
{
if
(
count
(
$this
->
modifiers
)
>
0
&&
(
$this
->
key
==
=
null
||
!
isset
(
$this
->
fields
[
$this
->
key
])))
{
throw
new
RuntimeException
(
throw
new
RuntimeException
(
'A document that uses modifiers (atomic updates) must have a key defined before it is used'
'A document that uses modifiers (atomic updates) must have a key defined before it is used'
);
);
...
...
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