Completed
Pull Request — master (#26)
by
unknown
02:32
created
tests/issues/Issue0005Test.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class Issue0005Test extends SwaggerGen_TestCase {
3
+class Issue0005Test extends SwaggerGen_TestCase
4
+{
4 5
 
5 6
 	/**
6 7
 	 * @covers \SwaggerGen\Swagger\Swagger::__construct
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-spl_autoload_register(function ($classname) {
3
+spl_autoload_register(function($classname) {
4 4
 	$file = dirname(__DIR__) . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.php';
5 5
 	if (is_file($file)) {
6 6
 		require_once $file;
Please login to merge, or discard this patch.
tests/Swagger/OperationTest.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
 	 * @covers \SwaggerGen\Swagger\Operation::handleCommand
241 241
 	 */
242 242
 	public function testHandleCommand_OperationId_UniqueInSwagger()
243
-	{	
243
+	{
244 244
 		// First occurance
245 245
 		$path = $this->parent->handleCommand('endpoint', 'foo');
246 246
 		$this->assertInstanceOf('\SwaggerGen\Swagger\Path', $path);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 			'responses' => array(
724 724
 				200 => array(
725 725
 					'description' => 'OK',
726
-					'schema' => Array(
726
+					'schema' => array(
727 727
 						'type' => 'integer',
728 728
 						'format' => 'int32',
729 729
 					),
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
 			'responses' => array(
748 748
 				200 => array(
749 749
 					'description' => 'Stuff is returned',
750
-					'schema' => Array(
750
+					'schema' => array(
751 751
 						'type' => 'integer',
752 752
 						'format' => 'int32',
753 753
 					),
Please login to merge, or discard this patch.
tests/Swagger/Type/ObjectTypeTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -337,23 +337,23 @@
 block discarded – undo
337 337
 				. ',"tags":[{"name":"Test"}]}', json_encode($array, JSON_NUMERIC_CHECK));
338 338
 	}
339 339
 
340
-    public function testObjectPropertiesReadOnly()
341
-    {
342
-        $object = new \SwaggerGen\SwaggerGen();
343
-        $array = $object->getSwagger(array('
340
+	public function testObjectPropertiesReadOnly()
341
+	{
342
+		$object = new \SwaggerGen\SwaggerGen();
343
+		$array = $object->getSwagger(array('
344 344
 			api Test
345 345
 			endpoint /test
346 346
 			method GET something
347 347
 			response 200 object(a!:array(A),b:array(B))
348 348
 		'));
349 349
 
350
-        $this->assertSame('{"swagger":2,"info":{"title":"undefined","version":0}'
351
-            . ',"paths":{"\/test":{"get":{"tags":["Test"],"summary":"something"'
352
-            . ',"responses":{"200":{"description":"OK","schema":{"type":"object","required":["b"]'
353
-            . ',"properties":{"a":{"type":"array","items":{"$ref":"#\/definitions\/A"}}'
354
-            . ',"b":{"type":"array","items":{"$ref":"#\/definitions\/B"}}}}}}}}}'
355
-            . ',"tags":[{"name":"Test"}]}', json_encode($array, JSON_NUMERIC_CHECK));
356
-    }
350
+		$this->assertSame('{"swagger":2,"info":{"title":"undefined","version":0}'
351
+			. ',"paths":{"\/test":{"get":{"tags":["Test"],"summary":"something"'
352
+			. ',"responses":{"200":{"description":"OK","schema":{"type":"object","required":["b"]'
353
+			. ',"properties":{"a":{"type":"array","items":{"$ref":"#\/definitions\/A"}}'
354
+			. ',"b":{"type":"array","items":{"$ref":"#\/definitions\/B"}}}}}}}}}'
355
+			. ',"tags":[{"name":"Test"}]}', json_encode($array, JSON_NUMERIC_CHECK));
356
+	}
357 357
 
358 358
 	public function testDeepObjectProperties()
359 359
 	{
Please login to merge, or discard this patch.
tests/Swagger/Type/PropertyTest.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -81,20 +81,20 @@
 block discarded – undo
81 81
 				), $object->toArray());
82 82
 	}
83 83
 
84
-    /**
85
-     * @covers \SwaggerGen\Swagger\Type\PropertyType::__construct
86
-     */
87
-    public function testConstructReadOnly()
88
-    {
89
-        $object = new SwaggerGen\Swagger\Type\Property($this->parent, 'string', 'Some words here', true);
90
-        $this->assertInstanceOf('\SwaggerGen\Swagger\Type\Property', $object);
91
-
92
-        $this->assertSame(array(
93
-            'type' => 'string',
94
-            'description' => 'Some words here',
95
-            'readOnly' => true
96
-        ), $object->toArray());
97
-    }
84
+	/**
85
+	 * @covers \SwaggerGen\Swagger\Type\PropertyType::__construct
86
+	 */
87
+	public function testConstructReadOnly()
88
+	{
89
+		$object = new SwaggerGen\Swagger\Type\Property($this->parent, 'string', 'Some words here', true);
90
+		$this->assertInstanceOf('\SwaggerGen\Swagger\Type\Property', $object);
91
+
92
+		$this->assertSame(array(
93
+			'type' => 'string',
94
+			'description' => 'Some words here',
95
+			'readOnly' => true
96
+		), $object->toArray());
97
+	}
98 98
 
99 99
 	/**
100 100
 	 * @covers \SwaggerGen\Swagger\Type\PropertyType::__construct
Please login to merge, or discard this patch.
example/api/Example.class.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@
 block discarded – undo
29 29
  *
30 30
  * @rest\api Users Get some useful information on users
31 31
  */
32
-class Example {
32
+class Example
33
+{
33 34
 
34 35
 	private $data = array();
35 36
 
Please login to merge, or discard this patch.
tests/output/OutputTest.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,10 +30,11 @@
 block discarded – undo
30 30
 		);
31 31
 	}
32 32
 	
33
-	public function provideAllCases() {
33
+	public function provideAllCases()
34
+	{
34 35
 		$cases = array();
35 36
 		
36
-		foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) {					
37
+		foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) {
37 38
 			$path = realpath($dir);					
38 39
 			$json = $this->normalizeJson(file_get_contents($path . '/expected.json'));
39 40
 			
Please login to merge, or discard this patch.