Why not use strict return types?
tarlepp opened this issue · 4 comments
tarlepp commented
composer.json
shows that minimum PHP version is 7.1.x
- so why don't use strict types everywhere? eg. https://github.com/propelorm/Propel3/blob/master/src%2FPropel%2FCommon%2FTypes%2FSQL%2FBooleanType.php
<?php
declare(strict_types=1);
public function databaseToProperty($value, FieldMap $fieldMap): bool
public function propertyToDatabase($value, FieldMap $fieldMap): int
marcj commented
Because we decided to use php 7.1+ after the most code was written.
stevleibelt commented
So is strict return types a nice to have (something a contributer should to for newer code) or do you want to keep the code consistent by not using strict return types in general?
marcj commented
Actually, I would prefer strict :)
cristianoc72 commented