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
43c97027
Commit
43c97027
authored
Sep 12, 2013
by
Dorian Villet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentations, spaces after namespaces, and a few if() fixes.
parent
a2a33ee8
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
71 additions
and
56 deletions
+71
-56
library/Solarium/Core/Client/Adapter/Curl.php
library/Solarium/Core/Client/Adapter/Curl.php
+7
-5
library/Solarium/Core/Client/Adapter/Http.php
library/Solarium/Core/Client/Adapter/Http.php
+7
-3
library/Solarium/Core/Client/Adapter/PeclHttp.php
library/Solarium/Core/Client/Adapter/PeclHttp.php
+5
-3
library/Solarium/Core/Client/Client.php
library/Solarium/Core/Client/Client.php
+2
-2
library/Solarium/Core/Event/Events.php
library/Solarium/Core/Event/Events.php
+0
-1
library/Solarium/Core/Event/PostCreateQuery.php
library/Solarium/Core/Event/PostCreateQuery.php
+1
-0
library/Solarium/Core/Event/PostExecuteRequest.php
library/Solarium/Core/Event/PostExecuteRequest.php
+2
-2
library/Solarium/QueryType/MoreLikeThis/Result.php
library/Solarium/QueryType/MoreLikeThis/Result.php
+4
-4
library/Solarium/QueryType/RealtimeGet/Query.php
library/Solarium/QueryType/RealtimeGet/Query.php
+3
-3
library/Solarium/QueryType/Select/Query/Component/Highlighting/Highlighting.php
...Type/Select/Query/Component/Highlighting/Highlighting.php
+1
-1
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
...olarium/QueryType/Select/Query/Component/MoreLikeThis.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Spellcheck.php
.../Solarium/QueryType/Select/Query/Component/Spellcheck.php
+3
-3
library/Solarium/QueryType/Select/Query/Component/Stats/Field.php
...Solarium/QueryType/Select/Query/Component/Stats/Field.php
+3
-3
library/Solarium/QueryType/Select/Query/Component/Stats/Stats.php
...Solarium/QueryType/Select/Query/Component/Stats/Stats.php
+3
-3
library/Solarium/QueryType/Select/Query/Query.php
library/Solarium/QueryType/Select/Query/Query.php
+3
-3
library/Solarium/QueryType/Select/RequestBuilder/Component/Spellcheck.php
.../QueryType/Select/RequestBuilder/Component/Spellcheck.php
+1
-1
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
.../QueryType/Select/ResponseParser/Component/Spellcheck.php
+2
-1
library/Solarium/QueryType/Update/Query/Command/Add.php
library/Solarium/QueryType/Update/Query/Command/Add.php
+1
-0
library/Solarium/QueryType/Update/Query/Command/Commit.php
library/Solarium/QueryType/Update/Query/Command/Commit.php
+1
-0
library/Solarium/QueryType/Update/Query/Command/Delete.php
library/Solarium/QueryType/Update/Query/Command/Delete.php
+1
-0
library/Solarium/QueryType/Update/Query/Command/Optimize.php
library/Solarium/QueryType/Update/Query/Command/Optimize.php
+1
-0
library/Solarium/QueryType/Update/Query/Document/Document.php
...ary/Solarium/QueryType/Update/Query/Document/Document.php
+1
-1
library/Solarium/QueryType/Update/Query/Query.php
library/Solarium/QueryType/Update/Query/Query.php
+16
-15
library/Solarium/QueryType/Update/RequestBuilder.php
library/Solarium/QueryType/Update/RequestBuilder.php
+2
-2
No files found.
library/Solarium/Core/Client/Adapter/Curl.php
View file @
43c97027
...
@@ -148,7 +148,7 @@ class Curl extends Configurable implements AdapterInterface
...
@@ -148,7 +148,7 @@ class Curl extends Configurable implements AdapterInterface
curl_setopt
(
$handler
,
CURLOPT_FOLLOWLOCATION
,
true
);
curl_setopt
(
$handler
,
CURLOPT_FOLLOWLOCATION
,
true
);
curl_setopt
(
$handler
,
CURLOPT_TIMEOUT
,
$options
[
'timeout'
]);
curl_setopt
(
$handler
,
CURLOPT_TIMEOUT
,
$options
[
'timeout'
]);
if
(
$proxy
=
$this
->
getOption
(
'proxy'
)
)
{
if
(
$proxy
=
$this
->
getOption
(
'proxy'
)
)
{
curl_setopt
(
$handler
,
CURLOPT_PROXY
,
$proxy
);
curl_setopt
(
$handler
,
CURLOPT_PROXY
,
$proxy
);
}
}
...
@@ -158,9 +158,11 @@ class Curl extends Configurable implements AdapterInterface
...
@@ -158,9 +158,11 @@ class Curl extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility
// Try endpoint authentication first, fallback to request for backwards compatibility
$authData
=
$endpoint
->
getAuthentication
();
$authData
=
$endpoint
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
{
$authData
=
$request
->
getAuthentication
();
}
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
curl_setopt
(
$handler
,
CURLOPT_HTTPAUTH
,
CURLAUTH_BASIC
);
curl_setopt
(
$handler
,
CURLOPT_HTTPAUTH
,
CURLAUTH_BASIC
);
}
}
...
...
library/Solarium/Core/Client/Adapter/Http.php
View file @
43c97027
...
@@ -129,10 +129,14 @@ class Http extends Configurable implements AdapterInterface
...
@@ -129,10 +129,14 @@ class Http extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility
// Try endpoint authentication first, fallback to request for backwards compatibility
$authData
=
$endpoint
->
getAuthentication
();
$authData
=
$endpoint
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
{
$authData
=
$request
->
getAuthentication
();
}
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
$request
->
addHeader
(
'Authorization: Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
));
$request
->
addHeader
(
'Authorization: Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
])
);
}
}
$headers
=
$request
->
getHeaders
();
$headers
=
$request
->
getHeaders
();
...
...
library/Solarium/Core/Client/Adapter/PeclHttp.php
View file @
43c97027
...
@@ -153,9 +153,11 @@ class PeclHttp extends Configurable implements AdapterInterface
...
@@ -153,9 +153,11 @@ class PeclHttp extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility
// Try endpoint authentication first, fallback to request for backwards compatibility
$authData
=
$endpoint
->
getAuthentication
();
$authData
=
$endpoint
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
{
$authData
=
$request
->
getAuthentication
();
}
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
$headers
[
'Authorization'
]
=
'Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
$headers
[
'Authorization'
]
=
'Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
}
}
...
...
library/Solarium/Core/Client/Client.php
View file @
43c97027
library/Solarium/Core/Event/Events.php
View file @
43c97027
...
@@ -138,5 +138,4 @@ class Events
...
@@ -138,5 +138,4 @@ class Events
* @var string
* @var string
*/
*/
const
POST_CREATE_QUERY
=
'solarium.core.postCreateQuery'
;
const
POST_CREATE_QUERY
=
'solarium.core.postCreateQuery'
;
}
}
library/Solarium/Core/Event/PostCreateQuery.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\Core\Event
;
namespace
Solarium\Core\Event
;
use
Symfony\Component\EventDispatcher\Event
;
use
Symfony\Component\EventDispatcher\Event
;
use
Solarium\Core\Query\QueryInterface
;
use
Solarium\Core\Query\QueryInterface
;
...
...
library/Solarium/Core/Event/PostExecuteRequest.php
View file @
43c97027
library/Solarium/QueryType/MoreLikeThis/Result.php
View file @
43c97027
library/Solarium/QueryType/RealtimeGet/Query.php
View file @
43c97027
library/Solarium/QueryType/Select/Query/Component/Highlighting/Highlighting.php
View file @
43c97027
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component
;
namespace
Solarium\QueryType\Select\Query\Component
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\RequestBuilder\Component\MoreLikeThis
as
RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\Component\MoreLikeThis
as
RequestBuilder
;
use
Solarium\QueryType\Select\ResponseParser\Component\MoreLikeThis
as
ResponseParser
;
use
Solarium\QueryType\Select\ResponseParser\Component\MoreLikeThis
as
ResponseParser
;
...
...
library/Solarium/QueryType/Select/Query/Component/Spellcheck.php
View file @
43c97027
library/Solarium/QueryType/Select/Query/Component/Stats/Field.php
View file @
43c97027
library/Solarium/QueryType/Select/Query/Component/Stats/Stats.php
View file @
43c97027
library/Solarium/QueryType/Select/Query/Query.php
View file @
43c97027
library/Solarium/QueryType/Select/RequestBuilder/Component/Spellcheck.php
View file @
43c97027
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Component\Spellcheck
as
SpellcheckComponent
;
use
Solarium\QueryType\Select\Query\Component\Spellcheck
as
SpellcheckComponent
;
use
Solarium\QueryType\Select\Result\Spellcheck
as
SpellcheckResult
;
use
Solarium\QueryType\Select\Result\Spellcheck
as
SpellcheckResult
;
...
@@ -119,7 +120,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -119,7 +120,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
}
else
{
}
else
{
if
(
$queryObject
->
getResponseWriter
()
==
$queryObject
::
WT_JSON
)
{
if
(
$queryObject
->
getResponseWriter
()
==
$queryObject
::
WT_JSON
)
{
if
(
is_array
(
current
(
$values
))){
if
(
is_array
(
current
(
$values
)))
{
foreach
(
$values
as
$key
=>
$value
)
{
foreach
(
$values
as
$key
=>
$value
)
{
$values
[
$key
]
=
$this
->
convertToKeyValueArray
(
$value
);
$values
[
$key
]
=
$this
->
convertToKeyValueArray
(
$value
);
}
}
...
...
library/Solarium/QueryType/Update/Query/Command/Add.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Update\Query\Command
;
namespace
Solarium\QueryType\Update\Query\Command
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Update\Query\Document\DocumentInterface
;
use
Solarium\QueryType\Update\Query\Document\DocumentInterface
;
use
Solarium\Exception\RuntimeException
;
use
Solarium\Exception\RuntimeException
;
...
...
library/Solarium/QueryType/Update/Query/Command/Commit.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Update\Query\Command
;
namespace
Solarium\QueryType\Update\Query\Command
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
/**
/**
...
...
library/Solarium/QueryType/Update/Query/Command/Delete.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Update\Query\Command
;
namespace
Solarium\QueryType\Update\Query\Command
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
/**
/**
...
...
library/Solarium/QueryType/Update/Query/Command/Optimize.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Update\Query\Command
;
namespace
Solarium\QueryType\Update\Query\Command
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
/**
/**
...
...
library/Solarium/QueryType/Update/Query/Document/Document.php
View file @
43c97027
...
@@ -369,7 +369,7 @@ class Document extends AbstractDocument implements DocumentInterface
...
@@ -369,7 +369,7 @@ class Document extends AbstractDocument implements DocumentInterface
*/
*/
public
function
setFieldModifier
(
$key
,
$modifier
=
null
)
public
function
setFieldModifier
(
$key
,
$modifier
=
null
)
{
{
if
(
!
in_array
(
$modifier
,
array
(
self
::
MODIFIER_ADD
,
self
::
MODIFIER_INC
,
self
::
MODIFIER_SET
))
)
{
if
(
!
in_array
(
$modifier
,
array
(
self
::
MODIFIER_ADD
,
self
::
MODIFIER_INC
,
self
::
MODIFIER_SET
))
)
{
throw
new
RuntimeException
(
'Attempt to set an atomic update modifier that is not supported'
);
throw
new
RuntimeException
(
'Attempt to set an atomic update modifier that is not supported'
);
}
}
$this
->
modifiers
[
$key
]
=
$modifier
;
$this
->
modifiers
[
$key
]
=
$modifier
;
...
...
library/Solarium/QueryType/Update/Query/Query.php
View file @
43c97027
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Update\Query
;
namespace
Solarium\QueryType\Update\Query
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\QueryType\Update\RequestBuilder
;
use
Solarium\QueryType\Update\RequestBuilder
;
...
...
library/Solarium/QueryType/Update/RequestBuilder.php
View file @
43c97027
...
@@ -169,7 +169,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -169,7 +169,7 @@ class RequestBuilder extends BaseRequestBuilder
$xml
=
'<field name="'
.
$name
.
'"'
;
$xml
=
'<field name="'
.
$name
.
'"'
;
$xml
.=
$this
->
attrib
(
'boost'
,
$boost
);
$xml
.=
$this
->
attrib
(
'boost'
,
$boost
);
$xml
.=
$this
->
attrib
(
'update'
,
$modifier
);
$xml
.=
$this
->
attrib
(
'update'
,
$modifier
);
if
(
$value
===
null
){
if
(
$value
===
null
)
{
$xml
.=
$this
->
attrib
(
'null'
,
'true'
);
$xml
.=
$this
->
attrib
(
'null'
,
'true'
);
}
}
$xml
.=
'>'
.
htmlspecialchars
(
$value
,
ENT_NOQUOTES
,
'UTF-8'
);
$xml
.=
'>'
.
htmlspecialchars
(
$value
,
ENT_NOQUOTES
,
'UTF-8'
);
...
@@ -226,7 +226,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -226,7 +226,7 @@ class RequestBuilder extends BaseRequestBuilder
$xml
=
'<commit'
;
$xml
=
'<commit'
;
$xml
.=
$this
->
boolAttrib
(
'softCommit'
,
$command
->
getSoftCommit
());
$xml
.=
$this
->
boolAttrib
(
'softCommit'
,
$command
->
getSoftCommit
());
$xml
.=
$this
->
boolAttrib
(
'waitSearcher'
,
$command
->
getWaitSearcher
());
$xml
.=
$this
->
boolAttrib
(
'waitSearcher'
,
$command
->
getWaitSearcher
());
$xml
.=
$this
->
boolAttrib
(
'expungeDeletes'
,
$command
->
getExpungeDeletes
());
$xml
.=
$this
->
boolAttrib
(
'expungeDeletes'
,
$command
->
getExpungeDeletes
());
$xml
.=
'/>'
;
$xml
.=
'/>'
;
return
$xml
;
return
$xml
;
...
...
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