| 1 | <?php |
||
| 16 | class MongoCode implements \Alcaeus\MongoDbAdapter\TypeInterface |
||
|
1 ignored issue
–
show
|
|||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $code; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | private $scope; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @link http://php.net/manual/en/mongocode.construct.php |
||
| 30 | * @param string $code A string of code |
||
| 31 | * @param array $scope The scope to use for the code |
||
| 32 | */ |
||
| 33 | public function __construct($code, array $scope = []) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Returns this code as a string |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function __toString() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Converts this MongoCode to the new BSON JavaScript type |
||
| 55 | * |
||
| 56 | * @return \MongoDB\BSON\Javascript |
||
| 57 | * @internal This method is not part of the ext-mongo API |
||
| 58 | */ |
||
| 59 | public function toBSONType() |
||
| 63 | } |
||
| 64 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.