1717 */
1818abstract class ExceptionTestCase extends TestCase {
1919
20- public final function testGetDefaultMessage () {
20+ final public function testGetDefaultMessage (): void {
2121 try {
2222 $ this ->throwDefaultException ();
2323 } catch (JitesoftException $ ex ) {
2424
2525 $ message = array_filter (
2626 (new ReflectionClass (get_class ($ ex )))->getConstructor ()->getParameters (),
27- function (ReflectionParameter $ parm ) {
27+ static function (ReflectionParameter $ parm ) {
2828 return $ parm ->getName () === "message " ;
2929 }
3030 );
@@ -41,7 +41,7 @@ function(ReflectionParameter $parm) {
4141 }
4242 }
4343
44- public final function testGetNoneDefaultMessage () {
44+ final public function testGetNoneDefaultMessage (): void {
4545 try {
4646 $ this ->throwMessageException ("Test " );
4747 } catch (JitesoftException $ ex ) {
@@ -52,14 +52,14 @@ public final function testGetNoneDefaultMessage() {
5252 /**
5353 * @throws JitesoftException
5454 */
55- protected abstract function throwDefaultException ();
55+ abstract protected function throwDefaultException (): void ;
5656
5757 /**
5858 * @throws JitesoftException
5959 */
60- protected abstract function throwMessageException (string $ message );
60+ abstract protected function throwMessageException (string $ message ): void ;
6161
62- protected static function getTestProperties () {
62+ protected static function getTestProperties (): array {
6363 return [
6464 "type " ,
6565 "error " ,
@@ -71,7 +71,10 @@ protected static function getTestProperties() {
7171 ];
7272 }
7373
74- public final function testHasProperties () {
74+ /**
75+ * @return void
76+ */
77+ final public function testHasProperties (): void {
7578 try {
7679 $ this ->throwDefaultException ();
7780 } catch (JitesoftException $ ex ) {
@@ -82,8 +85,9 @@ public final function testHasProperties() {
8285 /**
8386 * @param array $ex
8487 * @param array $properties
88+ * @return void
8589 */
86- protected final function assertHasProperties (array $ ex , array $ properties ) {
90+ final protected function assertHasProperties (array $ ex , array $ properties ): void {
8791 foreach ($ properties as $ property ) {
8892 $ o = self ::arrayHasKey ($ property );
8993 if (!$ o ->evaluate ($ ex , '' , true )) {
0 commit comments