Deprecate singleOrFail() in favour of sole()

This commit is contained in:
2024-11-08 23:31:21 +11:00
parent f0f2d74a14
commit 72ad1307c5
18 changed files with 27 additions and 43 deletions

View File

@@ -160,7 +160,7 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
try {
$o->zone = Zone::where('zone_id',$o->fz)
->where('default',TRUE)
->singleOrFail();
->sole();
} catch (ModelNotFoundException $e) {
throw new InvalidPacketException(sprintf('%s:! We couldnt work out the packet zone, and there isnt a default for[%d]',self::LOGKEY,$o->fz));

View File

@@ -179,11 +179,11 @@ final class DNS extends BaseProtocol
switch ($labels->first()) {
case '_binkp':
$mailer = Mailer::where('name','BINKP')->singleOrFail();
$mailer = Mailer::where('name','BINKP')->sole();
break;
case '_ifcico':
$mailer = Mailer::where('name','EMSI')->singleOrFail();
$mailer = Mailer::where('name','EMSI')->sole();
break;
default: