Skip to content

Commit

Permalink
[PSR2] fix code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
malkusch committed Jan 13, 2015
1 parent d555a94 commit 7e77580
Show file tree
Hide file tree
Showing 40 changed files with 116 additions and 118 deletions.
2 changes: 1 addition & 1 deletion bin/bav-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
} catch (DataBackendException $error) {
die("Installation failed: {$error->getMessage()}\n");

}
}
2 changes: 1 addition & 1 deletion bin/bav-uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
} catch (DataBackendException $error) {
die("Deinstallation failed: {$error->getMessage()}\n");

}
}
2 changes: 1 addition & 1 deletion bin/bav-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
} catch (DataBackendException $error) {
die("Installation failed: {$error->getMessage()}\n");

}
}
28 changes: 14 additions & 14 deletions classes/BAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

/**
* Facade for BAV's API.
*
*
* This class provides methods for validation of German bank accounts.
*
*
* If you don't inject a {@link Configuration} the facade will use the
* {@link ConfigurationRegistry}. The registry provides per default the
* {@link DefaultConfiguration}.
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand All @@ -37,10 +37,10 @@ class BAV

/**
* Inject the configuration.
*
*
* If the $configuration is null the configuration from
* {@link ConfigurationRegistry::getConfiguration()} will be used.
*
*
* @see ConfigurationRegistry
*/
public function __construct(Configuration $configuration = null)
Expand Down Expand Up @@ -69,9 +69,9 @@ public function getDataBackend()
/**
* Updates bav with a new bundesbank file.
*
* You might consider enabling automatic update with setting
* You might consider enabling automatic update with setting
* AutomaticUpdatePlan as configuration.
*
*
* @see AutomaticUpdatePlan
* @see Configuration::setUpdatePlan()
* @throws DataBackendException
Expand Down Expand Up @@ -106,7 +106,7 @@ public function isValidBankAccount($bankID, $account)

/**
* Returns true if the account is valid for the current context.
*
*
* You have to have called isValidBank() before! If the current context
* is no valid bank every account will validate to true.
*
Expand Down Expand Up @@ -136,7 +136,7 @@ public function isValidBank($bankID)

/**
* Every bank has one main agency.
*
*
* This agency is not included in getAgencies().
*
* @throws DataBackendException
Expand All @@ -153,7 +153,7 @@ public function getMainAgency($bankID)

/**
* A bank may have more agencies.
*
*
* The main agency is not included in this list.
*
* @param string $bankID Bank id (Bankleitzahl)
Expand Down Expand Up @@ -207,9 +207,9 @@ public function isValidBIC($bic)
/**
* Returns the third call back parameter for filter_var() for validating
* a bank.
*
*
* filter_var($bankID, FILTER_CALLBACK, $bav->getValidBankFilterCallback());
*
*
* @return array
* @see isValidBank()
* @see filter_var()
Expand All @@ -222,9 +222,9 @@ public function getValidBankFilterCallback()
/**
* Returns the third call back parameter for filter_var() for validating
* a bank account.
*
*
* filter_var($account, FILTER_CALLBACK, $bav->getValidBankFilterCallback());
*
*
* @return array
* @see isValidAccount()
* @see filter_var()
Expand Down
2 changes: 1 addition & 1 deletion classes/bank/Agency.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* The bank agency.
*
*
* Every bank has one main agency and may have some more agencies
* in different cities.
*
Expand Down
14 changes: 7 additions & 7 deletions classes/configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Configuration
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand Down Expand Up @@ -41,7 +41,7 @@ class Configuration

/**
* Sets the update plan.
*
*
* Set to null if you don't want to use an update plan.
*/
public function setUpdatePlan(UpdatePlan $updatePlan = null)
Expand All @@ -61,10 +61,10 @@ public function getUpdatePlan()

/**
* Turns automatic installation on or off.
*
*
* If automatic installation is activated {@link DataBackendContainer} will
* check if it is installed and if not install the backend.
*
*
* @see DataBackend::install()
* @param bool $automaticInstallation Set true to turn installation on
*/
Expand Down Expand Up @@ -121,12 +121,12 @@ public function getEncoding()

/**
* Sets the temporary directory.
*
*
* If you set a temporary directory BAV will use this for temporary files.
* This option is optional. If it is not set the system's path will be used.
*
*
* The temporary directory is used for the installation and update process.
*
*
* @param string $tempDirectory
*/
public function setTempDirectory($tempDirectory)
Expand Down
2 changes: 1 addition & 1 deletion classes/configuration/ConfigurationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Configuration exception
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand Down
8 changes: 4 additions & 4 deletions classes/configuration/ConfigurationLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Helper for locating a BAV configuration.
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand All @@ -20,9 +20,9 @@ class ConfigurationLocator

/**
* Sets the paths where a location is expected.
*
*
* Those paths may be relative to the include_path.
*
*
* @param string[] $paths
*/
public function __construct($paths = array())
Expand All @@ -32,7 +32,7 @@ public function __construct($paths = array())

/**
* Locates a configuration.
*
*
* @return Configuration|null
* @throws ConfigurationException
*/
Expand Down
22 changes: 11 additions & 11 deletions classes/configuration/ConfigurationRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@

/**
* Registry for the configuration
*
* BAV uses this static container for its runtime configuration. Per default the
*
* BAV uses this static container for its runtime configuration. Per default the
* registry is initialized with the {@link DefaultConfiguration}. You can
* set your own configuration with {@link setConfiguration()} or preferably
* by providing the file bav/configuration.php. This file should return a
* {@link Configuration} object:
*
*
* <code>
* <?php
*
*
* namespace malkusch\bav;
*
*
* $configuration = new DefaultConfiguration();
*
*
* $pdo = new \PDO("mysql:host=localhost;dbname=test");
* $configuration->setDataBackendContainer(new PDODataBackendContainer($pdo));
*
*
* $configuration->setUpdatePlan(new AutomaticUpdatePlan());
*
* return $configuration;
* </code>
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand All @@ -46,10 +46,10 @@ class ConfigurationRegistry

/**
* locate a configuration or register the default configuration.
*
*
* You may define the file bav/configuration.php. This file should return
* a Configuration object.
*
*
* @see DefaultConfiguration
* @throws ConfigurationException
*/
Expand All @@ -69,7 +69,7 @@ public static function classConstructor()

/**
* Register a configuration programmatically.
*
*
* Alternatively you can provide the file bav/configuration.php which
* returns a {@link Configuration} object.
*/
Expand Down
6 changes: 3 additions & 3 deletions classes/configuration/DefaultConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/**
* Default configuration uses {@link FileDataBackendContainer}
* and any available UTF-8 encoder.
*
*
* Automatic installation is enabled.
*
*
* The update plan is set to {@link LogUpdatePlan}
*
*
* If no UTF-8 encoding is supported ISO-8859-15 will be used.
*
* @author Markus Malkusch <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions classes/dataBackend/DataBackendContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Container for DataBackend objects.
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand Down Expand Up @@ -37,7 +37,7 @@ abstract protected function makeDataBackend();
*
* If configured this method would automatically install the backend. I.e. a first
* call will take some amount of time.
*
*
* @return DataBackend
* @throws DataBackendException
*/
Expand Down Expand Up @@ -77,7 +77,7 @@ public function applyUpdatePlan(DataBackend $backend)
/**
* Returns a configured data backend.
*
* If configured this method would automatically install and update the backend. I.e.
* If configured this method would automatically install and update the backend. I.e.
* some calls might take longer.
*
* @see Configuration::setAutomaticInstallation()
Expand Down
2 changes: 1 addition & 1 deletion classes/dataBackend/exception/InvalidContextException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Missing context during context validation
*
*
* @see ContextValidation
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
Expand Down
4 changes: 2 additions & 2 deletions classes/dataBackend/file/FileDataBackendContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Container for FileDataBackend objects.
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand All @@ -21,7 +21,7 @@ class FileDataBackendContainer extends DataBackendContainer

/**
* Sets the path for the backend.
*
*
* @param string $file Path to the bundesbank file
*/
public function __construct($file = null)
Expand Down
4 changes: 2 additions & 2 deletions classes/dataBackend/file/download/Downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Downloads an URI
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand Down Expand Up @@ -58,7 +58,7 @@ private function download($uri)

/**
* Downloads the content of an URI
*
*
* @param string $uri URI
* @return string Content of the page
* @throws DownloaderException
Expand Down
4 changes: 2 additions & 2 deletions classes/dataBackend/file/download/uripicker/DOMURIPicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Finds the download URI in the Bundesbank HTML page with XPath.
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand All @@ -24,7 +24,7 @@ public function isAvailable()

/**
* Returns the download URI from the Bundesbank html page.
*
*
* @throws URIPickerException
* @return string
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Finds the download URI in the Bundesbank HTML page with any URI picker.
*
*
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @license WTFPL
Expand Down Expand Up @@ -47,7 +47,7 @@ public function isAvailable()

/**
* Returns the download URI from the Bundesbank html page.
*
*
* @throws URIPickerException
* @return string
*/
Expand Down
Loading

0 comments on commit 7e77580

Please sign in to comment.