-
-
Notifications
You must be signed in to change notification settings - Fork 452
rector: AddParamBasedOnParentClassMethodRector
#5040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sreichel
wants to merge
2
commits into
OpenMage:main
Choose a base branch
from
sreichel:rector/php80/AddParamBasedOnParentClassMethodRector
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,8 +33,8 @@ class Varien_Directory_Collection extends Varien_Data_Collection implements IFac | |||||||||||||
| * Constructor | ||||||||||||||
| * | ||||||||||||||
| * @param string $path - path to directory | ||||||||||||||
| * @param bool $is_recursion - use or not recursion | ||||||||||||||
| * @return none | ||||||||||||||
| * @param bool $isRecursion - use or not recursion | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function __construct($path, $isRecursion = true, $recursionLevel = 0) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -92,7 +92,8 @@ public function getPath() | |||||||||||||
| * Set path to this directory | ||||||||||||||
| * @param string $path - path to this directory | ||||||||||||||
| * @param bool $isRecursion - use or not recursion | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| * @throws Exception | ||||||||||||||
| */ | ||||||||||||||
| public function setPath($path, $isRecursion = '') | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -116,7 +117,7 @@ public function setPath($path, $isRecursion = '') | |||||||||||||
| * Set recursion | ||||||||||||||
| * | ||||||||||||||
| * @param bool $isRecursion - use or not recursion | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function setRecursion($isRecursion) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -127,7 +128,7 @@ public function setRecursion($isRecursion) | |||||||||||||
| * Set level of recursion | ||||||||||||||
| * | ||||||||||||||
| * @param int $recursionLevel - level of recursion | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function setRecursionLevel($recursionLevel) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -137,7 +138,6 @@ public function setRecursionLevel($recursionLevel) | |||||||||||||
| /** | ||||||||||||||
| * get latest dir in the path | ||||||||||||||
| * | ||||||||||||||
| * @param string $path - path to directory | ||||||||||||||
| * @return string - latest dir in the path | ||||||||||||||
| */ | ||||||||||||||
| public function lastDir() | ||||||||||||||
|
|
@@ -161,7 +161,7 @@ public static function getLastDir($path) | |||||||||||||
| * add item to collection | ||||||||||||||
| * | ||||||||||||||
| * @param IFactory $item - item of collection | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function addItem(IFactory $item) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -171,7 +171,7 @@ public function addItem(IFactory $item) | |||||||||||||
| /** | ||||||||||||||
| * parse this directory | ||||||||||||||
| * | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| protected function parseDir() | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -191,7 +191,7 @@ protected function parseDir() | |||||||||||||
| * set filter using | ||||||||||||||
| * | ||||||||||||||
| * @param bool $useFilter - filter using | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function useFilter($useFilter) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -215,7 +215,7 @@ public function filesName() | |||||||||||||
| * get files names of current collection | ||||||||||||||
| * | ||||||||||||||
| * @param array $files - array of files names | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function getFilesName(&$files) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -237,8 +237,8 @@ public function filesPaths() | |||||||||||||
| /** | ||||||||||||||
| * get files paths of current collection | ||||||||||||||
| * | ||||||||||||||
| * @param array $files - array of files paths | ||||||||||||||
| * @return none | ||||||||||||||
| * @param array &$paths - array of files paths | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function getFilesPaths(&$paths) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -261,7 +261,7 @@ public function filesObj() | |||||||||||||
| * get SplFileObject objects of files of current collection | ||||||||||||||
| * | ||||||||||||||
| * @param array $objs - array of SplFileObject objects | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function getFilesObj(&$objs) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -284,7 +284,7 @@ public function dirsName() | |||||||||||||
| * get names of dirs of current collection | ||||||||||||||
| * | ||||||||||||||
| * @param array $dirs - array of names of dirs | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function getDirsName(&$dirs) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -298,7 +298,7 @@ public function getDirsName(&$dirs) | |||||||||||||
| * set filters for files | ||||||||||||||
| * | ||||||||||||||
| * @param array $filter - array of filters | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| protected function setFilesFilter($filter) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -320,7 +320,7 @@ public function __toArray() | |||||||||||||
| /** | ||||||||||||||
| * display this collection as array | ||||||||||||||
| * @param array &$arr - this collection array | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function toArray(&$arr) | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -336,7 +336,7 @@ public function toArray(&$arr) | |||||||||||||
| * get this collection as xml | ||||||||||||||
| * @param bool $addOpenTag - add or not header of xml | ||||||||||||||
| * @param string $rootName - root element name | ||||||||||||||
| * @return none | ||||||||||||||
| * @return string | ||||||||||||||
| */ | ||||||||||||||
| public function __toXml($addOpenTag = true, $rootName = 'Struct') | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -350,9 +350,9 @@ public function __toXml($addOpenTag = true, $rootName = 'Struct') | |||||||||||||
| * @param string &$xml - xml | ||||||||||||||
| * @param bool $addOpenTag - add or not header of xml | ||||||||||||||
| * @param string $rootName - root element name | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| public function toXml(&$xml, $recursionLevel = 0, $addOpenTag = true, $rootName = 'Struct') | ||||||||||||||
| public function toXml(&$xml = null, $recursionLevel = 0, $addOpenTag = true, $rootName = 'Struct') | ||||||||||||||
| { | ||||||||||||||
| if ($recursionLevel == 0) { | ||||||||||||||
| $xml = ''; | ||||||||||||||
|
|
@@ -374,7 +374,7 @@ public function toXml(&$xml, $recursionLevel = 0, $addOpenTag = true, $rootName | |||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * apply filters | ||||||||||||||
| * @return none | ||||||||||||||
| * @return void | ||||||||||||||
| */ | ||||||||||||||
| protected function _renderFilters() | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -440,44 +440,17 @@ protected function _renderFilters() | |||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * add filter | ||||||||||||||
|
||||||||||||||
| * add filter | |
| * Add a filter to the collection. | |
| * | |
| * @param string $field The field to filter on. | |
| * @param mixed $value The value to filter by. | |
| * @param string $type Logical operator for the filter ('and' or 'or'). Default is 'and'. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
&$xmlparameter should not have a default value ofnullwhen passed by reference. The method initializes$xml = ''at line 358 when$recursionLevel == 0, but the reference parameter with a null default could cause issues when the method is called without arguments. Consider making$xmlrequired or handling the null case explicitly before using it as a string reference.