Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove closing php tags in php class files in addition to all trailing whitespace. #258

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
244 changes: 122 additions & 122 deletions LICENSE.TXT

Large diffs are not rendered by default.

115 changes: 57 additions & 58 deletions QuickBooks.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<?php

/**
* QuickBooks PHP DevKit
*
*
* Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/eclipse-1.0.php
*
*
* See also:
* http://wiki.consolibyte.com/
*
*
* Some notes:
* - Go download the QuickBooks SDK (it has lots of helpful stuff in it)
* - Go download the QuickBooks SDK (it has lots of helpful stuff in it)
* - Onscreen Reference (shows all of the XML commands)
* - Tools > qbXML Validator (the QuickBooks Web Connector error log shows almost no debugging information, run your XML through the Validator and it will tell you *exactly* what the error in your XML stream is)
* - Your version of QuickBooks might not support the latest version of the qbXML SDK, so you might have to set the qbXML message version with: <?qbxml version="x.y"?> (try 2.0 or another low number if you get error messages about versions)
* - Check our the QuickBooks_Utilities class, it contains a few helpful static methods
*
*
* @author Keith Palmer <[email protected]>
* @license LICENSE.txt
*
* @license LICENSE.txt
*
* @package QuickBooks
*/

/**
*
*
*/
define('QUICKBOOKS_TIMESTAMP', microtime(true));

/**
*
*
*/
define('QUICKBOOKS_BASEDIR', dirname(__FILE__));

Expand All @@ -47,28 +47,28 @@
if (function_exists('date_default_timezone_get'))
{
@date_default_timezone_get();
if (function_exists('error_get_last') and
$arrerr = error_get_last() and

if (function_exists('error_get_last') and
$arrerr = error_get_last() and
substr($arrerr['message'], 0, strlen('date_default_timezone_get')) == 'date_default_timezone_get')
{
// Ooops, they never set their time-zone and PHP is warning them about
// this! Let's try to auto-set their timezone, and set a flag so that
// they can find out what's going wrong later.
// Ooops, they never set their time-zone and PHP is warning them about
// this! Let's try to auto-set their timezone, and set a flag so that
// they can find out what's going wrong later.

/**
*
*
*/
define('QUICKBOOKS_TIMEZONE_AUTOSET', true);

date_default_timezone_set('America/New_York');
}
}

if (!defined('QUICKBOOKS_TIMEZONE_AUTOSET'))
{
/**
*
*
*/
define('QUICKBOOKS_TIMEZONE_AUTOSET', false);
}
Expand All @@ -92,7 +92,7 @@
define('QUICKBOOKS_PACKAGE_NAME', 'QuickBooks PHP DevKit');

/**
* The version of this QuickBooks package
* The version of this QuickBooks package
* @var string
*/
define('QUICKBOOKS_PACKAGE_VERSION', '3.0');
Expand Down Expand Up @@ -136,7 +136,7 @@
if (!defined('QUICKBOOKS_WSDL'))
{
/**
* Path to the QuickBooks WSDL file (the default WSDL is included with this package, you shouldn't need to override this generally)
* Path to the QuickBooks WSDL file (the default WSDL is included with this package, you shouldn't need to override this generally)
* @var string
*/
define('QUICKBOOKS_WSDL', dirname(__FILE__) . '/QuickBooks/QBWebConnectorSvc.wsdl');
Expand All @@ -155,7 +155,7 @@
{
/**
* Debug log (unsupported?)
*
*
* @deprecated
* @var string
*/
Expand Down Expand Up @@ -204,12 +204,12 @@
*/

/**
*
*
*/
define('QUICKBOOKS_TYPE_QBFS', 'QBFS');

/**
*
*
*/
define('QUICKBOOKS_TYPE_QBPOS', 'QBPOS');

Expand All @@ -225,9 +225,9 @@

define('QUICKBOOKS_SUPPORTED_DEFAULT', '');
define('QUICKBOOKS_SUPPORTED_ALL', '0x0');
define('QUICKBOOKS_SUPPORTED_SIMPLESTART', '0x1');
define('QUICKBOOKS_SUPPORTED_PRO', '0x2');
define('QUICKBOOKS_SUPPORTED_PREMIER', '0x4');
define('QUICKBOOKS_SUPPORTED_SIMPLESTART', '0x1');
define('QUICKBOOKS_SUPPORTED_PRO', '0x2');
define('QUICKBOOKS_SUPPORTED_PREMIER', '0x4');
define('QUICKBOOKS_SUPPORTED_ENTERPRISE', '0x8');

define('QUICKBOOKS_PERSONALDATA_DEFAULT', '');
Expand Down Expand Up @@ -267,17 +267,17 @@

/**
* QuickBooks flag to request to enter "Interactive Mode"
*
*
* *** DO NOT CHANGE THIS *** This is a required QuickBooks-defined constant that is neccessary for interactive mode requests
*
*
* @var string
*/
/*
define('QUICKBOOKS_INTERACTIVE_MODE', 'Interactive mode');
*/

/**
*
*
*/
define('QUICKBOOKS_NOOP', 'NoOp');

Expand Down Expand Up @@ -506,10 +506,10 @@

/**
* Job constant in QuickBooks
*
* In actuality, there are no such thing as "Jobs" in QuickBooks. Jobs in
* QuickBooks are handled as customers with parent customers.
*
*
* In actuality, there are no such thing as "Jobs" in QuickBooks. Jobs in
* QuickBooks are handled as customers with parent customers.
*
* @var string
*/
define('QUICKBOOKS_OBJECT_JOB', 'Job');
Expand Down Expand Up @@ -758,7 +758,7 @@
define('QUICKBOOKS_DELETE_LIST', QUICKBOOKS_DEL_LIST);

/**
*
*
*/
define('QUICKBOOKS_OBJECT_TIMETRACKING', 'TimeTracking');
define('QUICKBOOKS_ADD_TIMETRACKING','TimeTrackingAdd');
Expand Down Expand Up @@ -826,15 +826,15 @@
define('QUICKBOOKS_IMPORT_UNITOFMEASURESET', 'UnitOfMeasureSetImport');

/**
* An always-present QuickBooks constant for "TAXABLE" items to embed in "SalesTaxCodeRef FullName" qbXML values
*
* An always-present QuickBooks constant for "TAXABLE" items to embed in "SalesTaxCodeRef FullName" qbXML values
*
* @var string
*/
define('QUICKBOOKS_TAXABLE', 'TAX');

/**
* An always-present QuickBooks constant for "NON-TAXABLE" items to embed in "SalesTaxCodeRef FullName" qbXML values
*
*
* @var string
*/
define('QUICKBOOKS_NONTAXABLE', 'NON');
Expand Down Expand Up @@ -874,10 +874,10 @@
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_PETTYCASH', 'PettyCash');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_PURCHASEORDERS', 'PurchaseOrders');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_RECONCILIATIONDIFFERENCES', 'ReconciliationDifferences');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_RETAINEDEARNINGS', 'RetainedEarnings');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_RETAINEDEARNINGS', 'RetainedEarnings');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_SALESORDERS', 'SalesOrders');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_SALESTAXPAYABLE', 'SalesTaxPayable');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNCATEGORIZEDEXPENSES', 'UncategorizedExpenses');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNCATEGORIZEDEXPENSES', 'UncategorizedExpenses');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNCATEGORIZEDINCOME', 'UncategorizedIncome');
define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNDEPOSITEDFUNDS', 'UndepositedFunds');

Expand All @@ -891,10 +891,10 @@

define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASURETYPE_AREA', 'Area');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_COUNT', 'Count');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_LENGTH', 'Length');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_OTHER', 'Other');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_LENGTH', 'Length');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_OTHER', 'Other');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_TIME', 'Time');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_VOLUME', 'Volume');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_VOLUME', 'Volume');
define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_WEIGHT', 'Weight');

define('QUICKBOOKS_REPORT_GENERAL_SUMMARY', 'GeneralSummaryReportQuery');
Expand Down Expand Up @@ -951,7 +951,7 @@
define('QUICKBOOKS_STATUS_NOOP', 'n');

/**
* Error code for errors that are not really errors...
* Error code for errors that are not really errors...
* @var integer
*/
define('QUICKBOOKS_ERROR_OK', 0);
Expand Down Expand Up @@ -993,7 +993,7 @@
define('QUICKBOOKS_USER_DISABLED', 'd');

/**
*
*
*/
require_once QUICKBOOKS_BASEDIR . '/QuickBooks/Loader.php';

Expand All @@ -1011,7 +1011,7 @@
if (!defined('QUICKBOOKS_FRAMEWORKS'))
{
$all = 0;

$constants = get_defined_constants(true);
foreach ($constants['user'] as $constant => $value)
{
Expand All @@ -1020,19 +1020,19 @@
$all = $all | $value;
}
}

/**
* Determines which frameworks are included (if not defined, this defines it to include *everything*)
* @var integer
*/
define('QUICKBOOKS_FRAMEWORKS', $all);
}

if (QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_QUEUE or
if (QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_QUEUE or
QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_WEBCONNECTOR)
{
/**
* Queue class for QuickBooks queueing
* Queue class for QuickBooks queueing
*/
QuickBooks_Loader::load('/QuickBooks/WebConnector/Queue.php');
}
Expand All @@ -1043,12 +1043,12 @@
* SOAP server for QuickBooks web services
*/
QuickBooks_Loader::load('/QuickBooks/WebConnector/Server.php');

/**
* Web Connector generation
*/
QuickBooks_Loader::load('/QuickBooks/WebConnector/QWC.php');

/**
* Various QuickBooks utility classes
*/
Expand All @@ -1058,13 +1058,13 @@
if (QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_IPP)
{
/**
*
*
*/
QuickBooks_Loader::load('/QuickBooks/IPP.php');
}

if (QUICKBOOKS_FRAMEWORK_MISCELLANEOUS & QUICKBOOKS_FRAMEWORKS or
QUICKBOOKS_FRAMEWORK_ONLINEEDITION & QUICKBOOKS_FRAMEWORKS or
if (QUICKBOOKS_FRAMEWORK_MISCELLANEOUS & QUICKBOOKS_FRAMEWORKS or
QUICKBOOKS_FRAMEWORK_ONLINEEDITION & QUICKBOOKS_FRAMEWORKS or
QUICKBOOKS_FRAMEWORK_MERCHANTSERVICE & QUICKBOOKS_FRAMEWORKS)
{
/**
Expand All @@ -1076,15 +1076,15 @@
if (QUICKBOOKS_FRAMEWORK_CONSTANTS != QUICKBOOKS_FRAMEWORKS)
{
/**
* Functions for calling callback functions
* Functions for calling callback functions
*/
QuickBooks_Loader::load('/QuickBooks/Callbacks.php');
}

if (QUICKBOOKS_FRAMEWORK_MISCELLANEOUS & QUICKBOOKS_FRAMEWORKS)
{
/**
* Utilities for ensuring values fit into qbXML fields
* Utilities for ensuring values fit into qbXML fields
*/
QuickBooks_Loader::load('/QuickBooks/Cast.php');
}
Expand All @@ -1108,4 +1108,3 @@
// Objects for the API
QuickBooks_Loader::import('/QuickBooks/QBXML/Object');
}

20 changes: 10 additions & 10 deletions QuickBooks/Adapter/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@

/**
* Client adapter base class
*
*
* Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/eclipse-1.0.php
*
*
* @author Keith Palmer <[email protected]>
* @license LICENSE.txt
*
*
* @package QuickBooks
* @subpackage Adapter
*/

/**
*
*
*/
interface QuickBooks_Adapter_Client
{
public function __construct($endpoint, $wsdl = QUICKBOOKS_WSDL, $trace = true);

public function authenticate($user, $pass);

public function sendRequestXML($ticket, $hcpresponse, $companyfile, $country, $majorversion, $minorversion);

public function receiveResponseXML($ticket, $response, $hresult, $message);

public function getLastRequest();

public function getLastResponse();

}
Loading