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
2 changes: 1 addition & 1 deletion wa-system/api/waAPIRightsMethod.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function execute()
$this->response = self::getAppRights($this->app);
}

public static function getAppRights($app_id, waContact $contact = null)
public static function getAppRights($app_id, ?waContact $contact = null)
{
$contact = ifset($contact, wa()->getUser());
/**
Expand Down
2 changes: 1 addition & 1 deletion wa-system/contact/waContactAddressField.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private function setGeoCoords($value)
return $value;
}

public function prepareSave($value, waContact $contact = null)
public function prepareSave($value, ?waContact $contact = null)
{
if (isset($value[0])) {
foreach ($value as &$v) {
Expand Down
2 changes: 1 addition & 1 deletion wa-system/contact/waContactBirthdayField.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function set(waContact $contact, $value, $params = array(), $add = false)
return $value;
}

public function prepareSave($value, waContact $contact = null)
public function prepareSave($value, ?waContact $contact = null)
{
$prefix = $this->options['prefix'];
if (is_string($value)) {
Expand Down
2 changes: 1 addition & 1 deletion wa-system/contact/waContactField.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ public static function __set_state($state)
return new $state['_type']($state['id'], $state['name'], $state['options']);
}

public function prepareSave($value, waContact $contact = null)
public function prepareSave($value, ?waContact $contact = null)
{
return $value;
}
Expand Down
2 changes: 1 addition & 1 deletion wa-system/contact/waContactNameField.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function get(waContact $contact, $format = null)
return $this->format($name, $format);
}

public function prepareSave($value, waContact $contact = null) {
public function prepareSave($value, ?waContact $contact = null) {

if (!$contact) {
return $value;
Expand Down
2 changes: 1 addition & 1 deletion wa-system/controller/waViewAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function getController()
return $this->controller;
}

public function setLayout(waLayout $layout = null)
public function setLayout(?waLayout $layout = null)
{
if ($this->controller !== null && $this->controller instanceof waViewController) {
$this->controller->setLayout($layout);
Expand Down
6 changes: 3 additions & 3 deletions wa-system/controller/waViewController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct()
*
* @param waLayout $layout
*/
public function setLayout(waLayout $layout=null)
public function setLayout(?waLayout $layout=null)
{
$this->layout = $layout;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ public function getLayout()
* @param waDecorator $decorator
* @param string $name
*/
public function executeAction(waViewAction $action, $name = 'content', waDecorator $decorator = null)
public function executeAction(waViewAction $action, $name = 'content', ?waDecorator $decorator = null)
{
$action->setController($this);
if ($action->getLayout()) {
Expand Down Expand Up @@ -118,4 +118,4 @@ public function display()

}

// EOF
// EOF
2 changes: 1 addition & 1 deletion wa-system/database/waModel.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function rollback()
* Set cache
* @param waiCache $cache
*/
public function setCache(waiCache $cache = null)
public function setCache(?waiCache $cache = null)
{
$this->cache = $cache;
}
Expand Down
2 changes: 1 addition & 1 deletion wa-system/layout/waLayout.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function setBlock($name, $content)
* @param waViewAction $action
* @param waDecorator $decorator
*/
public function executeAction($name, $action, waDecorator $decorator = null)
public function executeAction($name, $action, ?waDecorator $decorator = null)
{
$action->setLayout($this);
$content = $decorator ? $decorator->display($action) : $action->display();
Expand Down
2 changes: 1 addition & 1 deletion wa-system/mail/waMail.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class waMail extends Swift_Mailer
protected static $wa_config = array();
private $wa_set_transport = false;

public function __construct(Swift_Transport $transport = null)
public function __construct(?Swift_Transport $transport = null)
{
if (!$transport) {
$transport = Swift_MailTransport::newInstance();
Expand Down
2 changes: 1 addition & 1 deletion wa-system/payment/waAppPayment.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function uninstall($plugin_id)
}

/** @since 3.2.0 */
public function declareFiscalization($order_id, waPayment $plugin, array $custom_data = null)
public function declareFiscalization($order_id, waPayment $plugin, ?array $custom_data = null)
{
;
}
Expand Down
4 changes: 2 additions & 2 deletions wa-system/payment/waPayment.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -973,12 +973,12 @@ public static function settingCurrencySelect()
}

/**
* @param waOrder $order
* @param waOrder|null $order
* @return array[string]array
* @return array[string]['name']string Printable form name
* @return array[string]['description']string Printable form description
*/
public function getPrintForms(waOrder $order = null)
public function getPrintForms(?waOrder $order = null)
{
return array();
}
Expand Down
4 changes: 2 additions & 2 deletions wa-system/shipping/waShipping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public function setPackageState(waOrder $order, $state, $params = array())
* @param array $params
* @return array
*/
public function getStateFields($state, waOrder $order = null, $params = array())
public function getStateFields($state, ?waOrder $order = null, $params = array())
{
$this->addItems($order->items);
$this->setAddress($order->shipping_address);
Expand Down Expand Up @@ -569,7 +569,7 @@ protected function readyPackage(waOrder $order, $shipping_data = array())
* @return array[string]['name']string printform's name
* @return array[string]['description']string printform's description
*/
public function getPrintForms(waOrder $order = null)
public function getPrintForms(?waOrder $order = null)
{
return array();
}
Expand Down
2 changes: 1 addition & 1 deletion wa-system/waSystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function getConfig()
* @throws waException
* @see wa()
*/
public static function getInstance($name = null, waSystemConfig $config = null, $set_current = false)
public static function getInstance($name = null, ?waSystemConfig $config = null, $set_current = false)
{
if ($name === null) {
if ($config && $config instanceof waAppConfig) {
Expand Down
2 changes: 1 addition & 1 deletion wa-system/webasyst/lib/config/webasystConfig.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function onCount()
return $counts;
}

public function initUserWidgets($force = false, waContact $contact = null)
public function initUserWidgets($force = false, ?waContact $contact = null)
{
if (!$contact) {
$contact = wa()->getUser();
Expand Down