-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix: Remove unused parameter and class property #6914
Fix: Remove unused parameter and class property #6914
Conversation
@@ -54,8 +54,6 @@ public function __construct($connection, Statement $statementPrototype = null, R | |||
$connection = new Connection($connection); | |||
} | |||
|
|||
$options = array_intersect_key(array_merge($this->options, $options), $this->options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking it's supposed to be
$this->options = array_intersect_key(array_merge($this->options, $options), $this->options);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall I update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
d53b936
to
4009c06
Compare
@@ -54,7 +54,7 @@ public function __construct($connection, Statement $statementPrototype = null, R | |||
$connection = new Connection($connection); | |||
} | |||
|
|||
$options = array_intersect_key(array_merge($this->options, $options), $this->options); | |||
$this->options = array_intersect_key(array_merge($this->options, $options), $this->options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks like it's fixing something. What was broken before this change, @macnibblet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reviewing the code closely my recommendation would be to remove $options
from the constructor and $this->options
from the class since they are not actually used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since injecting $options
hasn't had any effect: 👍
4009c06
to
8a44be4
Compare
8a44be4
to
561f927
Compare
|
||
); | ||
|
||
/** | ||
* @param array|Connection|\oci8 $connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change oci8
to Oci8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's what it should be, this needs a fix in more than one file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No nevermind, that was a misstake.
Injecting
$options
has no effect and class property$options
is never used.