Skip to content

Commit a213526

Browse files
committed
Add missing phpdoc
1 parent a7043cd commit a213526

File tree

8 files changed

+53
-0
lines changed

8 files changed

+53
-0
lines changed

lib/Cas/CasException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class CasException extends \Exception
1212
const INVALID_TICKET = 'INVALID_TICKET';
1313
const INVALID_SERVICE = 'INVALID_SERVICE';
1414

15+
/** @var string */
1516
private $casCode;
1617

1718
/**

lib/Cas/Protocol/SamlValidateResponder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ public function convertToSaml(array $ticket)
5252
return $ret;
5353
}
5454

55+
56+
/**
57+
* @param string $samlResponse
58+
* @return string
59+
*/
5560
public function wrapInSoap($samlResponse)
5661
{
5762
$envelope = <<<SOAP

lib/Cas/Ticket/TicketStore.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ abstract public function getTicket($ticketId);
4242

4343
/**
4444
* @param array $ticket
45+
* @return void
4546
*/
4647
abstract public function addTicket(array $ticket);
4748

4849
/**
4950
* @param string $ticketId
51+
* @return void
5052
*/
5153
abstract public function deleteTicket($ticketId);
5254
}

lib/Cas/TicketValidator.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class TicketValidator
2525
*/
2626
const INVALID_TICKET = 'INVALID_TICKET';
2727

28+
2829
/**
2930
* TicketValidator constructor.
3031
* @param Configuration $casconfig
@@ -43,6 +44,7 @@ public function __construct(Configuration $casconfig)
4344
$this->ticketFactory = new $ticketFactoryClass($casconfig);
4445
}
4546

47+
4648
/**
4749
* @param string $ticket the ticket id to load validate
4850
* @param string $service the service that the ticket was issued to
@@ -88,6 +90,11 @@ public function validateAndDeleteTicket($ticket, $service)
8890
return $serviceTicket;
8991
}
9092

93+
94+
/**
95+
* @param string $parameter
96+
* @return string
97+
*/
9198
public static function sanitize($parameter)
9299
{
93100
return preg_replace(

tests/bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Sets a link in the simplesamlphp vendor directory
1616
* @param string $target
1717
* @param string $link
18+
* @return void
1819
*/
1920
function symlinkModulePathInVendorDirectory($target, $link)
2021
{

tests/lib/Cas/Protocol/SamlValidateTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
class SamlValidateTest extends \PHPUnit\Framework\TestCase
99
{
10+
/**
11+
* @return void
12+
*/
1013
public function testSamlValidatXmlGeneration()
1114
{
1215
$serviceUrl = 'http://jellyfish.greatvalleyu.com:7777/ssomanager/c/SSB';

tests/lib/TicketValidatorTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class TicketValidatorTest extends TestCase
2828
*/
2929
private $ticketStore;
3030

31+
32+
/**
33+
* @return void
34+
*/
3135
protected function setUp() : void
3236
{
3337
parent::setUp();
@@ -42,6 +46,9 @@ protected function setUp() : void
4246
}
4347

4448

49+
/**
50+
* @return void
51+
*/
4552
public function testNonExistantTicket()
4653
{
4754
$id = 'no-such-ticket';
@@ -55,6 +62,10 @@ public function testNonExistantTicket()
5562
}
5663
}
5764

65+
66+
/**
67+
* @return void
68+
*/
5869
public function testValidTicket()
5970
{
6071
$serviceUrl = 'http://efh.com?a=b&';
@@ -75,6 +86,10 @@ public function testValidTicket()
7586
}
7687
}
7788

89+
90+
/**
91+
* @return void
92+
*/
7893
public function testWrongServiceUrlTicket()
7994
{
8095
$serviceUrl = 'http://efh.com?a=b&';
@@ -95,6 +110,10 @@ public function testWrongServiceUrlTicket()
95110
$this->assertNull($this->ticketStore->getTicket($id), "ticket deleted after loading");
96111
}
97112

113+
114+
/**
115+
* @return void
116+
*/
98117
public function testExpiredTicket()
99118
{
100119
$serviceUrl = 'http://efh.com?a=b&';
@@ -112,6 +131,7 @@ public function testExpiredTicket()
112131
$this->assertNull($this->ticketStore->getTicket($id), "ticket deleted after loading");
113132
}
114133

134+
115135
/**
116136
* Create a ticket to use for testing
117137
* @param string $serviceUrl The service url for this ticket

tests/www/LoginIntegrationTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class LoginIntegrationTest extends \PHPUnit\Framework\TestCase
4343
*/
4444
protected $cookies_file;
4545

46+
4647
/**
4748
* The setup method that is run before any tests in this class.
4849
* @return void
@@ -56,6 +57,7 @@ protected function setup() : void
5657
$this->cookies_file = sys_get_temp_dir().'/'.$this->server_pid.'.cookies';
5758
}
5859

60+
5961
/**
6062
* The tear down method that is executed after all tests in this class.
6163
* Removes the lock file and cookies file
@@ -149,6 +151,7 @@ public function testValidServiceUrl()
149151
);
150152
}
151153

154+
152155
/**
153156
* Test outputting user info instead of redirecting
154157
* @return void
@@ -175,6 +178,7 @@ public function testDebugOutput()
175178
);
176179
}
177180

181+
178182
/**
179183
* Test outputting user info instead of redirecting
180184
* @return void
@@ -202,8 +206,10 @@ public function testDebugOutputSamlValidate()
202206
);
203207
}
204208

209+
205210
/**
206211
* Test outputting user info instead of redirecting
212+
* @return void
207213
*/
208214
public function testAlternateServiceConfigUsed()
209215
{
@@ -231,6 +237,7 @@ public function testAlternateServiceConfigUsed()
231237
);
232238
}
233239

240+
234241
/**
235242
* test a valid service URL with Post
236243
* @return void
@@ -285,6 +292,10 @@ public function testValidServiceUrlWithPost()
285292
);
286293
}
287294

295+
296+
/**
297+
* @return void
298+
*/
288299
public function testSamlValidate()
289300
{
290301
$service_url = 'http://host1.domain:1234/path1';
@@ -334,6 +345,7 @@ public function testSamlValidate()
334345
$this->assertStringContainsString('[email protected]</NameIdentifier>', $resp['body']);
335346
}
336347

348+
337349
/**
338350
* Sets up an authenticated session for the cookie $jar
339351
* @return void
@@ -354,6 +366,7 @@ private function authenticate()
354366
$this->assertEquals(200, $resp['code'], $resp['body']);
355367
}
356368

369+
357370
/**
358371
* TODO: migrate into BuiltInServer
359372
* @param resource $ch
@@ -382,6 +395,7 @@ private function execAndHandleCurlResponse($ch)
382395
];
383396
}
384397

398+
385399
/**
386400
* TODO: migrate into BuiltInServer
387401
* @param string $query The path at the embedded server to query

0 commit comments

Comments
 (0)