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

Fix initialize() method #488

Merged
merged 2 commits into from
Sep 8, 2020
Merged

Fix initialize() method #488

merged 2 commits into from
Sep 8, 2020

Conversation

stancl
Copy link
Member

@stancl stancl commented Sep 4, 2020

Fixes #481

@codecov
Copy link

codecov bot commented Sep 4, 2020

Codecov Report

Merging #488 into 3.x will not change coverage.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff            @@
##                3.x     #488   +/-   ##
=========================================
  Coverage     86.92%   86.92%           
  Complexity      369      369           
=========================================
  Files           103      103           
  Lines          1078     1078           
=========================================
  Hits            937      937           
  Misses          141      141           
Impacted Files Coverage Δ Complexity Δ
src/Tenancy.php 89.58% <28.57%> (ø) 21.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 375380c...30e2eba. Read the comment docs.

Copy link

@lcdss lcdss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the package in my project and didn't find anything wrong. It's only missing a test for this feature.

src/Tenancy.php Outdated
@@ -31,6 +31,16 @@ class Tenancy
*/
public function initialize($tenant): void
{
if (! is_object($tenant)) {
$tenant = $tenant;
Copy link

@lcdss lcdss Sep 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is doing nothing and can be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. So this all works now?

@stancl stancl merged commit 5fe79fe into 3.x Sep 8, 2020
@stancl stancl deleted the fix-initialize branch September 8, 2020 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calls to initialize with a non object value only works the first time it's called
2 participants