From 08227915e99f2ebdc8a109f39326b2a316366dbf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 8 Mar 2008 13:47:58 +0000 Subject: [PATCH] type hints added, unnessarry casts removed --- .../class_MismatchingCompressorsException.php | 9 +++------ .../class_ContainerItemIsNoArrayException.php | 2 +- .../container/class_ContainerItemIsNullException.php | 2 +- .../class_ContainerMaybeDamagedException.php | 2 +- .../local_file/class_SavePathIsEmptyException.php | 2 +- .../class_SavePathIsNoDirectoryException.php | 2 +- .../class_SavePathReadProtectedException.php | 2 +- .../class_SavePathWriteProtectedException.php | 2 +- .../io/class_DirPointerNotOpenedException.php | 2 +- .../io/class_FilePointerNotOpenedException.php | 2 +- .../io/class_InvalidDataLengthException.php | 11 ++++------- .../io/class_InvalidDirectoryResourceException.php | 2 +- .../io/class_InvalidMD5ChecksumException.php | 11 ++++------- .../exceptions/io/class_PathIsEmptyException.php | 2 +- .../io/class_PathIsNoDirectoryException.php | 2 +- .../io/class_PathReadProtectedException.php | 2 +- .../class_InvalidLanguagePathStringException.php | 2 +- .../language/class_LanguagePathIsEmptyException.php | 2 +- .../class_LanguagePathIsNoDirectoryException.php | 2 +- .../class_LanguagePathReadProtectedException.php | 2 +- .../exceptions/main/class_ClassMismatchException.php | 2 +- .../exceptions/main/class_ClassNotFoundException.php | 2 +- .../main/class_ConfigEntryIsEmptyException.php | 2 +- .../main/class_ConfigEntryNotFoundException.php | 2 +- .../main/class_DimNotFoundInArrayException.php | 2 +- .../main/class_ExceptionNotChangedException.php | 2 +- .../main/class_ExceptionNotFoundException.php | 2 +- .../exceptions/main/class_GetterNotFoundException.php | 2 +- .../main/class_InvalidArrayCountException.php | 11 ++++------- .../exceptions/main/class_InvalidObjectException.php | 2 +- .../main/class_MissingArrayElementsException.php | 2 +- ...ass_MissingDecimalsThousandsSeperatorException.php | 2 +- .../exceptions/main/class_MissingMethodException.php | 2 +- .../exceptions/main/class_NoArrayCreatedException.php | 11 ++++------- .../exceptions/main/class_NoArrayException.php | 2 +- .../exceptions/main/class_NoObjectException.php | 2 +- .../exceptions/main/class_NullPointerException.php | 2 +- .../main/class_VariableIsNotSetException.php | 11 ++++------- .../template/class_BasePathIsEmptyException.php | 4 ++-- .../template/class_BasePathIsNoDirectoryException.php | 2 +- .../template/class_BasePathReadProtectedException.php | 2 +- .../template/class_InvalidBasePathStringException.php | 4 ++-- .../class_InvalidTemplateVariableNameException.php | 2 +- .../class_UnexpectedTemplateTypeException.php | 4 ++-- 44 files changed, 64 insertions(+), 82 deletions(-) diff --git a/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php b/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php index 4ff32f0726..2ca8d613e9 100644 --- a/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php +++ b/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php @@ -25,14 +25,11 @@ class MismatchingCompressorsException extends FrameworkException { /** * The constructor * - * @param $message Message from the exception - * @param $code Code number for the exception + * @param $array Message from the exception + * @param $code Code number for the exception * @return void */ - public final function __construct ($array, $code) { - // Cast the array - $array = (array) $array; - + public function __construct (array $array, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Kompressor %s zu den geladenen Daten aus %s und der aktuell verwendete Kompressor %s stimmen nicht überein!", $array[0]->__toString(), diff --git a/inc/classes/exceptions/container/class_ContainerItemIsNoArrayException.php b/inc/classes/exceptions/container/class_ContainerItemIsNoArrayException.php index a5e3468157..405c39b0de 100644 --- a/inc/classes/exceptions/container/class_ContainerItemIsNoArrayException.php +++ b/inc/classes/exceptions/container/class_ContainerItemIsNoArrayException.php @@ -29,7 +29,7 @@ class ContainerItemIsNoArrayException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Ein Container-Item ist kein Array.", $class->__toString(), diff --git a/inc/classes/exceptions/container/class_ContainerItemIsNullException.php b/inc/classes/exceptions/container/class_ContainerItemIsNullException.php index bffb9b08d7..2cfafc4a01 100644 --- a/inc/classes/exceptions/container/class_ContainerItemIsNullException.php +++ b/inc/classes/exceptions/container/class_ContainerItemIsNullException.php @@ -29,7 +29,7 @@ class ContainerItemIsNullException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Ein Container-Item ist auf null gesetzt.", $class->__toString(), diff --git a/inc/classes/exceptions/container/class_ContainerMaybeDamagedException.php b/inc/classes/exceptions/container/class_ContainerMaybeDamagedException.php index 417e49d2e2..56686983e8 100644 --- a/inc/classes/exceptions/container/class_ContainerMaybeDamagedException.php +++ b/inc/classes/exceptions/container/class_ContainerMaybeDamagedException.php @@ -29,7 +29,7 @@ class ContainerMaybeDamagedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Ein Container ist möglicherweise beschädigt.", $class->__toString(), diff --git a/inc/classes/exceptions/database/local_file/class_SavePathIsEmptyException.php b/inc/classes/exceptions/database/local_file/class_SavePathIsEmptyException.php index ddc60e8790..efae626f91 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathIsEmptyException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathIsEmptyException.php @@ -29,7 +29,7 @@ class SavePathIsEmptyException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Speicherpfad ist leer.", $class->__toString(), diff --git a/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php b/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php index 0eabf4e52e..964a8d46e5 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php @@ -29,7 +29,7 @@ class SavePathIsNoDirectoryException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Der angegebene Speicherpfad %s ist ungütig (kein Pfad).", $path); diff --git a/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php b/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php index 678ecd0055..26b86b34ed 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php @@ -29,7 +29,7 @@ class SavePathReadProtectedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Der Pfad %s ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path); diff --git a/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php b/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php index 0e7ca79c94..4ad27906b4 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php @@ -29,7 +29,7 @@ class SavePathWriteProtectedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Der angegebene Speicherpfad %s ist schreibgeschützt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path); diff --git a/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php b/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php index 5c415e1677..060b017095 100644 --- a/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php +++ b/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php @@ -29,7 +29,7 @@ class DirPointerNotOpenedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Für den Pfad %s konnte kein Pointer initialisiert werden.", $path); diff --git a/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php b/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php index fd4e541788..9c7a8a8914 100644 --- a/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php +++ b/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php @@ -29,7 +29,7 @@ class FilePointerNotOpenedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Für die Datei %s konnte kein Pointer initialisiert werden. Möglicherweise ist die Datei nicht lesbar oder fehlt!", $path); diff --git a/inc/classes/exceptions/io/class_InvalidDataLengthException.php b/inc/classes/exceptions/io/class_InvalidDataLengthException.php index 630d1cae62..bc742135e7 100644 --- a/inc/classes/exceptions/io/class_InvalidDataLengthException.php +++ b/inc/classes/exceptions/io/class_InvalidDataLengthException.php @@ -7,7 +7,7 @@ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.mxchange.org - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,14 +25,11 @@ class InvalidDataLengthException extends FrameworkException { /** * The constructor * - * @param $message Message from the exception - * @param $code Code number for the exception + * @param $array Message from the exception + * @param $code Code number for the exception * @return void */ - public final function __construct ($array, $code) { - // Cast the array - $array = (array) $array; - + public function __construct (array $array, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Eine unerwartete Datenlänge von %s Byte ist aufgetreten. %s wurden erwartet!", $array[0]->__toString(), diff --git a/inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php b/inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php index fc48bebbcf..668b0f0e41 100644 --- a/inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php +++ b/inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php @@ -29,7 +29,7 @@ class InvalidDirectoryResourceException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class if (is_null($class)) { $message = "[???:] Ungütige Verzeichnis-Resource."; diff --git a/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php b/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php index 1044d254b0..1aabdb48e7 100644 --- a/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php +++ b/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php @@ -7,7 +7,7 @@ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.mxchange.org - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,14 +25,11 @@ class InvalidMD5ChecksumException extends FrameworkException { /** * The constructor * - * @param $message Message from the exception - * @param $code Code number for the exception + * @param $array Message from the exception + * @param $code Code number for the exception * @return void */ - public final function __construct ($array, $code) { - // Cast the array - $array = (array) $array; - + public function __construct (array $array, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Die MD5-Prüfsummen %s und %s stimmen nicht überein!", $array[0]->__toString(), diff --git a/inc/classes/exceptions/io/class_PathIsEmptyException.php b/inc/classes/exceptions/io/class_PathIsEmptyException.php index ffabd5c3d7..4c93d20e10 100644 --- a/inc/classes/exceptions/io/class_PathIsEmptyException.php +++ b/inc/classes/exceptions/io/class_PathIsEmptyException.php @@ -29,7 +29,7 @@ class PathIsEmptyException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class if (is_null($class)) { $message = "[???:] Der Verzeichnisname ist leer."; diff --git a/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php b/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php index 6b0a531105..2ff79ba934 100644 --- a/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php +++ b/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php @@ -29,7 +29,7 @@ class PathIsNoDirectoryException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Der angegebene Pfad %s ist ungütig (kein Pfad).", $path); diff --git a/inc/classes/exceptions/io/class_PathReadProtectedException.php b/inc/classes/exceptions/io/class_PathReadProtectedException.php index 530f16fa9f..70ea7c0199 100644 --- a/inc/classes/exceptions/io/class_PathReadProtectedException.php +++ b/inc/classes/exceptions/io/class_PathReadProtectedException.php @@ -29,7 +29,7 @@ class PathReadProtectedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($path, $code) { + public function __construct ($path, $code) { // Add a message around the missing class $message = sprintf("Der Pfad %s ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path); diff --git a/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php b/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php index 24674cd335..5161c23d8b 100644 --- a/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php +++ b/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php @@ -29,7 +29,7 @@ class InvalidLanguagePathStringException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] %s ist keine Zeichenkette!", $class[0]->__toString(), diff --git a/inc/classes/exceptions/language/class_LanguagePathIsEmptyException.php b/inc/classes/exceptions/language/class_LanguagePathIsEmptyException.php index 4e2cbf8283..653f4c0e93 100644 --- a/inc/classes/exceptions/language/class_LanguagePathIsEmptyException.php +++ b/inc/classes/exceptions/language/class_LanguagePathIsEmptyException.php @@ -29,7 +29,7 @@ class LanguagePathIsEmptyException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Sprachen-Basispfad ist leer.", $class->__toString(), diff --git a/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php b/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php index 1f0f53dae0..6a672af7aa 100644 --- a/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php +++ b/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php @@ -29,7 +29,7 @@ class LanguagePathIsNoDirectoryException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Sprach-Basispfad %s existiert nicht oder ist eine Datei!", $class[0]->__toString(), diff --git a/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php b/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php index 72bf450f87..ccfd2c3717 100644 --- a/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php +++ b/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php @@ -29,7 +29,7 @@ class LanguagePathReadProtectedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Sprach-Basispfad %s ist lesegeschützt! Bitte Zugriffsrechte (CHMOD) ändern.", $class[0]->__toString(), diff --git a/inc/classes/exceptions/main/class_ClassMismatchException.php b/inc/classes/exceptions/main/class_ClassMismatchException.php index b8079c1f8a..b482001571 100644 --- a/inc/classes/exceptions/main/class_ClassMismatchException.php +++ b/inc/classes/exceptions/main/class_ClassMismatchException.php @@ -29,7 +29,7 @@ class ClassMismatchException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($classArray, $code) { + public function __construct (array $classArray, $code) { // Add a message around the missing class $message = sprintf("Die Klasse %s ist ungleich %s.", $classArray[0], diff --git a/inc/classes/exceptions/main/class_ClassNotFoundException.php b/inc/classes/exceptions/main/class_ClassNotFoundException.php index a91f6e70b7..b7242e7276 100644 --- a/inc/classes/exceptions/main/class_ClassNotFoundException.php +++ b/inc/classes/exceptions/main/class_ClassNotFoundException.php @@ -29,7 +29,7 @@ class ClassNotFoundException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("Die interne Script-Klasse %s konnte nicht gefunden werden!", $class); diff --git a/inc/classes/exceptions/main/class_ConfigEntryIsEmptyException.php b/inc/classes/exceptions/main/class_ConfigEntryIsEmptyException.php index 2661bf0451..df1891566a 100644 --- a/inc/classes/exceptions/main/class_ConfigEntryIsEmptyException.php +++ b/inc/classes/exceptions/main/class_ConfigEntryIsEmptyException.php @@ -29,7 +29,7 @@ class ConfigEntryIsEmptyException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Leeren Konfigurationseintrag angegeben!", $class, diff --git a/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php b/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php index b83567f55d..b753bdf93a 100644 --- a/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php +++ b/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php @@ -29,7 +29,7 @@ class ConfigEntryNotFoundException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct (array $classArray, $code) { + public function __construct (array $classArray, $code) { // Cast the array $classArray = (array) $classArray; diff --git a/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php b/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php index f65a01afbc..4e0bcfb714 100644 --- a/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php +++ b/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php @@ -29,7 +29,7 @@ class DimNotFoundInArrayException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { if (is_object($class)) { // Add a message around the missing class $message = sprintf("[%s:%d] Abmasse konnten nicht extrahiert werden!", diff --git a/inc/classes/exceptions/main/class_ExceptionNotChangedException.php b/inc/classes/exceptions/main/class_ExceptionNotChangedException.php index d8123ebe0d..af6ae2c915 100644 --- a/inc/classes/exceptions/main/class_ExceptionNotChangedException.php +++ b/inc/classes/exceptions/main/class_ExceptionNotChangedException.php @@ -30,7 +30,7 @@ class ExceptionNotChangedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Exception(s) wurde(n) nicht geändert.", $class, diff --git a/inc/classes/exceptions/main/class_ExceptionNotFoundException.php b/inc/classes/exceptions/main/class_ExceptionNotFoundException.php index 131e732cb3..33867ae4d2 100644 --- a/inc/classes/exceptions/main/class_ExceptionNotFoundException.php +++ b/inc/classes/exceptions/main/class_ExceptionNotFoundException.php @@ -29,7 +29,7 @@ class ExceptionNotFoundException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct (array $classArray, $code) { + public function __construct (array $classArray, $code) { // Cast the array $classArray = (array) $classArray; diff --git a/inc/classes/exceptions/main/class_GetterNotFoundException.php b/inc/classes/exceptions/main/class_GetterNotFoundException.php index bb25fdb806..64a402b2a3 100644 --- a/inc/classes/exceptions/main/class_GetterNotFoundException.php +++ b/inc/classes/exceptions/main/class_GetterNotFoundException.php @@ -29,7 +29,7 @@ class GetterNotFoundException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($dataArray, $code) { + public function __construct ($dataArray, $code) { // Cast the array $dataArray = (array) $dataArray; diff --git a/inc/classes/exceptions/main/class_InvalidArrayCountException.php b/inc/classes/exceptions/main/class_InvalidArrayCountException.php index 93f4ff81bc..215d1ab2bb 100644 --- a/inc/classes/exceptions/main/class_InvalidArrayCountException.php +++ b/inc/classes/exceptions/main/class_InvalidArrayCountException.php @@ -7,7 +7,7 @@ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.mxchange.org - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,14 +25,11 @@ class InvalidArrayCountException extends FrameworkException { /** * The constructor * - * @param $message Message from the exception - * @param $code Code number for the exception + * @param $array Message from the exception + * @param $code Code number for the exception * @return void */ - public final function __construct ($array, $code) { - // Cast the array - $array = (array) $array; - + public function __construct (array $array, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] %s hat %d Elemente, soll aber %d enthalten!", $array[0]->__toString(), diff --git a/inc/classes/exceptions/main/class_InvalidObjectException.php b/inc/classes/exceptions/main/class_InvalidObjectException.php index c74eecbc86..9dca3438d8 100644 --- a/inc/classes/exceptions/main/class_InvalidObjectException.php +++ b/inc/classes/exceptions/main/class_InvalidObjectException.php @@ -29,7 +29,7 @@ class InvalidObjectException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Objekte sind nicht erlaubt. (Objekt: %s)", $class->__toString(), diff --git a/inc/classes/exceptions/main/class_MissingArrayElementsException.php b/inc/classes/exceptions/main/class_MissingArrayElementsException.php index 17e0d05de8..eed1c9b3a8 100644 --- a/inc/classes/exceptions/main/class_MissingArrayElementsException.php +++ b/inc/classes/exceptions/main/class_MissingArrayElementsException.php @@ -29,7 +29,7 @@ class MissingArrayElementsException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($classArray, $code) { + public function __construct (array $classArray, $code) { // Cast the array $classArray = (array) $classArray; diff --git a/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php b/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php index c5b28a4bcd..771bf7b6e7 100644 --- a/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php +++ b/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php @@ -29,7 +29,7 @@ class MissingDecimalsThousandsSeperatorException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($instance, $code) { + public function __construct ($instance, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Die Dezimal- und Tausendertrenner fehlen!", $instance->__toString(), diff --git a/inc/classes/exceptions/main/class_MissingMethodException.php b/inc/classes/exceptions/main/class_MissingMethodException.php index 46670688fd..d8bd326c50 100644 --- a/inc/classes/exceptions/main/class_MissingMethodException.php +++ b/inc/classes/exceptions/main/class_MissingMethodException.php @@ -29,7 +29,7 @@ class MissingMethodException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($classArray, $code) { + public function __construct (array $classArray, $code) { // Cast the array $classArray = (array) $classArray; diff --git a/inc/classes/exceptions/main/class_NoArrayCreatedException.php b/inc/classes/exceptions/main/class_NoArrayCreatedException.php index b3a68c7c06..dd1e7fa751 100644 --- a/inc/classes/exceptions/main/class_NoArrayCreatedException.php +++ b/inc/classes/exceptions/main/class_NoArrayCreatedException.php @@ -7,7 +7,7 @@ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.mxchange.org - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,14 +25,11 @@ class NoArrayCreatedException extends FrameworkException { /** * The constructor * - * @param $message Message from the exception - * @param $code Code number for the exception + * @param $array Message from the exception + * @param $code Code number for the exception * @return void */ - public final function __construct ($array, $code) { - // Cast the array - $array = (array) $array; - + public function __construct (array $array, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] %s ist kein erstelltes Objekt.", $array[0]->__toString(), diff --git a/inc/classes/exceptions/main/class_NoArrayException.php b/inc/classes/exceptions/main/class_NoArrayException.php index 9e5942b1ac..eacfca3635 100644 --- a/inc/classes/exceptions/main/class_NoArrayException.php +++ b/inc/classes/exceptions/main/class_NoArrayException.php @@ -27,7 +27,7 @@ class NoArrayException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($string, $code) { + public function __construct ($string, $code) { // Add a message around the missing class $message = sprintf("%s ist kein Array!", $string diff --git a/inc/classes/exceptions/main/class_NoObjectException.php b/inc/classes/exceptions/main/class_NoObjectException.php index 7f3da77259..c169685000 100644 --- a/inc/classes/exceptions/main/class_NoObjectException.php +++ b/inc/classes/exceptions/main/class_NoObjectException.php @@ -31,7 +31,7 @@ class NoObjectException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($string, $code) { + public function __construct ($string, $code) { // Add a message around the missing class $message = sprintf("%s ist kein Objekt!", $string diff --git a/inc/classes/exceptions/main/class_NullPointerException.php b/inc/classes/exceptions/main/class_NullPointerException.php index 45487d5d98..489465a0d6 100644 --- a/inc/classes/exceptions/main/class_NullPointerException.php +++ b/inc/classes/exceptions/main/class_NullPointerException.php @@ -29,7 +29,7 @@ class NullPointerException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Eine Instanz/Pointer ist auf null gesetzt.", $class->__toString(), diff --git a/inc/classes/exceptions/main/class_VariableIsNotSetException.php b/inc/classes/exceptions/main/class_VariableIsNotSetException.php index 0ec1a4d58c..9c9a51f4a0 100644 --- a/inc/classes/exceptions/main/class_VariableIsNotSetException.php +++ b/inc/classes/exceptions/main/class_VariableIsNotSetException.php @@ -7,7 +7,7 @@ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.mxchange.org - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,14 +25,11 @@ class VariableIsNotSetException extends FrameworkException { /** * The constructor * - * @param $message Message from the exception - * @param $code Code number for the exception + * @param $array Message from the exception + * @param $code Code number for the exception * @return void */ - public final function __construct ($array, $code) { - // Cast the array - $array = (array) $array; - + public function __construct (array $array, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Bei der Initialisierung der Applikation %s wurde keine Variable %s erzeugt.", $array[0]->__toString(), diff --git a/inc/classes/exceptions/template/class_BasePathIsEmptyException.php b/inc/classes/exceptions/template/class_BasePathIsEmptyException.php index ed59ac5d7e..e155afe735 100644 --- a/inc/classes/exceptions/template/class_BasePathIsEmptyException.php +++ b/inc/classes/exceptions/template/class_BasePathIsEmptyException.php @@ -1,6 +1,6 @@ * @version 0.3.0 @@ -29,7 +29,7 @@ class BasePathIsEmptyException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Template-Basispfad ist leer.", $class->__toString(), diff --git a/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php b/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php index 6d32301240..271b447836 100644 --- a/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php +++ b/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php @@ -29,7 +29,7 @@ class BasePathIsNoDirectoryException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Template-Basispfad %s existiert nicht oder ist eine Datei!", $class[0]->__toString(), diff --git a/inc/classes/exceptions/template/class_BasePathReadProtectedException.php b/inc/classes/exceptions/template/class_BasePathReadProtectedException.php index b95171dbfd..535071766e 100644 --- a/inc/classes/exceptions/template/class_BasePathReadProtectedException.php +++ b/inc/classes/exceptions/template/class_BasePathReadProtectedException.php @@ -29,7 +29,7 @@ class BasePathReadProtectedException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Template-Basispfad %s ist lesegeschützt! Bitte Zugriffsrechte (CHMOD) ändern.", $class[0]->__toString(), diff --git a/inc/classes/exceptions/template/class_InvalidBasePathStringException.php b/inc/classes/exceptions/template/class_InvalidBasePathStringException.php index 7236f6e2d6..96c3e33b78 100644 --- a/inc/classes/exceptions/template/class_InvalidBasePathStringException.php +++ b/inc/classes/exceptions/template/class_InvalidBasePathStringException.php @@ -1,6 +1,6 @@ * @version 0.3.0 @@ -29,7 +29,7 @@ class InvalidBasePathStringException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] %s ist keine Zeichenkette!", $class[0]->__toString(), diff --git a/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php b/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php index 6dc35afb01..8a3151cc0d 100644 --- a/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php +++ b/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php @@ -29,7 +29,7 @@ class InvalidTemplateVariableNameException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Die im Template %s gefundene Variable %s ist nicht gültig! Gültige Variablennamen sind nur %s.", $class[0]->__toString(), diff --git a/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php b/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php index 06126039de..b1d0d14b81 100644 --- a/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php +++ b/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php @@ -1,6 +1,6 @@ * @version 0.3.0 @@ -29,7 +29,7 @@ class UnexpectedTemplateTypeException extends FrameworkException { * @param $code Code number for the exception * @return void */ - public final function __construct ($class, $code) { + public function __construct (BaseFrameworkSystem $class, $code) { // Add a message around the missing class $message = sprintf("[%s:%d] Der Template-Typ %s entspricht nicht dem erwartetem Template-Typ %s.", $class[0]->__toString(), -- 2.39.5