[Vortex] Move WNS and MPNS payload detection

Review Request #609 — Created Aug. 29, 2018 and submitted

Mathijs
Lunr
feature-payload-detection
9706dda...
lunr

Vortex: Move WNS and MPNS payload detection

Unit tests

  • 0
  • 0
  • 6
  • 0
  • 6
Description From Last Updated
There are no open issues
pprkut
  1. 
      
  2. src/Lunr/Vortex/MPNS/MPNSDispatcher.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    The issue has been resolved. Show all issues

    The idea is that $this->type is no longer necessary. You know the type of the payload, you don't need to cache it.

  3. 
      
Mathijs
pprkut
  1. 
      
  2. src/Lunr/Vortex/MPNS/MPNSDispatcher.php (Diff revision 2)
     
     
     
     
     
    The issue has been resolved. Show all issues

    why not do the instanceof checks here?

    1. The header should be set for both TILE and TOAST. So we would need two instanceof checks, two $headers['x-windowsPhone-target'] = MPNSTYPE:...

      In my opinion its a little bit easier to read whats going on this way.

  3. 
      
Mathijs
pprkut
  1. 
      
  2. src/Lunr/Vortex/WNS/WNSDispatcher.php (Diff revision 3)
     
     
    The issue has been resolved. Show all issues

    I don't think we need this anymore

  3. src/Lunr/Vortex/WNS/WNSDispatcher.php (Diff revision 3)
     
     
    The issue has been resolved. Show all issues

    I'd use a local $type directly here. No need for the extra function call.

  4. src/Lunr/Vortex/WNS/WNSDispatcher.php (Diff revision 3)
     
     
    The issue has been resolved. Show all issues

    I don't think we need this anymore

  5. src/Lunr/Vortex/WNS/WNSDispatcher.php (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    The issue has been resolved. Show all issues

    I'd remove this

  6. 
      
Mathijs
Mathijs
pprkut
  1. Ship It!
  2. 
      
Mathijs
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master

Loading...