Skip to content
This repository
Browse code

Some code formatting

  • Loading branch information...
commit 66971875d77f80d321b21863926f8503613248e4 1 parent ad9c4e0
dluc dluc authored

Showing 44 changed files with 3 additions and 98 deletions. Show diff stats Hide diff stats

  1. +0 2  api.php
  2. +0 2  mashape/configuration/helpers/loadMethods.php
  3. +0 2  mashape/configuration/helpers/loadObjects.php
  4. +0 2  mashape/configuration/restConfiguration.php
  5. +0 2  mashape/configuration/restConfigurationLoader.php
  6. +0 2  mashape/configuration/restField.php
  7. +0 2  mashape/configuration/restMethod.php
  8. +0 2  mashape/configuration/restObject.php
  9. +0 2  mashape/exceptions/exceptionMessages.php
  10. +0 2  mashape/exceptions/mashapeException.php
  11. +0 2  mashape/init/headers.php
  12. +0 1  mashape/init/init.php
  13. +0 2  mashape/init/json.php
  14. +0 2  mashape/init/session.php
  15. +3 6 mashape/json/jsonImpl.php
  16. +0 2  mashape/json/jsonUtils.php
  17. +0 2  mashape/mashape.php
  18. +0 2  mashape/mashapeAPIError.php
  19. +0 2  mashape/methods/IMethodHandler.php
  20. +0 2  mashape/methods/call/call.php
  21. +0 2  mashape/methods/call/helpers/callHelper.php
  22. +0 2  mashape/methods/call/helpers/routeHelper.php
  23. +0 4 mashape/methods/call/helpers/serializeArray.php
  24. +0 2  mashape/methods/call/helpers/serializeMethodResult.php
  25. +0 2  mashape/methods/call/helpers/serializeObject.php
  26. +0 2  mashape/methods/call/helpers/validateParameters.php
  27. +0 3  mashape/methods/discover/discover.php
  28. +0 2  mashape/methods/discover/helpers/discoverMethods.php
  29. +0 2  mashape/methods/discover/helpers/discoverObjects.php
  30. +0 2  mashape/methods/discover/helpers/updateHtaccess.php
  31. +0 2  mashape/methods/handler.php
  32. +0 3  mashape/net/httpUtils.php
  33. +0 2  mashape/settings.php
  34. +0 4 mashape/utils/arrayUtils.php
  35. +0 3  mashape/utils/routeUtils.php
  36. +0 1  mashape/xml/xmlParser.php
  37. +0 3  mashape/xml/xmlParserUtils.php
  38. +0 2  tests/configuration/restConfigurationLoaderTest.php
  39. +0 2  tests/json/jsonImplTest.php
  40. +0 2  tests/json/jsonUtilsTest.php
  41. +0 2  tests/methods/call/helpers/callHelperTest.php
  42. +0 2  tests/methods/discover/discoverTest.php
  43. +0 2  tests/net/httpUtilsTest.php
  44. +0 2  tests/utils/arrayUtilsTest.php
2  api.php
@@ -24,5 +24,3 @@ public function sayHello($name) {
24 24
25 25 // Init the library
26 26 MashapeHandler::handleApi(new ComponentAPI(), SERVER_KEY);
27   -
28   -?>
2  mashape/configuration/helpers/loadMethods.php
@@ -157,5 +157,3 @@ function existMethod($methods, $name) {
157 157 }
158 158 return false;
159 159 }
160   -
161   -?>
2  mashape/configuration/helpers/loadObjects.php
@@ -118,5 +118,3 @@ function existFieldName($fields, $fieldName) {
118 118 }
119 119 return false;
120 120 }
121   -
122   -?>
2  mashape/configuration/restConfiguration.php
@@ -41,5 +41,3 @@ public function setObjects($x) {
41 41 $this->objects = $x;
42 42 }
43 43 }
44   -
45   -?>
2  mashape/configuration/restConfigurationLoader.php
@@ -103,5 +103,3 @@ private static function getXmlDoc($path) {
103 103 }
104 104
105 105 }
106   -
107   -?>
2  mashape/configuration/restField.php
@@ -62,5 +62,3 @@ public function setOptional($x) {
62 62 $this->optional = $x;
63 63 }
64 64 }
65   -
66   -?>
2  mashape/configuration/restMethod.php
@@ -69,5 +69,3 @@ public function isArray() {
69 69 return $this->array;
70 70 }
71 71 }
72   -
73   -?>
2  mashape/configuration/restObject.php
@@ -41,5 +41,3 @@ public function setFields($x) {
41 41 $this->fields = $x;
42 42 }
43 43 }
44   -
45   -?>
2  mashape/exceptions/exceptionMessages.php
@@ -92,5 +92,3 @@
92 92 define("EXCEPTION_INVALID_APIKEY_CODE", 2001);
93 93 define("EXCEPTION_EXCEEDED_LIMIT_CODE", 2002);
94 94 define("EXCEPTION_SYSTEM_ERROR_CODE", 2000);
95   -
96   -?>
2  mashape/exceptions/mashapeException.php
@@ -33,5 +33,3 @@ function __construct($message, $code) {
33 33 }
34 34
35 35 }
36   -
37   -?>
2  mashape/init/headers.php
@@ -35,5 +35,3 @@ function apache_request_headers() {
35 35 return $headers;
36 36 }
37 37 }
38   -
39   -?>
1  mashape/init/init.php
@@ -32,4 +32,3 @@
32 32
33 33 define("LIBRARY_LANGUAGE", "PHP");
34 34 define("LIBRARY_VERSION", "V06");
35   -?>
2  mashape/init/json.php
@@ -49,5 +49,3 @@ function json_encode($content, $assoc=false) {
49 49 return $json->encode($content);
50 50 }
51 51 }
52   -
53   -?>
2  mashape/init/session.php
@@ -26,5 +26,3 @@
26 26
27 27 // Start the session. If already started do nothing.
28 28 if (!session_id()) session_start();
29   -
30   -?>
9 mashape/json/jsonImpl.php
@@ -768,7 +768,7 @@ function isError($data, $code = null)
768 768 if (class_exists('pear')) {
769 769 return PEAR::isError($data, $code);
770 770 } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
771   - is_subclass_of($data, 'services_json_error'))) {
  771 + is_subclass_of($data, 'services_json_error'))) {
772 772 return true;
773 773 }
774 774
@@ -781,7 +781,7 @@ function isError($data, $code = null)
781 781 class Services_JSON_Error extends PEAR_Error
782 782 {
783 783 function Services_JSON_Error($message = 'unknown error', $code = null,
784   - $mode = null, $options = null, $userinfo = null)
  784 + $mode = null, $options = null, $userinfo = null)
785 785 {
786 786 parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
787 787 }
@@ -795,12 +795,9 @@ function Services_JSON_Error($message = 'unknown error', $code = null,
795 795 class Services_JSON_Error
796 796 {
797 797 function Services_JSON_Error($message = 'unknown error', $code = null,
798   - $mode = null, $options = null, $userinfo = null)
  798 + $mode = null, $options = null, $userinfo = null)
799 799 {
800 800
801 801 }
802 802 }
803   -
804 803 }
805   -
806   -?>
2  mashape/json/jsonUtils.php
@@ -54,5 +54,3 @@ public static function removeLastChar($array, $object) {
54 54 return $result;
55 55 }
56 56 }
57   -
58   -?>
2  mashape/mashape.php
@@ -76,5 +76,3 @@ public static function getErrors() {
76 76 return self::$errors;
77 77 }
78 78 }
79   -
80   -?>
2  mashape/mashapeAPIError.php
@@ -40,5 +40,3 @@ public function getMessage() {
40 40 return $this->message;
41 41 }
42 42 }
43   -
44   -?>
2  mashape/methods/IMethodHandler.php
@@ -27,5 +27,3 @@
27 27 interface IMethodHandler {
28 28 public function handle($instance, $serverKey, $parameters, $httpRequestMethod);
29 29 }
30   -
31   -?>
2  mashape/methods/call/call.php
@@ -136,6 +136,4 @@ private function validateRequest($serverKey, $token, $method, $language, $versio
136 136 }
137 137 }
138 138 }
139   -
140 139 }
141   -?>
2  mashape/methods/call/helpers/callHelper.php
@@ -61,5 +61,3 @@ function doCall($method, $parameters, $instance, $serverKey) {
61 61 $resultJson .= '}';
62 62 return $resultJson;
63 63 }
64   -
65   -?>
2  mashape/methods/call/helpers/routeHelper.php
@@ -121,5 +121,3 @@ function findRoute($requestUri, &$routeParameters, $httpRequestMethod, $serverKe
121 121
122 122 return $routeMethod;
123 123 }
124   -
125   -?>
4 mashape/methods/call/helpers/serializeArray.php
@@ -68,7 +68,3 @@ function serializeArray($result, $instance, $isSimpleResult, $serverKey) {
68 68 function checkIfSimpleResult($value) {
69 69 //if (is_string($value) || is_bool($value) || is_numeric($value) || )
70 70 }
71   -
72   -
73   -
74   -?>
2  mashape/methods/call/helpers/serializeMethodResult.php
@@ -76,5 +76,3 @@ function isSimpleResult($method) {
76 76 }
77 77 return true;
78 78 }
79   -
80   -?>
2  mashape/methods/call/helpers/serializeObject.php
@@ -120,5 +120,3 @@ function isSimpleField($field) {
120 120 $object = $field->getObject();
121 121 return empty($object);
122 122 }
123   -
124   -?>
2  mashape/methods/call/helpers/validateParameters.php
@@ -82,5 +82,3 @@ function validateCallParameters($method, $parameters, $instance) {
82 82
83 83 return $callParameters;
84 84 }
85   -
86   -?>
3  mashape/methods/discover/discover.php
@@ -94,7 +94,4 @@ private function validateRequest($serverKey) {
94 94 return false;
95 95 }
96 96 }
97   -
98 97 }
99   -
100   -?>
2  mashape/methods/discover/helpers/discoverMethods.php
@@ -108,5 +108,3 @@ function serializeParameters($method, $instance) {
108 108 $result .= ']';
109 109 return $result;
110 110 }
111   -
112   -?>
2  mashape/methods/discover/helpers/discoverObjects.php
@@ -84,5 +84,3 @@ function discoverObjects($configuration, $objectsFound) {
84 84
85 85 return $result;
86 86 }
87   -
88   -?>
2  mashape/methods/discover/helpers/updateHtaccess.php
@@ -61,5 +61,3 @@ function parseRoute($route) {
61 61 preg_match_all($pattern, $route, $matches, PREG_OFFSET_CAPTURE);
62 62 return $matches;
63 63 }
64   -
65   -?>
2  mashape/methods/handler.php
@@ -164,5 +164,3 @@ public static function handleAPI($instance, $serverKey) {
164 164 }
165 165 }
166 166 }
167   -
168   -?>
3  mashape/net/httpUtils.php
@@ -73,7 +73,4 @@ private static function getRealIpAddr()
73 73 }
74 74 return $ip;
75 75 }
76   -
77 76 }
78   -
79   -?>
2  mashape/settings.php
@@ -28,5 +28,3 @@
28 28 // By default it's "mashape_api_configuration"
29 29 define("SESSION_VARNAME", "mashape_api_configuration");
30 30 define("UID", "mashape_uid");
31   -
32   -?>
4 mashape/utils/arrayUtils.php
@@ -38,9 +38,5 @@ public function isAssociative($array) {
38 38 return false;
39 39 }
40 40 return array_keys($array) !== range(0, count($array) - 1);
41   -
42 41 }
43   -
44 42 }
45   -
46   -?>
3  mashape/utils/routeUtils.php
@@ -38,7 +38,4 @@ public static function isRoutePlaceholder($val) {
38 38 }
39 39 return false;
40 40 }
41   -
42 41 }
43   -
44   -?>
1  mashape/xml/xmlParser.php
@@ -432,4 +432,3 @@ function DeleteChildren()
432 432 }
433 433 }
434 434 }
435   -?>
3  mashape/xml/xmlParserUtils.php
@@ -39,7 +39,4 @@ public static function getChildren($document, $tagName) {
39 39 }
40 40 return $result;
41 41 }
42   -
43 42 }
44   -
45   -?>
2  tests/configuration/restConfigurationLoaderTest.php
@@ -37,5 +37,3 @@ function testLoadConfiguration() {
37 37 $this->assertEquals(0, count($configuration->getObjects()));
38 38 }
39 39 }
40   -
41   -?>
2  tests/json/jsonImplTest.php
@@ -40,5 +40,3 @@ function testSerializeError() {
40 40 $this->assertEquals($obj->code, 2);
41 41 }
42 42 }
43   -
44   -?>
2  tests/json/jsonUtilsTest.php
@@ -35,5 +35,3 @@ function testSerializeError() {
35 35 $this->assertEquals('{"errors":[{"message":"this is a \"great\" error","code":2}], "result":null}', JsonUtils::serializeError('this is a "great" error', 2));
36 36 }
37 37 }
38   -
39   -?>
2  tests/methods/call/helpers/callHelperTest.php
@@ -305,5 +305,3 @@ public function touchError() {
305 305 return null;
306 306 }
307 307 }
308   -
309   -?>
2  tests/methods/discover/discoverTest.php
@@ -55,5 +55,3 @@ public function sayHello($name) {
55 55 return "Hi, " . $name;
56 56 }
57 57 }
58   -
59   -?>
2  tests/net/httpUtilsTest.php
@@ -33,5 +33,3 @@ function testMakeHttpRequest() {
33 33 $this->assertFalse(empty($response));
34 34 }
35 35 }
36   -
37   -?>
2  tests/utils/arrayUtilsTest.php
@@ -36,5 +36,3 @@ function testIsAssociative() {
36 36 $this->assertTrue(ArrayUtils::isAssociative(array("key1"=>"value1", "key2"=>"value2")));
37 37 }
38 38 }
39   -
40   -?>

0 comments on commit 6697187

Please sign in to comment.
Something went wrong with that request. Please try again.