From 1d4d80293a10e979d9bb0836e97998d6542dc3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Plusquellec?= Date: Sat, 10 Jun 2017 19:19:11 +0200 Subject: [PATCH] diff --- lib/auth.php | 8 ++++---- lib/collection.php | 2 +- lib/lib.php | 2 +- lib/swift/classes/Swift/Mailer.php | 2 +- lib/swift/classes/Swift/Mime/SimpleMessage.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/auth.php b/lib/auth.php index f97783b..d832088 100644 --- a/lib/auth.php +++ b/lib/auth.php @@ -37,12 +37,12 @@ public static function make($user = null, $ns = 'web') public static function is($ns = 'web') { - 'octodummy' !== static::get('octodummy', $ns); + return 'octodummy' !== static::get('octodummy', $ns); } public static function guest($ns = 'web') { - 'octodummy' === static::get('octodummy', $ns); + return 'octodummy' === static::get('octodummy', $ns); } public static function login($user, $ns = 'web') @@ -78,7 +78,7 @@ public static function id($ns = 'web') public static function email($ns = 'web') { - $user = static::get(null, $ns);; + $user = static::get(null, $ns); if ($user) { return isAke($user, 'email', null); @@ -89,7 +89,7 @@ public static function email($ns = 'web') public static function user($model = true, $ns = 'web', $em = 'user') { - $user = static::get(null, $ns);; + $user = static::get(null, $ns); if ($user && $model) { return em($em)->find((int) $user['id']); diff --git a/lib/collection.php b/lib/collection.php index 6d9465d..6673936 100644 --- a/lib/collection.php +++ b/lib/collection.php @@ -157,7 +157,7 @@ public function except($keys) public function filter(callable $callback) { - return $this->new(array_filter($this->items, $callback)); + return new static(array_filter($this->items, $callback)); } public function whereLoose($key, $value) diff --git a/lib/lib.php b/lib/lib.php index 13617fe..0b82dd5 100755 --- a/lib/lib.php +++ b/lib/lib.php @@ -5226,7 +5226,7 @@ function createModel(Octalia $model, array $fields = []) } } - $model->create($row)->save(); + $model->store($row); $model->forget(); return true; diff --git a/lib/swift/classes/Swift/Mailer.php b/lib/swift/classes/Swift/Mailer.php index b6703de..1ee3f76 100644 --- a/lib/swift/classes/Swift/Mailer.php +++ b/lib/swift/classes/Swift/Mailer.php @@ -67,7 +67,7 @@ public function createMessage($service = 'message') * The return value is the number of recipients who were accepted for * delivery. * - * @param Swift_Mime_Message $message + * @param Swift_Mime_Message|Swift_Mime_Mimepart $message * @param array $failedRecipients An array of failures by-reference * * @return integer diff --git a/lib/swift/classes/Swift/Mime/SimpleMessage.php b/lib/swift/classes/Swift/Mime/SimpleMessage.php index 652f928..611827c 100644 --- a/lib/swift/classes/Swift/Mime/SimpleMessage.php +++ b/lib/swift/classes/Swift/Mime/SimpleMessage.php @@ -201,7 +201,7 @@ public function addFrom($address, $name = null) * If $name is passed and the first parameter is a string, this name will be * associated with the address. * - * @param string $addresses + * @param string|array $addresses * @param string $name optional * * @return Swift_Mime_SimpleMessage