Passed
Pull Request — master (#44)
by
unknown
12:33
created
src/cli/Console/Commands/TvheadendStatusManagerCommand.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,9 +79,9 @@
 block discarded – undo
79 79
 		$aliases         = [':logger' => $logger, ':loop' => $eventLoop];
80 80
 
81 81
 		$injector->share($configuration)
82
-		         ->share($logger)
83
-		         ->share($eventDispatcher)
84
-		         ->share($eventLoop);
82
+				 ->share($logger)
83
+				 ->share($eventDispatcher)
84
+				 ->share($eventLoop);
85 85
 
86 86
 		// Create managers
87 87
 		$statusManager        = $injector->make('Jalle19\StatusManager\Manager\StatusManager', $aliases);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		$eventDispatcher->addSubscriber($httpRequestManager);
95 95
 
96 96
 		// Configure the event loop and start the application
97
-		$eventLoop->addPeriodicTimer($configuration->getUpdateInterval(), function () use ($eventDispatcher)
97
+		$eventLoop->addPeriodicTimer($configuration->getUpdateInterval(), function() use ($eventDispatcher)
98 98
 		{
99 99
 			// Emit an event on each tick
100 100
 			$eventDispatcher->dispatch(Events::MAIN_LOOP_TICK);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$manager->setConfiguration([
151 151
 			'classname'  => 'Propel\\Runtime\\Connection\\ConnectionWrapper',
152 152
 			//'classname'  => 'Propel\\Runtime\\Connection\\DebugPDO',
153
-			'dsn'        => 'sqlite:' . $configuration->getDatabasePath(),
153
+			'dsn'        => 'sqlite:'.$configuration->getDatabasePath(),
154 154
 			'user'       => null,
155 155
 			'password'   => '',
156 156
 			'attributes' => [
Please login to merge, or discard this patch.
src/cli/Database/ConnectionQuery.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 	public function hasConnection($instanceName, ConnectionStatus $connectionStatus)
23 23
 	{
24 24
 		return $this->filterByInstanceName($instanceName)
25
-		            ->filterByPeer($connectionStatus->peer)
26
-		            ->filterByStarted($connectionStatus->started)
27
-		            ->findOne() !== null;
25
+					->filterByPeer($connectionStatus->peer)
26
+					->filterByStarted($connectionStatus->started)
27
+					->findOne() !== null;
28 28
 	}
29 29
 
30 30
 }
Please login to merge, or discard this patch.
src/cli/Database/ChannelQuery.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	public function hasChannel($instanceName, $channelName)
22 22
 	{
23 23
 		return $this->filterByInstanceName($instanceName)->filterByName($channelName)
24
-		            ->findOne() !== null;
24
+					->findOne() !== null;
25 25
 	}
26 26
 
27 27
 }
Please login to merge, or discard this patch.
src/cli/Database/Input.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
 		$this->setPrimaryKey($inputStatus->uuid);
24 24
 
25 25
 		return $this->setInput($inputStatus->input)
26
-		            ->setWeight($inputStatus->weight)
27
-		            ->setNetwork(self::parseNetwork($inputStatus))
28
-		            ->setMux(self::parseMux($inputStatus));
26
+					->setWeight($inputStatus->weight)
27
+					->setNetwork(self::parseNetwork($inputStatus))
28
+					->setMux(self::parseMux($inputStatus));
29 29
 	}
30 30
 
31 31
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 	 */
35 35
 	public function getFriendlyName()
36 36
 	{
37
-		return $this->getNetwork() . '/' . $this->getMux();
37
+		return $this->getNetwork().'/'.$this->getMux();
38 38
 	}
39 39
 
40 40
 
Please login to merge, or discard this patch.
src/cli/Database/SubscriptionQuery.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 		$userId = $user !== null ? $user->getId() : null;
35 35
 
36 36
 		return $this->filterByInstance($instance)->filterByUserId($userId)
37
-		            ->filterByChannel($channel)
38
-		            ->filterBySubscriptionId($subscription->id)->filterByStarted($subscription->start)
39
-		            ->findOne() !== null;
37
+					->filterByChannel($channel)
38
+					->filterBySubscriptionId($subscription->id)->filterByStarted($subscription->start)
39
+					->findOne() !== null;
40 40
 	}
41 41
 
42 42
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 	public function getNewestMatching($instanceName, $subscriptionId)
50 50
 	{
51 51
 		return $this->filterByInstanceName($instanceName)
52
-		            ->filterBySubscriptionId($subscriptionId)
53
-		            ->addDescendingOrderByColumn('started')->findOne();
52
+					->filterBySubscriptionId($subscriptionId)
53
+					->addDescendingOrderByColumn('started')->findOne();
54 54
 	}
55 55
 
56 56
 
Please login to merge, or discard this patch.
tests/cli/Manager/StatusManagerTest.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@
 block discarded – undo
21 21
 	{
22 22
 		/* @var EventSubscriberInterface|\PHPUnit_Framework_MockObject_MockObject $statusManager */
23 23
 		$statusManager = $this->getMockBuilder('\Jalle19\StatusManager\Manager\StatusManager')
24
-		                      ->setConstructorArgs([$this->configuration, $this->logger, $this->eventDispatcher])
25
-		                      ->setMethods(['onMainLoopStarted', 'onMainLoopTick'])
26
-		                      ->getMock();
24
+							  ->setConstructorArgs([$this->configuration, $this->logger, $this->eventDispatcher])
25
+							  ->setMethods(['onMainLoopStarted', 'onMainLoopTick'])
26
+							  ->getMock();
27 27
 
28 28
 		$statusManager->expects($this->once())
29
-		              ->method('onMainLoopStarted');
29
+					  ->method('onMainLoopStarted');
30 30
 		$statusManager->expects($this->once())
31
-		              ->method('onMainLoopTick');
31
+					  ->method('onMainLoopTick');
32 32
 
33 33
 		$this->eventDispatcher->addSubscriber($statusManager);
34 34
 		$this->eventDispatcher->dispatch(Events::MAIN_LOOP_STARTING);
Please login to merge, or discard this patch.
tests/cli/Manager/InstanceStateManagerTest.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -25,23 +25,23 @@
 block discarded – undo
25 25
 	{
26 26
 		/* @var EventSubscriberInterface|\PHPUnit_Framework_MockObject_MockObject|InstanceStateManager $instanceStateManager */
27 27
 		$instanceStateManager = $this->getMockBuilder('\Jalle19\StatusManager\Manager\InstanceStateManager')
28
-		                             ->setConstructorArgs([$this->configuration, $this->logger, $this->eventDispatcher])
29
-		                             ->setMethods([
30
-			                             'onInstanceStatusCollectionRequest',
31
-			                             'onInstanceReachable',
32
-			                             'onInstanceUnreachable',
33
-			                             'onInstanceMaybeReachable',
34
-		                             ])
35
-		                             ->getMock();
28
+									 ->setConstructorArgs([$this->configuration, $this->logger, $this->eventDispatcher])
29
+									 ->setMethods([
30
+										 'onInstanceStatusCollectionRequest',
31
+										 'onInstanceReachable',
32
+										 'onInstanceUnreachable',
33
+										 'onInstanceMaybeReachable',
34
+									 ])
35
+									 ->getMock();
36 36
 
37 37
 		$instanceStateManager->expects($this->once())
38
-		                     ->method('onInstanceStatusCollectionRequest');
38
+							 ->method('onInstanceStatusCollectionRequest');
39 39
 		$instanceStateManager->expects($this->once())
40
-		                     ->method('onInstanceReachable');
40
+							 ->method('onInstanceReachable');
41 41
 		$instanceStateManager->expects($this->once())
42
-		                     ->method('onInstanceUnreachable');
42
+							 ->method('onInstanceUnreachable');
43 43
 		$instanceStateManager->expects($this->once())
44
-		                     ->method('onInstanceMaybeReachable');
44
+							 ->method('onInstanceMaybeReachable');
45 45
 
46 46
 		// Start triggering events and assert that the instance state is as expected
47 47
 		$this->eventDispatcher->addSubscriber($instanceStateManager);
Please login to merge, or discard this patch.
src/cli/Manager/StatisticsManager.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 		}
53 53
 		catch (PropelException $e)
54 54
 		{
55
-			throw new RequestFailedException('A database error occured: ' . $e->getMessage());
55
+			throw new RequestFailedException('A database error occured: '.$e->getMessage());
56 56
 		}
57 57
 
58 58
 		return false;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,8 +127,8 @@
 block discarded – undo
127 127
 		$ignoredUsers = $this->configuration->getInstanceByName($instanceName)->getIgnoredUsers();
128 128
 
129 129
 		return UserQuery::create()
130
-		                ->filterIgnoredUsers($ignoredUsers)
131
-		                ->findByInstanceName($instanceName)->getArrayCopy();
130
+						->filterIgnoredUsers($ignoredUsers)
131
+						->findByInstanceName($instanceName)->getArrayCopy();
132 132
 	}
133 133
 
134 134
 }
Please login to merge, or discard this patch.
src/cli/Configuration/Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 		// Check that all mandatory values are defined
52 52
 		foreach (self::$mandatoryValues as $mandatoryValue)
53 53
 			if (!isset($this->_configuration[$mandatoryValue]) || ($this->_configuration[$mandatoryValue] != '0' && empty($this->_configuration[$mandatoryValue])))
54
-				throw new InvalidConfigurationException('Mandatory configuration value "' . $mandatoryValue . '" is missing');
54
+				throw new InvalidConfigurationException('Mandatory configuration value "'.$mandatoryValue.'" is missing');
55 55
 
56 56
 		if (!is_readable($this->_configuration['database_path']))
57 57
 			throw new InvalidConfigurationException('The database path does not exist or is not writable');
Please login to merge, or discard this patch.