refactor: inject AgeConstraintParserRegistry into TravelParser
This commit is contained in:
1 parent
a8d2852313
commit
a6ed60462d
3 files changed
+14
-25
No files matched your search
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\BusProNet\Traits;
|
||||
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
trait XmlParserTrait
|
||||
{
|
||||
protected function getStringOrNullValue(Crawler $node): ?string
|
||||
{
|
||||
return 0 < $node->count() ? $node->text() : null;
|
||||
}
|
||||
|
||||
protected function getIntOrNullValue(Crawler $node): ?int
|
||||
{
|
||||
return 0 < $node->count() ? (int) $node->text() : null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user