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

Update checking of $this usage to only error in static methods. #545

Merged
merged 1 commit into from Dec 3, 2017

Conversation

MaartenStaa
Copy link
Contributor

This rolls back a few of the changes in #528 to address the concerns in #536. It will now only produce an error in static methods, and leave usages of $this in the root and in closures alone.

@codecov
Copy link

codecov bot commented Dec 3, 2017

Codecov Report

Merging #545 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #545      +/-   ##
============================================
- Coverage     79.38%   79.36%   -0.02%     
+ Complexity      837      835       -2     
============================================
  Files            56       56              
  Lines          1979     1900      -79     
============================================
- Hits           1571     1508      -63     
+ Misses          408      392      -16
Impacted Files Coverage Δ Complexity Δ
src/TreeAnalyzer.php 94.28% <100%> (-0.36%) 52 <0> (-2)
src/Client/XCache.php 33.33% <0%> (-9.53%) 3% <0%> (ø)
src/Client/Window.php 66.66% <0%> (-4.77%) 3% <0%> (ø)
src/Protocol/Position.php 53.84% <0%> (-3.3%) 6% <0%> (ø)
src/Server/Workspace.php 38.46% <0%> (-2.28%) 23% <0%> (ø)
src/Cache/FileSystemCache.php 25% <0%> (-2.28%) 8% <0%> (ø)
src/Protocol/Range.php 80% <0%> (-1.82%) 4% <0%> (ø)
src/Server/TextDocument.php 74.21% <0%> (-0.79%) 55% <0%> (ø)
src/PhpDocument.php 79.31% <0%> (-0.69%) 24% <0%> (ø)
src/Index/Index.php 69.81% <0%> (-0.69%) 22% <0%> (ø)
... and 40 more

@jens1o
Copy link
Contributor

jens1o commented Dec 3, 2017

Personally, I'd prefer the approach in #543

@felixfbecker felixfbecker merged commit 9b1fafa into felixfbecker:master Dec 3, 2017
@MaartenStaa MaartenStaa deleted the looser-this-checking branch February 15, 2018 12:53
cgxxv pushed a commit to cgxxv/php-language-server that referenced this pull request Mar 25, 2022
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.

None yet

3 participants