Author: gimler
Date: 2010-02-08 16:07:08 +0100 (Mon, 08 Feb 2010)
New Revision: 27737

Modified:
   plugins/diemPlugin/trunk/dmCorePlugin/lib/basic/dmArray.php
   plugins/diemPlugin/trunk/dmCorePlugin/test/unit/dmArrayTest.php
Log:
[Diem] remove not used function dmArray::firstKey

Modified: plugins/diemPlugin/trunk/dmCorePlugin/lib/basic/dmArray.php
===================================================================
--- plugins/diemPlugin/trunk/dmCorePlugin/lib/basic/dmArray.php 2010-02-08 
14:50:13 UTC (rev 27736)
+++ plugins/diemPlugin/trunk/dmCorePlugin/lib/basic/dmArray.php 2010-02-08 
15:07:08 UTC (rev 27737)
@@ -111,28 +111,6 @@
   }
 
   /**
-   * get first key of an array
-   *
-   * @param array $array source array
-   *
-   * @return int|string the first key
-   */
-  public static function firstKey($array)
-  {
-    if(!is_array($array))
-    {
-      return $array;
-    }
-
-    if(empty($array))
-    {
-      return null;
-    }
-
-    return self::first(array_keys($array));
-  }
-
-  /**
    * get first n values of an array
    *
    * @param array $array source array
@@ -192,4 +170,4 @@
   {
     return implode(' ', array_unique(array_filter(array_map('trim', 
$classes))));
   }
-}
\ No newline at end of file
+}

Modified: plugins/diemPlugin/trunk/dmCorePlugin/test/unit/dmArrayTest.php
===================================================================
--- plugins/diemPlugin/trunk/dmCorePlugin/test/unit/dmArrayTest.php     
2010-02-08 14:50:13 UTC (rev 27736)
+++ plugins/diemPlugin/trunk/dmCorePlugin/test/unit/dmArrayTest.php     
2010-02-08 15:07:08 UTC (rev 27737)
@@ -29,35 +29,6 @@
 );
 
 
-$t->diag('firstKey');
-
-$t->is_deeply(
-  dmArray::firstKey('alpha'),
-  'alpha',
-  'first parameter is not an array'
-);
-
-$t->is_deeply(
-  dmArray::firstKey(array()),
-  null,
-  'empty source array'
-);
-
-$array = array(1 => 'alpha');
-$t->is_deeply(
-  dmArray::firstKey($array),
-  1,
-  'first value int'
-);
-
-$array = array('alpha' => 'beta');
-$t->is_deeply(
-  dmArray::firstKey($array),
-  'alpha',
-  'first value string'
-);
-
-
 $t->diag('firsts');
 
 $t->is_deeply(
@@ -188,4 +159,4 @@
   dmArray::valueToKey($array),
   array('alpha' => 'alpha', 'beta' => 'beta', 'gamma' => 'gamma', 'delta' => 
'delta'),
   'check'
-);
\ No newline at end of file
+);

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to