Skip to content
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

(Refactor) Array Push To Array Assign #1140

Merged
merged 2 commits into from
Feb 13, 2020
Merged

(Refactor) Array Push To Array Assign #1140

merged 2 commits into from
Feb 13, 2020

Conversation

HDVinnie
Copy link
Collaborator

@HDVinnie HDVinnie commented Feb 13, 2020

Change Array Push To Array Assign

Change array_push() to direct variable assign

 class SomeClass
 {
     public function run()
     {
         $items = [];
-        array_push($items, $item);
+        $items[] = $item;
     }
 }

@HDVinnie HDVinnie merged commit 33ad09f into master Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants