Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12290189
D3761.id9744.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3761.id9744.diff
View Options
diff --git a/workspaces/src/includes/collection/MongoDBCollectionIterator.php b/workspaces/src/includes/collection/MongoDBCollectionIterator.php
--- a/workspaces/src/includes/collection/MongoDBCollectionIterator.php
+++ b/workspaces/src/includes/collection/MongoDBCollectionIterator.php
@@ -33,9 +33,9 @@
* Initializes a new instance of the MongoDBCollectionIterator object
*
* @param MongoDBCollection $collection The collection to iterate
- * @param MongoCursor $cursor The cursor to the results [optional]
+ * @param ?MongoCursor $cursor The cursor to the results [optional]
*/
- public function __construct (MongoDBCollection $collection, MongoCursor $cursor = null) {
+ public function __construct (MongoDBCollection $collection, ?MongoCursor $cursor = null) {
$this->collection = $collection;
if ($cursor === null) {
$this->cursor = $collection->mongoCollection->find();
diff --git a/workspaces/src/includes/collection/MySQLCollection.php b/workspaces/src/includes/collection/MySQLCollection.php
--- a/workspaces/src/includes/collection/MySQLCollection.php
+++ b/workspaces/src/includes/collection/MySQLCollection.php
@@ -58,7 +58,7 @@
*
* @param string $id the collection identifiant
*/
- public function __construct ($id, MySQLDatabase $client = null, $table = '') {
+ public function __construct ($id, ?MySQLDatabase $client = null, $table = '') {
global $Config;
if ($client === null) {
diff --git a/workspaces/src/includes/database/Database.php b/workspaces/src/includes/database/Database.php
--- a/workspaces/src/includes/database/Database.php
+++ b/workspaces/src/includes/database/Database.php
@@ -29,10 +29,10 @@
/**
* Loads a new instance of the relevant Database object
*
- * @param Context $context The application context
+ * @param ?Context $context The application context
* @return Database The database instance
*/
- public static function load (Context $context = null) {
+ public static function load (?Context $context = null) {
if (self::$instance === null ) {
if (!isset($context->config['sql']['engine'])) {
throw new InvalidArgumentException("To load a database, you need to add in your configuration a parameter block like:
diff --git a/workspaces/src/includes/database/DatabaseException.php b/workspaces/src/includes/database/DatabaseException.php
--- a/workspaces/src/includes/database/DatabaseException.php
+++ b/workspaces/src/includes/database/DatabaseException.php
@@ -33,9 +33,9 @@
* @param string|null $query The query executed. Null if the exception occured outside a query.
* @param string $message The message to throw.
* @param int $code The code.
- * @param Exception $previous The previous exception used for the exception chaining.
+ * @param ?Exception $previous The previous exception used for the exception chaining.
*/
- public function __construct ($query = null, $message = '', $code = 0, Exception $previous = null) {
+ public function __construct ($query = null, $message = '', $code = 0, ?Exception $previous = null) {
$this->query = $query;
parent::__construct($message, $code, $previous);
}
diff --git a/workspaces/src/includes/i18n/Language.php b/workspaces/src/includes/i18n/Language.php
--- a/workspaces/src/includes/i18n/Language.php
+++ b/workspaces/src/includes/i18n/Language.php
@@ -57,10 +57,10 @@
/**
* Loads an instance of the class
*
- * @param Context $context The context
+ * @param ?Context $context The context
* @return Language An instance of the Language class
*/
- public static function Load (Context $context = null) {
+ public static function Load (?Context $context = null) {
if (static::$instance === null) {
//Initializes an instance
if ($context === null) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 20, 09:25 (17 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3089097
Default Alt Text
D3761.id9744.diff (3 KB)
Attached To
Mode
D3761: Mark explicitly nullable parameters
Attached
Detach File
Event Timeline
Log In to Comment