Skip to content

Instantly share code, notes, and snippets.

@graz68a
Created January 2, 2019 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graz68a/3f169d911976b06a561e56dda56506bd to your computer and use it in GitHub Desktop.
Save graz68a/3f169d911976b06a561e56dda56506bd to your computer and use it in GitHub Desktop.
problem
Hello
in point 9,10,11,12 the script should calculate this
30.12.2018 Premier League Manchester United 4 - 1 Bournemouth 1.37 5.11 8.39
26.12.2018 Premier League Tottenham 5 - 0 Bournemouth 1.34 5.31 9.12
22.12.2018 Premier League Bournemouth 2 - 0 Brighton 1.92 3.56 4.16
19.12.2018 EFL Cup Chelsea 1 - 0 Bournemouth 1.34 5.03 8.89
15.12.2018 Premier League Wolverhampton 2 - 0 Bournemouth 2.05 3.35 3.94
Latest 4 digits should return this
9 it should report number of matches with zero goal scored by home team in latest 5 matches (home or away matches)
10 it should report number of matches with zero goal scored by away team in latest 5 matches (home or away matches)
11 it should report number of matches with zero goal scored by home team in latest 5 "home only" matches
12 it should report number of matches with zero goal scored by away team in latest 5 "away only" matches
Your script return this
england|premier league|Bournemouth:Watford|3|12|9|7|6|9|5|6|0|2|0|2
in the latest 4 digits we ahve 9,10,11,12
0|2|0|2
now I have seen your code
if($matchScoreComponent->hasClass('draw')){
$drawGamesByAwayTotal++;
}
As it seems the code is searching for "draw" matches , but it's not correct .
At point 9 it should search for number of matches with zero goal scored by home team in latest 5 matches (home or away matches)
so , it happens here
26.12.2018 Premier League Tottenham 5 - 0 Bournemouth 1.34 5.31 9.12
and here
15.12.2018 Premier League Wolverhampton 2 - 0 Bournemouth 2.05 3.35 3.94
so there result should be 2 .
Also 10,11,12 are searching fro draw matches which is not correct.
Thank you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment