[Pkg-owncloud-commits] [php-sabre-vobject] 25/341: Use `floatval` instead of a closure. #performance

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 59b317870cf000b1510810afdbcfb6c616e3295a
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Thu Nov 13 11:14:10 2014 +0100

    Use `floatval` instead of a closure. #performance
---
 lib/Property/Float.php | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lib/Property/Float.php b/lib/Property/Float.php
index e53f178..1bac896 100644
--- a/lib/Property/Float.php
+++ b/lib/Property/Float.php
@@ -81,14 +81,7 @@ class Float extends Property {
      */
     public function getJsonValue() {
 
-        $val = array_map(
-            function($item) {
-
-                return (float)$item;
-
-            },
-            $this->getParts()
-        );
+        $val = array_map('floatval', $this->getParts());
 
         // Special-casing the GEO property.
         //

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list