Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
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
sinan
mongo-php-library
Commits
c5a45f1c
Unverified
Commit
c5a45f1c
authored
Aug 07, 2019
by
Andreas Braun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPLIB-330: Apply manual fixes
parent
339492ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
156 additions
and
104 deletions
+156
-104
BadMethodCallException.php
src/Exception/BadMethodCallException.php
+3
-1
Exception.php
src/Exception/Exception.php
+3
-1
InvalidArgumentException.php
src/Exception/InvalidArgumentException.php
+3
-1
RuntimeException.php
src/Exception/RuntimeException.php
+3
-1
UnexpectedValueException.php
src/Exception/UnexpectedValueException.php
+3
-1
StreamWrapper.php
src/GridFS/StreamWrapper.php
+2
-0
Explainable.php
src/Operation/Explainable.php
+1
-1
MapReduce.php
src/Operation/MapReduce.php
+1
-1
DocumentationExamplesTest.php
tests/DocumentationExamplesTest.php
+133
-92
Context.php
tests/SpecTests/Context.php
+2
-2
ErrorExpectation.php
tests/SpecTests/ErrorExpectation.php
+1
-1
Operation.php
tests/SpecTests/Operation.php
+1
-2
No files found.
src/Exception/BadMethodCallException.php
View file @
c5a45f1c
...
@@ -17,7 +17,9 @@
...
@@ -17,7 +17,9 @@
namespace
MongoDB\Exception
;
namespace
MongoDB\Exception
;
class
BadMethodCallException
extends
\BadMethodCallException
implements
Exception
use
BadMethodCallException
as
BaseBadMethodCallException
;
class
BadMethodCallException
extends
BaseBadMethodCallException
implements
Exception
{
{
/**
/**
* Thrown when a mutable method is invoked on an immutable object.
* Thrown when a mutable method is invoked on an immutable object.
...
...
src/Exception/Exception.php
View file @
c5a45f1c
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
namespace
MongoDB\Exception
;
namespace
MongoDB\Exception
;
interface
Exception
extends
\MongoDB\Driver\Exception\Exception
use
MongoDB\Driver\Exception\Exception
as
DriverException
;
interface
Exception
extends
DriverException
{
{
}
}
src/Exception/InvalidArgumentException.php
View file @
c5a45f1c
...
@@ -17,7 +17,9 @@
...
@@ -17,7 +17,9 @@
namespace
MongoDB\Exception
;
namespace
MongoDB\Exception
;
class
InvalidArgumentException
extends
\MongoDB\Driver\Exception\InvalidArgumentException
implements
Exception
use
MongoDB\Driver\Exception\InvalidArgumentException
as
DriverInvalidArgumentException
;
class
InvalidArgumentException
extends
DriverInvalidArgumentException
implements
Exception
{
{
/**
/**
* Thrown when an argument or option has an invalid type.
* Thrown when an argument or option has an invalid type.
...
...
src/Exception/RuntimeException.php
View file @
c5a45f1c
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
namespace
MongoDB\Exception
;
namespace
MongoDB\Exception
;
class
RuntimeException
extends
\MongoDB\Driver\Exception\RuntimeException
implements
Exception
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
class
RuntimeException
extends
DriverRuntimeException
implements
Exception
{
{
}
}
src/Exception/UnexpectedValueException.php
View file @
c5a45f1c
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
namespace
MongoDB\Exception
;
namespace
MongoDB\Exception
;
class
UnexpectedValueException
extends
\MongoDB\Driver\Exception\UnexpectedValueException
implements
Exception
use
MongoDB\Driver\Exception\UnexpectedValueException
as
DriverUnexpectedValueException
;
class
UnexpectedValueException
extends
DriverUnexpectedValueException
implements
Exception
{
{
}
}
src/GridFS/StreamWrapper.php
View file @
c5a45f1c
...
@@ -242,6 +242,7 @@ class StreamWrapper
...
@@ -242,6 +242,7 @@ class StreamWrapper
private
function
getStatTemplate
()
private
function
getStatTemplate
()
{
{
return
[
return
[
// phpcs:disable Squiz.Arrays.ArrayDeclaration.IndexNoNewline
0
=>
0
,
'dev'
=>
0
,
0
=>
0
,
'dev'
=>
0
,
1
=>
0
,
'ino'
=>
0
,
1
=>
0
,
'ino'
=>
0
,
2
=>
0
,
'mode'
=>
0
,
2
=>
0
,
'mode'
=>
0
,
...
@@ -255,6 +256,7 @@ class StreamWrapper
...
@@ -255,6 +256,7 @@ class StreamWrapper
10
=>
0
,
'ctime'
=>
0
,
10
=>
0
,
'ctime'
=>
0
,
11
=>
-
1
,
'blksize'
=>
-
1
,
11
=>
-
1
,
'blksize'
=>
-
1
,
12
=>
-
1
,
'blocks'
=>
-
1
,
12
=>
-
1
,
'blocks'
=>
-
1
,
// phpcs:enable
];
];
}
}
...
...
src/Operation/Explainable.php
View file @
c5a45f1c
...
@@ -27,5 +27,5 @@ use MongoDB\Driver\Server;
...
@@ -27,5 +27,5 @@ use MongoDB\Driver\Server;
*/
*/
interface
Explainable
extends
Executable
interface
Explainable
extends
Executable
{
{
function
getCommandDocument
(
Server
$server
);
public
function
getCommandDocument
(
Server
$server
);
}
}
src/Operation/MapReduce.php
View file @
c5a45f1c
...
@@ -156,7 +156,7 @@ class MapReduce implements Executable
...
@@ -156,7 +156,7 @@ class MapReduce implements Executable
}
}
if
(
isset
(
$options
[
'finalize'
])
&&
!
$options
[
'finalize'
]
instanceof
JavascriptInterface
)
{
if
(
isset
(
$options
[
'finalize'
])
&&
!
$options
[
'finalize'
]
instanceof
JavascriptInterface
)
{
throw
InvalidArgumentException
::
invalidType
(
'"finalize" option'
,
$options
[
'finalize'
],
Javascript
::
class
);
throw
InvalidArgumentException
::
invalidType
(
'"finalize" option'
,
$options
[
'finalize'
],
Javascript
Interface
::
class
);
}
}
if
(
isset
(
$options
[
'jsMode'
])
&&
!
is_bool
(
$options
[
'jsMode'
]))
{
if
(
isset
(
$options
[
'jsMode'
])
&&
!
is_bool
(
$options
[
'jsMode'
]))
{
...
...
tests/DocumentationExamplesTest.php
View file @
c5a45f1c
This diff is collapsed.
Click to expand it.
tests/SpecTests/Context.php
View file @
c5a45f1c
...
@@ -85,7 +85,7 @@ final class Context
...
@@ -85,7 +85,7 @@ final class Context
// TODO: Remove this once retryWrites=true by default (see: PHPC-1324)
// TODO: Remove this once retryWrites=true by default (see: PHPC-1324)
$clientOptions
[
'retryWrites'
]
=
true
;
$clientOptions
[
'retryWrites'
]
=
true
;
if
(
isset
(
$test
->
outcome
->
collection
->
name
))
{
if
(
isset
(
$test
->
outcome
->
collection
->
name
))
{
$o
->
outcomeCollectionName
=
$test
->
outcome
->
collection
->
name
;
$o
->
outcomeCollectionName
=
$test
->
outcome
->
collection
->
name
;
}
}
...
@@ -175,7 +175,7 @@ final class Context
...
@@ -175,7 +175,7 @@ final class Context
$options
[
'readPreference'
]
=
new
ReadPreference
(
$readPreference
[
'mode'
]);
$options
[
'readPreference'
]
=
new
ReadPreference
(
$readPreference
[
'mode'
]);
}
}
if
(
isset
(
$options
[
'writeConcern'
])
&&
!
(
$options
[
'writeConcern'
]
instanceof
w
riteConcern
))
{
if
(
isset
(
$options
[
'writeConcern'
])
&&
!
(
$options
[
'writeConcern'
]
instanceof
W
riteConcern
))
{
$writeConcern
=
(
array
)
$options
[
'writeConcern'
];
$writeConcern
=
(
array
)
$options
[
'writeConcern'
];
$diff
=
array_diff_key
(
$writeConcern
,
[
'w'
=>
1
,
'wtimeout'
=>
1
,
'j'
=>
1
]);
$diff
=
array_diff_key
(
$writeConcern
,
[
'w'
=>
1
,
'wtimeout'
=>
1
,
'j'
=>
1
]);
...
...
tests/SpecTests/ErrorExpectation.php
View file @
c5a45f1c
...
@@ -139,7 +139,7 @@ final class ErrorExpectation
...
@@ -139,7 +139,7 @@ final class ErrorExpectation
$this
->
assertCodeName
(
$test
,
$actual
);
$this
->
assertCodeName
(
$test
,
$actual
);
}
}
if
(
!
empty
(
$this
->
excludedLabels
)
or
!
empty
(
$this
->
includedLabels
))
{
if
(
!
empty
(
$this
->
excludedLabels
)
||
!
empty
(
$this
->
includedLabels
))
{
$test
->
assertInstanceOf
(
RuntimeException
::
class
,
$actual
);
$test
->
assertInstanceOf
(
RuntimeException
::
class
,
$actual
);
foreach
(
$this
->
excludedLabels
as
$label
)
{
foreach
(
$this
->
excludedLabels
as
$label
)
{
...
...
tests/SpecTests/Operation.php
View file @
c5a45f1c
...
@@ -179,8 +179,7 @@ final class Operation
...
@@ -179,8 +179,7 @@ final class Operation
/**
/**
* Executes the operation with a given context.
* Executes the operation with a given context.
*
*
* @param FunctionalTestCase $test Test instance
* @param Context $context Execution context
* @param Context $context Execution context
* @return mixed
* @return mixed
* @throws LogicException if the operation is unsupported
* @throws LogicException if the operation is unsupported
*/
*/
...
...
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