mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 17:52:25 +01:00
12 lines
215 B
PHP
12 lines
215 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'];
|
|
}
|
|
}
|