| 1 | <?php |
||
| 7 | abstract class Task |
||
| 8 | { |
||
| 9 | /** @string */ |
||
| 10 | protected $definition; |
||
| 11 | |||
| 12 | public function __construct(string $definition) |
||
| 16 | |||
| 17 | public static function fromCrawler(Crawler $crawler): self |
||
| 24 | |||
| 25 | protected function getText(Crawler $node, string $selector = null): string |
||
| 37 | |||
| 38 | protected function getAttribute(Crawler $node, string $attribute): string |
||
| 46 | } |
||
| 47 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: