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

Add Observer Classifier #177

Merged
merged 5 commits into from
Jul 11, 2020
Merged

Add Observer Classifier #177

merged 5 commits into from
Jul 11, 2020

Conversation

stefanzweifel
Copy link
Owner

This PR adds the last (?) remaining Classifier to stats: Observers.

The Classifier works very similar to the EventListener Classifier. We resolve the Events-Dispatcher from the Laravel application, get all registered listeners, filter through the events and only keep the eloquent.* ones and finally check, if the registered class matches with the class which should be classified.

Closes #128

@codecov
Copy link

codecov bot commented Jul 11, 2020

Codecov Report

Merging #177 into master will decrease coverage by 0.67%.
The diff coverage is 81.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #177      +/-   ##
============================================
- Coverage     94.74%   94.07%   -0.68%     
- Complexity      227      233       +6     
============================================
  Files            41       42       +1     
  Lines           628      658      +30     
============================================
+ Hits            595      619      +24     
- Misses           33       39       +6     
Impacted Files Coverage Δ Complexity Δ
src/Classifier.php 100.00% <ø> (ø) 7.00 <0.00> (ø)
src/Classifiers/ObserverClassifier.php 80.00% <80.00%> (ø) 6.00 <6.00> (?)
src/Classifiers/EventListenerClassifier.php 100.00% <100.00%> (ø) 6.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 cc59485...553be6a. Read the comment docs.

@stefanzweifel stefanzweifel merged commit ae29385 into master Jul 11, 2020
@stefanzweifel stefanzweifel deleted the classifier/observer branch July 11, 2020 11:01
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.

[2.x] Add Observer Classifier
1 participant