Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions classes/box.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PHP_METHOD(Box, __construct)
break;

default:
{ /* throw */ }
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$orientation'");
}
} /* }}} */

Expand Down Expand Up @@ -185,7 +185,7 @@ PHP_METHOD(Box, setPadded)
} /* }}} */

#if PHP_VERSION_ID >= 70200
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, NULL, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, 0)
#else
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, NULL, 0)
#endif
Expand Down
3 changes: 2 additions & 1 deletion classes/entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <classes/control.h>
#include <classes/entry.h>
#include <classes/exceptions.h>

zend_object_handlers php_ui_entry_handlers;

Expand Down Expand Up @@ -94,7 +95,7 @@ PHP_METHOD(Entry, __construct)
break;

default:
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand Down
3 changes: 2 additions & 1 deletion classes/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <classes/descriptor.h>
#include <classes/font.h>
#include <classes/exceptions.h>

zend_object_handlers php_ui_font_handlers;

Expand Down Expand Up @@ -85,7 +86,7 @@ PHP_METHOD(DrawTextFont, __construct)
font->f = uiDrawLoadClosestFont(&d->d);

if (!font->f) {
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid font descriptor");
}
} /* }}} */

Expand Down
11 changes: 6 additions & 5 deletions classes/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <classes/menu.h>
#include <classes/item.h>
#include <classes/exceptions.h>

zend_object_handlers php_ui_menu_handlers;

Expand Down Expand Up @@ -82,7 +83,7 @@ PHP_METHOD(Menu, append)
}

if (ZEND_NUM_ARGS() > 1 && !instanceof_function(type, uiItem_ce)) {
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand All @@ -108,7 +109,7 @@ PHP_METHOD(Menu, appendCheck)
}

if (ZEND_NUM_ARGS() > 1 && !instanceof_function(type, uiItem_ce)) {
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand Down Expand Up @@ -139,7 +140,7 @@ PHP_METHOD(Menu, appendQuit)
}

if (ZEND_NUM_ARGS() > 1 && !instanceof_function(type, uiItem_ce)) {
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand All @@ -162,7 +163,7 @@ PHP_METHOD(Menu, appendPreferences)
}

if (ZEND_NUM_ARGS() > 1 && !instanceof_function(type, uiItem_ce)) {
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand All @@ -185,7 +186,7 @@ PHP_METHOD(Menu, appendAbout)
}

if (ZEND_NUM_ARGS() > 1 && !instanceof_function(type, uiItem_ce)) {
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand Down
3 changes: 2 additions & 1 deletion classes/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <classes/control.h>
#include <classes/multi.h>
#include <classes/exceptions.h>

zend_object_handlers php_ui_multi_handlers;

Expand Down Expand Up @@ -90,7 +91,7 @@ PHP_METHOD(Multi, __construct)
break;

default:
/* throw */
php_ui_exception_ex(InvalidArgumentException, "Invalid value given for '$type'");
return;
}

Expand Down