Completed
Pull Request — master (#26)
by
unknown
02:32
created
SwaggerGen/Swagger/Type/ObjectType.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -42,6 +42,10 @@  discard block
 block discarded – undo
42 42
 		$this->parseRange($definition, $match);
43 43
 	}
44 44
 
45
+	/**
46
+	 * @param string $definition
47
+	 * @param string[] $match
48
+	 */
45 49
 	private function parseFormat($definition, $match)
46 50
 	{
47 51
 		if (strtolower($match[1]) !== 'object') {
@@ -49,6 +53,10 @@  discard block
 block discarded – undo
49 53
 		}
50 54
 	}
51 55
 
56
+	/**
57
+	 * @param string $definition
58
+	 * @param string[] $match
59
+	 */
52 60
 	private function parseProperties($definition, $match)
53 61
 	{
54 62
 		if (!empty($match[2])) {
@@ -67,6 +75,10 @@  discard block
 block discarded – undo
67 75
 		}
68 76
 	}
69 77
 
78
+	/**
79
+	 * @param string $definition
80
+	 * @param string[] $match
81
+	 */
70 82
 	private function parseRange($definition, $match)
71 83
 	{
72 84
 		if (!empty($match[3])) {
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/Property.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		$format = strtolower($match[1]);
81 81
 		if (isset(self::$classTypes[$format])) {
82 82
 			$type = self::$classTypes[$format];
83
-			$class = "SwaggerGen\\Swagger\\Type\\{$type}Type";
83
+			$class = "SwaggerGen\\Swagger\\Type\\{$type}type";
84 84
 			$this->Type = new $class($this, $definition);
85 85
 		} else {
86 86
 			$this->Type = new \SwaggerGen\Swagger\Type\ReferenceObjectType($this, $definition);
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	private $description;
50 50
 
51
-    /**
52
-     * Whether property is read only
53
-     * @var bool
54
-     */
51
+	/**
52
+	 * Whether property is read only
53
+	 * @var bool
54
+	 */
55 55
 	private $readOnly;
56 56
 
57 57
 	/**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @param \SwaggerGen\Swagger\AbstractObject $parent
66 66
 	 * @param string $definition Either a built-in type or a definition name
67 67
 	 * @param string $description description of the property
68
-     * @param bool $readOnly Whether the property is read only
68
+	 * @param bool $readOnly Whether the property is read only
69 69
 	 * @throws \SwaggerGen\Exception
70 70
 	 */
71 71
 	public function __construct(\SwaggerGen\Swagger\AbstractObject $parent, $definition, $description = null, $readOnly = null)
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
 		return self::arrayFilterNull(array_merge($valueType, array(
132 132
 					'description' => empty($this->description) ? null : $this->description,
133
-                    'readOnly' => $this->readOnly
133
+					'readOnly' => $this->readOnly
134 134
 								), parent::toArray()));
135 135
 	}
136 136
 
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Swagger.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -142,13 +142,13 @@
 block discarded – undo
142 142
 				return $this;
143 143
 
144 144
 			case 'model':
145
-            case 'model!':
145
+			case 'model!':
146 146
 			case 'definition':
147
-            case 'definition!':
147
+			case 'definition!':
148 148
 				$definition = new Schema($this);
149 149
 				if(substr($command, -1) === '!') {
150
-				    $definition->setReadOnly();
151
-                }
150
+					$definition->setReadOnly();
151
+				}
152 152
 				$name = self::wordShift($data);
153 153
 				if (empty($name)) {
154 154
 					throw new \SwaggerGen\Exception('Missing definition name');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 			case 'definition':
147 147
             case 'definition!':
148 148
 				$definition = new Schema($this);
149
-				if(substr($command, -1) === '!') {
149
+				if (substr($command, -1) === '!') {
150 150
 				    $definition->setReadOnly();
151 151
                 }
152 152
 				$name = self::wordShift($data);
Please login to merge, or discard this patch.
SwaggerGen/SwaggerGen.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -49,11 +49,17 @@
 block discarded – undo
49 49
 		$this->dirs = $dirs;
50 50
 	}
51 51
 
52
+	/**
53
+	 * @param string $name
54
+	 */
52 55
 	public function define($name, $value = 1)
53 56
 	{
54 57
 		$this->defines[$name] = $value;
55 58
 	}
56 59
 
60
+	/**
61
+	 * @param string $name
62
+	 */
57 63
 	public function undefine($name)
58 64
 	{
59 65
 		unset($this->defines[$name]);
Please login to merge, or discard this patch.
tests/Parser/Php/ParserTest/testParse_MethodNonDoc.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@
 block discarded – undo
14 14
 class testParse_MethodNonDoc
15 15
 {
16 16
 	// @rest\method get something
17
-	public function Method1() {
17
+	public function Method1()
18
+	{
18 19
 
19 20
 	}
20 21
 }
Please login to merge, or discard this patch.
tests/Parser/Php/ParserTest/testParse_InMethod.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
 	 * Description of method
18 18
 	 * @rest\description some description
19 19
 	 */
20
-	public function Method1() {
20
+	public function Method1()
21
+	{
21 22
 		// @rest\method get something
22 23
 	}
23 24
 }
Please login to merge, or discard this patch.
tests/Parser/Php/ParserTest/testParse_NoMethods.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
 	 * Description of method
18 18
 	 * @rest\description some description
19 19
 	 */
20
-	public function Method1() {
20
+	public function Method1()
21
+	{
21 22
 
22 23
 	}
23 24
 }
Please login to merge, or discard this patch.
tests/Parser/Php/ParserTest/testParse_WithMethod.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
 	 * @rest\description some description
19 19
 	 * @rest\method get something
20 20
 	 */
21
-	public function Method1() {
21
+	public function Method1()
22
+	{
22 23
 
23 24
 	}
24 25
 }
Please login to merge, or discard this patch.
tests/Parser/Php/ParserTest/testParse_InClass.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@
 block discarded – undo
15 15
 	/**
16 16
 	 * @rest\version 2
17 17
 	 */
18
-	public function Method1() {
18
+	public function Method1()
19
+	{
19 20
 
20 21
 	}
21 22
 
Please login to merge, or discard this patch.