Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

Commit

Permalink
richsage#167 - minor tweaks for readability and code style consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelLH committed Apr 5, 2018
1 parent ebfda10 commit e284ede
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 31 deletions.
2 changes: 0 additions & 2 deletions DependencyInjection/Compiler/AddHandlerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface,
Symfony\Component\DependencyInjection\ContainerBuilder,
Symfony\Component\DependencyInjection\Definition,
Symfony\Component\DependencyInjection\Reference,
RMS\PushNotificationsBundle\Device\Types,
Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;

class AddHandlerPass implements CompilerPassInterface
Expand Down
1 change: 0 additions & 1 deletion Service/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace RMS\PushNotificationsBundle\Service;


class EventListener {

/**
Expand Down
8 changes: 4 additions & 4 deletions Service/EventListenerInterface.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace RMS\PushNotificationsBundle\Service;


interface EventListenerInterface {
namespace RMS\PushNotificationsBundle\Service;

interface EventListenerInterface
{
public function onKernelTerminate ();
}
}
1 change: 0 additions & 1 deletion Service/iOSFeedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,4 @@ protected function getStreamContext()

return $ctx;
}

}
25 changes: 13 additions & 12 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
{
public function testDefaults()
{
$config = $this->process(array());
$this->process(array());
$this->addToAssertionCount(1); // Implicitly 'asserting' no exceptions at this point
}

/**
Expand All @@ -20,7 +21,7 @@ public function testAddingAndroidKeyRequiresValues()
$arr = array(
array("android" => "~"),
);
$config = $this->process($arr);
$this->process($arr);
}

/**
Expand All @@ -33,7 +34,7 @@ public function testAndroidRequiresUsername()
"android" => array("c2dm" => array("password" => "foo"))
),
);
$config = $this->process($arr);
$this->process($arr);
}

/**
Expand All @@ -46,7 +47,7 @@ public function testAndroidRequiresPassword()
"android" => array("c2dm" => array("username" => "foo"))
),
);
$config = $this->process($arr);
$this->process($arr);
}

public function testOldFullAndroid()
Expand Down Expand Up @@ -100,7 +101,7 @@ public function testGCMRequiresAPIKey()
)
),
);
$config = $this->process($arr);
$this->process($arr);
}

public function testGCMIsOK()
Expand Down Expand Up @@ -133,7 +134,7 @@ public function testAddingiOsKeyRequiresValues()
$arr = array(
array("ios" => "~"),
);
$config = $this->process($arr);
$this->process($arr);
}

/**
Expand All @@ -146,7 +147,7 @@ public function testiOSRequiresPEM()
"ios" => array("pem" => "")
),
);
$config = $this->process($arr);
$this->process($arr);
}

public function testFulliOS()
Expand All @@ -172,7 +173,7 @@ public function testAddingMacKeyRequiresValues()
$arr = array(
array("mac" => "~"),
);
$config = $this->process($arr);
$this->process($arr);
}

/**
Expand All @@ -185,7 +186,7 @@ public function testMacRequiresPEM()
"mac" => array("pem" => "")
),
);
$config = $this->process($arr);
$this->process($arr);
}

public function testFullMac()
Expand Down Expand Up @@ -213,7 +214,7 @@ public function testBlackberryRequiresAppID()
"blackberry" => array("password" => "foo")
),
);
$config = $this->process($arr);
$this->process($arr);
}

/**
Expand All @@ -226,7 +227,7 @@ public function testBlackberryRequiresPassword()
"blackberry" => array("app_id" => "foo")
),
);
$config = $this->process($arr);
$this->process($arr);
}

public function testFullBlackberry()
Expand Down Expand Up @@ -254,7 +255,7 @@ public function testAddingWindowsKeyRequiresValues()
"windowsphone" => "~"
),
);
$config = $this->process($arr);
$this->process($arr);
}

public function testFullWindows()
Expand Down
3 changes: 1 addition & 2 deletions Tests/Message/AndroidMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
namespace RMS\PushNotificationsBundle\Tests\Message;

use RMS\PushNotificationsBundle\Device\Types,
RMS\PushNotificationsBundle\Message\AndroidMessage,
RMS\PushNotificationsBundle\Message\MessageInterface;
RMS\PushNotificationsBundle\Message\AndroidMessage;

class AndroidMessageTest extends \PHPUnit_Framework_TestCase
{
Expand Down
3 changes: 1 addition & 2 deletions Tests/Message/BlackberryMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
namespace RMS\PushNotificationsBundle\Tests\Message;

use RMS\PushNotificationsBundle\Device\Types,
RMS\PushNotificationsBundle\Message\BlackberryMessage,
RMS\PushNotificationsBundle\Message\MessageInterface;
RMS\PushNotificationsBundle\Message\BlackberryMessage;

class BlackberryMessageTest extends \PHPUnit_Framework_TestCase
{
Expand Down
3 changes: 1 addition & 2 deletions Tests/Message/MacMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
namespace RMS\PushNotificationsBundle\Tests\Message;

use RMS\PushNotificationsBundle\Device\Types,
RMS\PushNotificationsBundle\Message\MacMessage,
RMS\PushNotificationsBundle\Message\MessageInterface;
RMS\PushNotificationsBundle\Message\MacMessage;

class MacMessageTest extends \PHPUnit_Framework_TestCase
{
Expand Down
3 changes: 1 addition & 2 deletions Tests/Message/WindowsphoneMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
namespace RMS\PushNotificationsBundle\Tests\Message;

use RMS\PushNotificationsBundle\Device\Types,
RMS\PushNotificationsBundle\Message\WindowsphoneMessage,
RMS\PushNotificationsBundle\Message\MessageInterface;
RMS\PushNotificationsBundle\Message\WindowsphoneMessage;

class WindowsphoneMessageTest extends \PHPUnit_Framework_TestCase
{
Expand Down
4 changes: 1 addition & 3 deletions Tests/Message/iOSMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
namespace RMS\PushNotificationsBundle\Tests\Message;

use RMS\PushNotificationsBundle\Device\Types,
RMS\PushNotificationsBundle\Message\iOSMessage,
RMS\PushNotificationsBundle\Message\MessageInterface;
RMS\PushNotificationsBundle\Message\iOSMessage;

class iOSMessageTest extends \PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -82,5 +81,4 @@ public function testMutableContentAddOk()
$msg->setMutableContent(true);
$this->assertEquals($expected, $msg->getMessageBody());
}

}

0 comments on commit e284ede

Please sign in to comment.