mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-11 00:11:16 +02:00
14 lines
216 B
PHP
14 lines
216 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Behavioral\Strategy;
|
|
|
|
class IdComparator implements Comparator
|
|
{
|
|
public function compare($a, $b): int
|
|
{
|
|
return $a['id'] <=> $b['id'];
|
|
}
|
|
}
|