Skip to content

Commit

Permalink
#16477 - Mass rename parameters to match ParamNameMismatch Psalm rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Dec 23, 2023
1 parent 6af02d5 commit 647e491
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 26 deletions.
4 changes: 2 additions & 2 deletions phalcon/Di/Di.zep
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ class Di implements DiInterface
* $di["request"] = new \Phalcon\Http\Request();
*```
*/
public function offsetSet(mixed name, mixed definition) -> void
public function offsetSet(mixed offset, mixed value) -> void
{
this->setShared(name, definition);
this->setShared(offset, value);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions phalcon/Messages/Messages.zep
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ class Messages implements ArrayAccess, Countable, Iterator, JsonSerializable
*
* @param \Phalcon\Messages\Message message
*/
public function offsetSet(mixed index, mixed message) -> void
public function offsetSet(mixed offset, mixed value) -> void
{
if typeof message != "object" {
if typeof value !== "object" {
throw new Exception("The message must be an object");
}

let this->messages[index] = message;
let this->messages[offset] = value;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Mvc/Model/Resultset.zep
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,10 @@ abstract class Resultset
/**
* Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface
*
* @param int index
* @param int offset
* @param \Phalcon\Mvc\ModelInterface value
*/
public function offsetSet(var index, var value) -> void
public function offsetSet(var offset, var value) -> void
{
throw new Exception("Cursor is an immutable ArrayAccess object");
}
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Mvc/Model/Row.zep
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class Row extends \stdClass implements EntityInterface, ResultInterface, ArrayAc
/**
* Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface
*
* @param string|int index
* @param string|int offsetSet
* @param ModelInterface value
*/
public function offsetSet(mixed index, mixed value) -> void
public function offsetSet(mixed offset, mixed value) -> void
{
throw new Exception("Row is an immutable ArrayAccess object");
}
Expand Down
6 changes: 3 additions & 3 deletions phalcon/Session/Adapter/AbstractAdapter.zep
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ abstract class AbstractAdapter implements SessionHandlerInterface
/**
* Open
*/
public function open(var savePath, var sessionName) -> bool
public function open(var path, var name) -> bool
{
return true;
}

/**
* Write
*/
public function write(var sessionId, var data) -> bool
public function write(var id, var data) -> bool
{
return this->adapter->set(sessionId, data);
return this->adapter->set(id, data);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Session/Adapter/Noop.zep
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ class Noop implements SessionHandlerInterface
/**
* Open
*/
public function open(var savePath, var sessionName) -> bool
public function open(var path, var name) -> bool
{
return true;
}

/**
* Write
*/
public function write(var sessionId, var data) -> bool
public function write(var id, var data) -> bool
{
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions phalcon/Session/Adapter/Stream.zep
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Stream extends Noop
*
* @return bool
*/
public function open(var savePath, var sessionName) -> bool
public function open(var path, var name) -> bool
{
return true;
}
Expand Down Expand Up @@ -148,11 +148,11 @@ class Stream extends Noop
return data;
}

public function write(var sessionId, var data) -> bool
public function write(var id, var data) -> bool
{
var name;

let name = this->path . this->getPrefixedName(sessionId);
let name = this->path . this->getPrefixedName(id);

return false !== this->phpFilePutContents(name, data, LOCK_EX);
}
Expand Down
6 changes: 3 additions & 3 deletions phalcon/Support/Collection.zep
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ class Collection implements
* Offset to set
* See [offsetSet](https://php.net/manual/en/arrayaccess.offsetset.php)
*/
public function offsetSet(mixed element, mixed value) -> void
public function offsetSet(mixed offset, mixed value) -> void
{
let element = (string) element;
let offset = (string) offset;

this->set(element, value);
this->set(offset, value);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Support/Registry.zep
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ final class Registry extends Collection
*
* @link https://php.net/manual/en/arrayaccess.offsetset.php
*/
final public function offsetSet(var element, var value) -> void
final public function offsetSet(var offset, var value) -> void
{
parent::set(element, value);
parent::set(offset, value);
}

/**
Expand Down
4 changes: 0 additions & 4 deletions phalcon/Translate/Adapter/Csv.zep
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ use Phalcon\Translate\Exception;
use Phalcon\Translate\InterpolatorFactory;

/**
* Class Csv
*
* @package Phalcon\Translate\Adapter
*
* @property array $translate
*/
class Csv extends AbstractAdapter implements ArrayAccess
Expand Down

0 comments on commit 647e491

Please sign in to comment.