Skip to content

Commit

Permalink
Some code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dluc committed Mar 6, 2011
1 parent ad9c4e0 commit 6697187
Show file tree
Hide file tree
Showing 44 changed files with 3 additions and 98 deletions.
2 changes: 0 additions & 2 deletions api.php
Expand Up @@ -24,5 +24,3 @@ public function sayHello($name) {

// Init the library
MashapeHandler::handleApi(new ComponentAPI(), SERVER_KEY);

?>
2 changes: 0 additions & 2 deletions mashape/configuration/helpers/loadMethods.php
Expand Up @@ -157,5 +157,3 @@ function existMethod($methods, $name) {
}
return false;
}

?>
2 changes: 0 additions & 2 deletions mashape/configuration/helpers/loadObjects.php
Expand Up @@ -118,5 +118,3 @@ function existFieldName($fields, $fieldName) {
}
return false;
}

?>
2 changes: 0 additions & 2 deletions mashape/configuration/restConfiguration.php
Expand Up @@ -41,5 +41,3 @@ public function setObjects($x) {
$this->objects = $x;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/configuration/restConfigurationLoader.php
Expand Up @@ -103,5 +103,3 @@ private static function getXmlDoc($path) {
}

}

?>
2 changes: 0 additions & 2 deletions mashape/configuration/restField.php
Expand Up @@ -62,5 +62,3 @@ public function setOptional($x) {
$this->optional = $x;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/configuration/restMethod.php
Expand Up @@ -69,5 +69,3 @@ public function isArray() {
return $this->array;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/configuration/restObject.php
Expand Up @@ -41,5 +41,3 @@ public function setFields($x) {
$this->fields = $x;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/exceptions/exceptionMessages.php
Expand Up @@ -92,5 +92,3 @@
define("EXCEPTION_INVALID_APIKEY_CODE", 2001);
define("EXCEPTION_EXCEEDED_LIMIT_CODE", 2002);
define("EXCEPTION_SYSTEM_ERROR_CODE", 2000);

?>
2 changes: 0 additions & 2 deletions mashape/exceptions/mashapeException.php
Expand Up @@ -33,5 +33,3 @@ function __construct($message, $code) {
}

}

?>
2 changes: 0 additions & 2 deletions mashape/init/headers.php
Expand Up @@ -35,5 +35,3 @@ function apache_request_headers() {
return $headers;
}
}

?>
1 change: 0 additions & 1 deletion mashape/init/init.php
Expand Up @@ -32,4 +32,3 @@

define("LIBRARY_LANGUAGE", "PHP");
define("LIBRARY_VERSION", "V06");
?>
2 changes: 0 additions & 2 deletions mashape/init/json.php
Expand Up @@ -49,5 +49,3 @@ function json_encode($content, $assoc=false) {
return $json->encode($content);
}
}

?>
2 changes: 0 additions & 2 deletions mashape/init/session.php
Expand Up @@ -26,5 +26,3 @@

// Start the session. If already started do nothing.
if (!session_id()) session_start();

?>
9 changes: 3 additions & 6 deletions mashape/json/jsonImpl.php
Expand Up @@ -768,7 +768,7 @@ function isError($data, $code = null)
if (class_exists('pear')) {
return PEAR::isError($data, $code);
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
is_subclass_of($data, 'services_json_error'))) {
is_subclass_of($data, 'services_json_error'))) {
return true;
}

Expand All @@ -781,7 +781,7 @@ function isError($data, $code = null)
class Services_JSON_Error extends PEAR_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
$mode = null, $options = null, $userinfo = null)
{
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
}
Expand All @@ -795,12 +795,9 @@ function Services_JSON_Error($message = 'unknown error', $code = null,
class Services_JSON_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
$mode = null, $options = null, $userinfo = null)
{

}
}

}

?>
2 changes: 0 additions & 2 deletions mashape/json/jsonUtils.php
Expand Up @@ -54,5 +54,3 @@ public static function removeLastChar($array, $object) {
return $result;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/mashape.php
Expand Up @@ -76,5 +76,3 @@ public static function getErrors() {
return self::$errors;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/mashapeAPIError.php
Expand Up @@ -40,5 +40,3 @@ public function getMessage() {
return $this->message;
}
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/IMethodHandler.php
Expand Up @@ -27,5 +27,3 @@
interface IMethodHandler {
public function handle($instance, $serverKey, $parameters, $httpRequestMethod);
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/call/call.php
Expand Up @@ -136,6 +136,4 @@ private function validateRequest($serverKey, $token, $method, $language, $versio
}
}
}

}
?>
2 changes: 0 additions & 2 deletions mashape/methods/call/helpers/callHelper.php
Expand Up @@ -61,5 +61,3 @@ function doCall($method, $parameters, $instance, $serverKey) {
$resultJson .= '}';
return $resultJson;
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/call/helpers/routeHelper.php
Expand Up @@ -121,5 +121,3 @@ function findRoute($requestUri, &$routeParameters, $httpRequestMethod, $serverKe

return $routeMethod;
}

?>
4 changes: 0 additions & 4 deletions mashape/methods/call/helpers/serializeArray.php
Expand Up @@ -68,7 +68,3 @@ function serializeArray($result, $instance, $isSimpleResult, $serverKey) {
function checkIfSimpleResult($value) {
//if (is_string($value) || is_bool($value) || is_numeric($value) || )
}



?>
2 changes: 0 additions & 2 deletions mashape/methods/call/helpers/serializeMethodResult.php
Expand Up @@ -76,5 +76,3 @@ function isSimpleResult($method) {
}
return true;
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/call/helpers/serializeObject.php
Expand Up @@ -120,5 +120,3 @@ function isSimpleField($field) {
$object = $field->getObject();
return empty($object);
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/call/helpers/validateParameters.php
Expand Up @@ -82,5 +82,3 @@ function validateCallParameters($method, $parameters, $instance) {

return $callParameters;
}

?>
3 changes: 0 additions & 3 deletions mashape/methods/discover/discover.php
Expand Up @@ -94,7 +94,4 @@ private function validateRequest($serverKey) {
return false;
}
}

}

?>
2 changes: 0 additions & 2 deletions mashape/methods/discover/helpers/discoverMethods.php
Expand Up @@ -108,5 +108,3 @@ function serializeParameters($method, $instance) {
$result .= ']';
return $result;
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/discover/helpers/discoverObjects.php
Expand Up @@ -84,5 +84,3 @@ function discoverObjects($configuration, $objectsFound) {

return $result;
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/discover/helpers/updateHtaccess.php
Expand Up @@ -61,5 +61,3 @@ function parseRoute($route) {
preg_match_all($pattern, $route, $matches, PREG_OFFSET_CAPTURE);
return $matches;
}

?>
2 changes: 0 additions & 2 deletions mashape/methods/handler.php
Expand Up @@ -164,5 +164,3 @@ public static function handleAPI($instance, $serverKey) {
}
}
}

?>
3 changes: 0 additions & 3 deletions mashape/net/httpUtils.php
Expand Up @@ -73,7 +73,4 @@ private static function getRealIpAddr()
}
return $ip;
}

}

?>
2 changes: 0 additions & 2 deletions mashape/settings.php
Expand Up @@ -28,5 +28,3 @@
// By default it's "mashape_api_configuration"
define("SESSION_VARNAME", "mashape_api_configuration");
define("UID", "mashape_uid");

?>
4 changes: 0 additions & 4 deletions mashape/utils/arrayUtils.php
Expand Up @@ -38,9 +38,5 @@ public function isAssociative($array) {
return false;
}
return array_keys($array) !== range(0, count($array) - 1);

}

}

?>
3 changes: 0 additions & 3 deletions mashape/utils/routeUtils.php
Expand Up @@ -38,7 +38,4 @@ public static function isRoutePlaceholder($val) {
}
return false;
}

}

?>
1 change: 0 additions & 1 deletion mashape/xml/xmlParser.php
Expand Up @@ -432,4 +432,3 @@ function DeleteChildren()
}
}
}
?>
3 changes: 0 additions & 3 deletions mashape/xml/xmlParserUtils.php
Expand Up @@ -39,7 +39,4 @@ public static function getChildren($document, $tagName) {
}
return $result;
}

}

?>
2 changes: 0 additions & 2 deletions tests/configuration/restConfigurationLoaderTest.php
Expand Up @@ -37,5 +37,3 @@ function testLoadConfiguration() {
$this->assertEquals(0, count($configuration->getObjects()));
}
}

?>
2 changes: 0 additions & 2 deletions tests/json/jsonImplTest.php
Expand Up @@ -40,5 +40,3 @@ function testSerializeError() {
$this->assertEquals($obj->code, 2);
}
}

?>
2 changes: 0 additions & 2 deletions tests/json/jsonUtilsTest.php
Expand Up @@ -35,5 +35,3 @@ function testSerializeError() {
$this->assertEquals('{"errors":[{"message":"this is a \"great\" error","code":2}], "result":null}', JsonUtils::serializeError('this is a "great" error', 2));
}
}

?>
2 changes: 0 additions & 2 deletions tests/methods/call/helpers/callHelperTest.php
Expand Up @@ -305,5 +305,3 @@ public function touchError() {
return null;
}
}

?>
2 changes: 0 additions & 2 deletions tests/methods/discover/discoverTest.php
Expand Up @@ -55,5 +55,3 @@ public function sayHello($name) {
return "Hi, " . $name;
}
}

?>
2 changes: 0 additions & 2 deletions tests/net/httpUtilsTest.php
Expand Up @@ -33,5 +33,3 @@ function testMakeHttpRequest() {
$this->assertFalse(empty($response));
}
}

?>
2 changes: 0 additions & 2 deletions tests/utils/arrayUtilsTest.php
Expand Up @@ -36,5 +36,3 @@ function testIsAssociative() {
$this->assertTrue(ArrayUtils::isAssociative(array("key1"=>"value1", "key2"=>"value2")));
}
}

?>

0 comments on commit 6697187

Please sign in to comment.