Exemplo n.º 1
0
 /**
  * Sorts the given array by priority and then strips the priority information.
  *
  * @param  &array  $items  The array to sort.
  */
 protected static function sortExternalsByPriority(array &$items)
 {
     uasort($items, function ($a, $b) {
         return Number::intcmp($a['priority'], $b['priority']);
     });
     $items = array_map(function ($a) {
         return $a['attrs'];
     }, $items);
 }
Exemplo n.º 2
0
 /**
  * @dataProvider  intLtProvider
  */
 public function testIntCmpLT($a, $b)
 {
     $this->assertSame(-1, Number::intcmp($a, $b));
 }