Passed
Pull Request — master (#224)
by Kai
03:05
created
lib/Db/ParticipationText.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
  * @method void setType(integer $value)
35 35
  */
36 36
 class ParticipationText extends Model {
37
-	protected $text;
38
-	protected $userId;
39
-	protected $pollId;
40
-	protected $type;
37
+    protected $text;
38
+    protected $userId;
39
+    protected $pollId;
40
+    protected $type;
41 41
 }
Please login to merge, or discard this patch.
lib/Db/Notification.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
  * @method void setPollId(string $value)
31 31
  */
32 32
 class Notification extends Model {
33
-	protected $userId;
34
-	protected $pollId;
33
+    protected $userId;
34
+    protected $pollId;
35 35
 }
Please login to merge, or discard this patch.
tests/Unit/Factories/CommentFactory.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
  * General factory for the comment model.
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Comment')->setDefinitions([
30
-	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
32
-		$date = new DateTime('today');
33
-		return $date->format('Y-m-d H:i:s');
34
-	},
35
-	'comment' => Faker::paragraph()
30
+    'userId' => Faker::firstNameMale(),
31
+    'dt' => function () {
32
+        $date = new DateTime('today');
33
+        return $date->format('Y-m-d H:i:s');
34
+    },
35
+    'comment' => Faker::paragraph()
36 36
 ]);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Comment')->setDefinitions([
30 30
 	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
31
+	'dt' => function() {
32 32
 		$date = new DateTime('today');
33 33
 		return $date->format('Y-m-d H:i:s');
34 34
 	},
Please login to merge, or discard this patch.
tests/Unit/Factories/EventFactory.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -27,20 +27,20 @@
 block discarded – undo
27 27
  * General factory for the event model.
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Event')->setDefinitions([
30
-	'type' => 0,
31
-	'title' => Faker::sentence(10),
32
-	'description' => Faker::paragraph(),
33
-	'owner' => Faker::firstNameMale(),
34
-	'created' => function () {
35
-		$date = new DateTime('today');
36
-		return $date->format('Y-m-d H:i:s');
37
-	},
38
-	'access' => 'registered',
39
-	'expire' => function () {
40
-		$date = new DateTime('tomorrow');
41
-		return $date->format('Y-m-d H:i:s');
42
-	},
43
-	'hash' => Faker::regexify('[A-Za-z0-9]{16}'),
44
-	'isAnonymous' => 0,
45
-	'fullAnonymous' => 0
30
+    'type' => 0,
31
+    'title' => Faker::sentence(10),
32
+    'description' => Faker::paragraph(),
33
+    'owner' => Faker::firstNameMale(),
34
+    'created' => function () {
35
+        $date = new DateTime('today');
36
+        return $date->format('Y-m-d H:i:s');
37
+    },
38
+    'access' => 'registered',
39
+    'expire' => function () {
40
+        $date = new DateTime('tomorrow');
41
+        return $date->format('Y-m-d H:i:s');
42
+    },
43
+    'hash' => Faker::regexify('[A-Za-z0-9]{16}'),
44
+    'isAnonymous' => 0,
45
+    'fullAnonymous' => 0
46 46
 ]);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
 	'title' => Faker::sentence(10),
32 32
 	'description' => Faker::paragraph(),
33 33
 	'owner' => Faker::firstNameMale(),
34
-	'created' => function () {
34
+	'created' => function() {
35 35
 		$date = new DateTime('today');
36 36
 		return $date->format('Y-m-d H:i:s');
37 37
 	},
38 38
 	'access' => 'registered',
39
-	'expire' => function () {
39
+	'expire' => function() {
40 40
 		$date = new DateTime('tomorrow');
41 41
 		return $date->format('Y-m-d H:i:s');
42 42
 	},
Please login to merge, or discard this patch.
tests/Unit/Controller/PageControllerTest.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -29,85 +29,85 @@
 block discarded – undo
29 29
 
30 30
 class PageControllerTest extends UnitTestCase {
31 31
 
32
-	/** @var PageController */
33
-	private $controller;
32
+    /** @var PageController */
33
+    private $controller;
34 34
 
35
-	private $userId = 'john';
35
+    private $userId = 'john';
36 36
 
37
-	/**
38
-	 * {@inheritDoc}
39
-	 */
40
-	public function setUp() {
41
-		$request = $this->getMockBuilder('OCP\IRequest')
42
-			->disableOriginalConstructor()
43
-			->getMock();
44
-		$userManager = $this->getMockBuilder('OCP\IUserManager')
45
-			->disableOriginalConstructor()
46
-			->getMock();
47
-		$groupManager = $this->getMockBuilder('OCP\IGroupManager')
48
-			->disableOriginalConstructor()
49
-			->getMock();
50
-		$avatarManager = $this->getMockBuilder('OCP\IAvatarManager')
51
-			->disableOriginalConstructor()
52
-			->getMock();
53
-		$logger = $this->getMockBuilder('OCP\ILogger')
54
-			->disableOriginalConstructor()
55
-			->getMock();
56
-		$l10n = $this->getMockBuilder('OCP\IL10N')
57
-			->disableOriginalConstructor()
58
-			->getMock();
59
-		$urlGenerator = $this->getMockBuilder('OCP\IURLGenerator')
60
-			->disableOriginalConstructor()
61
-			->getMock();
62
-		$commentMapper = $this->getMockBuilder('OCA\Polls\Db\CommentMapper')
63
-			->disableOriginalConstructor()
64
-			->getMock();
65
-		$dateMapper = $this->getMockBuilder('OCA\Polls\Db\DateMapper')
66
-			->disableOriginalConstructor()
67
-			->getMock();
68
-		$eventMapper = $this->getMockBuilder('OCA\Polls\Db\EventMapper')
69
-			->disableOriginalConstructor()
70
-			->getMock();
71
-		$notificationMapper = $this->getMockBuilder('OCA\Polls\Db\NotificationMapper')
72
-			->disableOriginalConstructor()
73
-			->getMock();
74
-		$participationMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationMapper')
75
-			->disableOriginalConstructor()
76
-			->getMock();
77
-		$participationTextMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationTextMapper')
78
-			->disableOriginalConstructor()
79
-			->getMock();
80
-		$textMapper = $this->getMockBuilder('OCA\Polls\Db\TextMapper')
81
-			->disableOriginalConstructor()
82
-			->getMock();
37
+    /**
38
+     * {@inheritDoc}
39
+     */
40
+    public function setUp() {
41
+        $request = $this->getMockBuilder('OCP\IRequest')
42
+            ->disableOriginalConstructor()
43
+            ->getMock();
44
+        $userManager = $this->getMockBuilder('OCP\IUserManager')
45
+            ->disableOriginalConstructor()
46
+            ->getMock();
47
+        $groupManager = $this->getMockBuilder('OCP\IGroupManager')
48
+            ->disableOriginalConstructor()
49
+            ->getMock();
50
+        $avatarManager = $this->getMockBuilder('OCP\IAvatarManager')
51
+            ->disableOriginalConstructor()
52
+            ->getMock();
53
+        $logger = $this->getMockBuilder('OCP\ILogger')
54
+            ->disableOriginalConstructor()
55
+            ->getMock();
56
+        $l10n = $this->getMockBuilder('OCP\IL10N')
57
+            ->disableOriginalConstructor()
58
+            ->getMock();
59
+        $urlGenerator = $this->getMockBuilder('OCP\IURLGenerator')
60
+            ->disableOriginalConstructor()
61
+            ->getMock();
62
+        $commentMapper = $this->getMockBuilder('OCA\Polls\Db\CommentMapper')
63
+            ->disableOriginalConstructor()
64
+            ->getMock();
65
+        $dateMapper = $this->getMockBuilder('OCA\Polls\Db\DateMapper')
66
+            ->disableOriginalConstructor()
67
+            ->getMock();
68
+        $eventMapper = $this->getMockBuilder('OCA\Polls\Db\EventMapper')
69
+            ->disableOriginalConstructor()
70
+            ->getMock();
71
+        $notificationMapper = $this->getMockBuilder('OCA\Polls\Db\NotificationMapper')
72
+            ->disableOriginalConstructor()
73
+            ->getMock();
74
+        $participationMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationMapper')
75
+            ->disableOriginalConstructor()
76
+            ->getMock();
77
+        $participationTextMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationTextMapper')
78
+            ->disableOriginalConstructor()
79
+            ->getMock();
80
+        $textMapper = $this->getMockBuilder('OCA\Polls\Db\TextMapper')
81
+            ->disableOriginalConstructor()
82
+            ->getMock();
83 83
 
84
-		$this->controller = new PageController(
85
-			'polls',
86
-			$request,
87
-			$userManager,
88
-			$groupManager,
89
-			$avatarManager,
90
-			$logger,
91
-			$l10n,
92
-			$urlGenerator,
93
-			$this->userId,
94
-			$commentMapper,
95
-			$dateMapper,
96
-			$eventMapper,
97
-			$notificationMapper,
98
-			$participationMapper,
99
-			$participationTextMapper,
100
-			$textMapper
101
-		);
102
-	}
84
+        $this->controller = new PageController(
85
+            'polls',
86
+            $request,
87
+            $userManager,
88
+            $groupManager,
89
+            $avatarManager,
90
+            $logger,
91
+            $l10n,
92
+            $urlGenerator,
93
+            $this->userId,
94
+            $commentMapper,
95
+            $dateMapper,
96
+            $eventMapper,
97
+            $notificationMapper,
98
+            $participationMapper,
99
+            $participationTextMapper,
100
+            $textMapper
101
+        );
102
+    }
103 103
 
104
-	/**
105
-	 * Basic controller index route test.
106
-	 */
107
-	public function testIndex() {
108
-		$result = $this->controller->index();
104
+    /**
105
+     * Basic controller index route test.
106
+     */
107
+    public function testIndex() {
108
+        $result = $this->controller->index();
109 109
 
110
-		$this->assertEquals('main.tmpl', $result->getTemplateName());
111
-		$this->assertInstanceOf(TemplateResponse::class, $result);
112
-	}
110
+        $this->assertEquals('main.tmpl', $result->getTemplateName());
111
+        $this->assertInstanceOf(TemplateResponse::class, $result);
112
+    }
113 113
 }
Please login to merge, or discard this patch.
tests/Unit/UnitTestCase.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
 
29 29
 abstract class UnitTestCase extends PHPUnit_Framework_TestCase {
30 30
 
31
-	/** @var FactoryMuffin */
32
-	protected $fm;
31
+    /** @var FactoryMuffin */
32
+    protected $fm;
33 33
 
34
-	/**
35
-	 * {@inheritDoc}
36
-	 */
37
-	public function setUp() {
38
-		parent::setUp();
39
-		$this->fm = new FactoryMuffin();
40
-		$this->fm->loadFactories(__DIR__ . '/Factories');
41
-	}
34
+    /**
35
+     * {@inheritDoc}
36
+     */
37
+    public function setUp() {
38
+        parent::setUp();
39
+        $this->fm = new FactoryMuffin();
40
+        $this->fm->loadFactories(__DIR__ . '/Factories');
41
+    }
42 42
 }
Please login to merge, or discard this patch.
tests/Unit/Factories/TextFactory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,5 +27,5 @@
 block discarded – undo
27 27
  * General factory for the text model.
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Text')->setDefinitions([
30
-	'text' => Faker::paragraph()
30
+    'text' => Faker::paragraph()
31 31
 ]);
Please login to merge, or discard this patch.
tests/Unit/Factories/ParticipationTextFactory.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
  * General factory for the participation text model.
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\ParticipationText')->setDefinitions([
30
-	'text' => Faker::paragraph(),
31
-	'userId' => Faker::firstNameMale(),
32
-	'type' => 0
30
+    'text' => Faker::paragraph(),
31
+    'userId' => Faker::firstNameMale(),
32
+    'type' => 0
33 33
 ]);
Please login to merge, or discard this patch.
tests/Unit/Factories/ParticipationFactory.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
  * General factory for the participation model.
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Participation')->setDefinitions([
30
-	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
32
-		$date = new DateTime('today');
33
-		return $date->format('Y-m-d H:i:s');
34
-	},
35
-	'type' => 0
30
+    'userId' => Faker::firstNameMale(),
31
+    'dt' => function () {
32
+        $date = new DateTime('today');
33
+        return $date->format('Y-m-d H:i:s');
34
+    },
35
+    'type' => 0
36 36
 ]);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Participation')->setDefinitions([
30 30
 	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
31
+	'dt' => function() {
32 32
 		$date = new DateTime('today');
33 33
 		return $date->format('Y-m-d H:i:s');
34 34
 	},
Please login to merge, or discard this patch.