From: Roland Häder Date: Wed, 3 May 2017 16:05:20 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=da5291226d3b33102754943711ba4d6e29376ebe Continued: - the word "Default" and "Array" is not possible to use alone in namespace like <-- yes, discouraged. just to clearify end-of-php - some math stuff "fixed". - removed discouraged headers from all remaining scripts Signed-off-by: Roland Häder --- diff --git a/application/tests/loader.php b/application/tests/loader.php index f551ef47..7d6dceec 100644 --- a/application/tests/loader.php +++ b/application/tests/loader.php @@ -1,3 +1,2 @@ diff --git a/contrib/benchmarks/array_serialization.php b/contrib/benchmarks/array_serialization.php index 5f477667..588af616 100644 --- a/contrib/benchmarks/array_serialization.php +++ b/contrib/benchmarks/array_serialization.php @@ -33,5 +33,3 @@ for ($idx = 0; $idx < $iter; $idx++) { $diff2 = microtime(TRUE) - $time; print 'diff1=' . $diff1 . ',diff2=' . $diff2 . PHP_EOL; - -?> diff --git a/contrib/exp/exp1.php b/contrib/exp/exp1.php index 6ffd1a00..c750e12c 100644 --- a/contrib/exp/exp1.php +++ b/contrib/exp/exp1.php @@ -16,5 +16,3 @@ for ($i = 1; $i <= $totalDays; $i++) { print 'After ' . $totalDays . ' days (' . $years . ' years) you have eaten ' . $y . ' fruits.' . PHP_EOL; print 'Length:' . strlen($y) . PHP_EOL; - -?> diff --git a/contrib/exp/exp2.php b/contrib/exp/exp2.php index b6040fc5..d83a33c6 100644 --- a/contrib/exp/exp2.php +++ b/contrib/exp/exp2.php @@ -4,8 +4,8 @@ error_reporting(E_ALL | E_STRICT); bcscale(20); $balance = 1; -$years = 100; -$rate = 0.02; +$years = 2017; +$rate = 0.03; $totalMonths = $years * 12; @@ -13,7 +13,7 @@ print 'Invest ' . $balance . ' EUR and come back later.' . PHP_EOL; for ($i = 1; $i <= $totalMonths; $i++) { // Reduce interest rate every month - $rate = bcdiv($rate, 1.001); + $rate = bcdiv($rate, 1.00001); // Calculate interest $interest = bcmul($balance, $rate); @@ -26,5 +26,3 @@ for ($i = 1; $i <= $totalMonths; $i++) { print 'After ' . $totalMonths . ' months (' . $years . ' years) you have ' . $balance . ' EUR back.' . PHP_EOL; //print 'Length:' . strlen($balance) . PHP_EOL; - -?> diff --git a/contrib/fib/fib.php b/contrib/fib/fib.php index 554557fa..c0232b99 100644 --- a/contrib/fib/fib.php +++ b/contrib/fib/fib.php @@ -16,5 +16,3 @@ for ($idx = 0; $idx < 100000; $idx++) { $prev = $fib; $fib = $sum; } - -?> diff --git a/framework/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php index 6f53a015..7ee612bd 100644 --- a/framework/bootstrap/class_FrameworkBootstrap.php +++ b/framework/bootstrap/class_FrameworkBootstrap.php @@ -57,7 +57,7 @@ final class FrameworkBootstrap { * * --foo=bar - parameter 'foo' gets value "bar" (string) * --enable-foo=true - parameter 'enableFoo' gets value true (boolean) - * --baz=123 - parameter 'baz' get value 123 (interger) + * --baz=123 - parameter 'baz' get value 123 (integer) * * The same also works without 2 dashes as it was possible before: * diff --git a/framework/classes.php b/framework/classes.php index f551ef47..7d6dceec 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -1,3 +1,2 @@ diff --git a/framework/config/config-hubmaster.php b/framework/config/config-hubmaster.php index f551ef47..7d6dceec 100644 --- a/framework/config/config-hubmaster.php +++ b/framework/config/config-hubmaster.php @@ -1,3 +1,2 @@ diff --git a/framework/main/classes/class_FrameworkArrayObject.php b/framework/main/classes/class_FrameworkArrayObject.php index a6fa8bea..63e8f571 100644 --- a/framework/main/classes/class_FrameworkArrayObject.php +++ b/framework/main/classes/class_FrameworkArrayObject.php @@ -1,6 +1,6 @@ . */ -public class FrameworkFuseWrapper extends FuseWrapper implements Registerable { +class FrameworkFuseWrapper extends FuseWrapper implements Registerable { /** * Get attributes * diff --git a/framework/main/exceptions/main/class_IndexOutOfBoundsException.php b/framework/main/exceptions/main/class_IndexOutOfBoundsException.php index 90a7cc81..8c8bde0d 100644 --- a/framework/main/exceptions/main/class_IndexOutOfBoundsException.php +++ b/framework/main/exceptions/main/class_IndexOutOfBoundsException.php @@ -1,6 +1,6 @@ diff --git a/tests/RegistryTest.php b/tests/RegistryTest.php index 89b18a3f..4807b416 100644 --- a/tests/RegistryTest.php +++ b/tests/RegistryTest.php @@ -90,5 +90,3 @@ class RegistryTest extends PHPUnit_Framework_TestCase { } } } - -?> diff --git a/tests/RequestTest.php b/tests/RequestTest.php index 81a9da8a..784239f1 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -98,5 +98,3 @@ class RequestTest extends PHPUnit_Framework_TestCase { } } } - -?> diff --git a/tests/Test.php b/tests/Test.php index 6783f7f7..f9f1952f 100644 --- a/tests/Test.php +++ b/tests/Test.php @@ -50,5 +50,3 @@ die("You need to remove this line (".__LINE__.") and implement this test!\n"); */ class Test extends PHPUnit_Framework_TestCase { } - -?> diff --git a/tests/old/contract-test.php b/tests/old/contract-test.php index 5ddac047..962719d6 100644 --- a/tests/old/contract-test.php +++ b/tests/old/contract-test.php @@ -347,6 +347,3 @@ $totalBeds = $contract->getShipInstance()->calcTotalBeds(); DebugMiddleware::getInstance()->output(sprintf("Es stehen %d Betten zur Verfügung.", $totalBeds )); - -// -?> diff --git a/tests/old/loader-test.php b/tests/old/loader-test.php index ae0fc99c..aea6638c 100644 --- a/tests/old/loader-test.php +++ b/tests/old/loader-test.php @@ -55,6 +55,3 @@ if (defined('DEBUG_PERSONELL_OBJ')) { // Try to save the object (for testing purposes) $personell->saveObjectToDatabase(); - -// -?> diff --git a/tests/old/personell-test.php b/tests/old/personell-test.php index cd1f48cd..ab78f525 100644 --- a/tests/old/personell-test.php +++ b/tests/old/personell-test.php @@ -55,6 +55,3 @@ if (defined('DEBUG_PERSONELL_OBJ')) { // Try to save the object (for testing purposes) $personell->saveObjectToDatabase(); - -// -?>