refactor: [BaseConnection] change `@property-read` annotations to just `@property`
Description
I'm not sure what's the intention of putting these @property-read annotations. Please enlighten me. However, these means the properties are "readonly by annotation", hence they cannot be reassigned later on. But we reassign them in several places across the database connection so I think the intention does not meet the actual practice. Found this because intelephense is complaining of "Cannot modify readonly property ...".
Checklist:
- [x] Securely signed commits
- [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
- [ ] Unit testing, with >80% coverage
- [ ] User guide updated
- [x] Conforms to style guide
I think these magic properties cannot be written.
We cannot write like $db->DBDriver = 'SQLite3', but we can read $db->DBDriver.
So they should be @property-read.
The
@property-readand@property-writevariants MAY be used to indicate "magic" properties that can only be read or written. See https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/property.html
Okay, I took a look again. These are not magic properties. These are protected properties. But we allow reading their values thru BaseConnection::__get(), that's why we have the annotations.
If they are protected properties, they are not readonly. So the "Cannot modify readonly property ..." message is wrong.