| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 26 | public function __construct(ScraperEntity $scraper, $originalUrl, $originalData) |
|
| 21 | { |
||
| 22 | 26 | parent::__construct([]); |
|
| 23 | |||
| 24 | 26 | $this->scraper = $scraper; |
|
| 25 | 26 | $this->originalUrl = $originalUrl; |
|
| 26 | 26 | $this->originalData = $originalData; |
|
|
|
|||
| 27 | |||
| 28 | 26 | $this->setOriginalId(md5($originalUrl)); |
|
| 29 | 26 | } |
|
| 30 | |||
| 55 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: