]> git.mxchange.org Git - friendica-addons.git/blobdiff - ifttt/ifttt.php
Use short form array syntax everywhere
[friendica-addons.git] / ifttt / ifttt.php
index 384b955c0b182c7350671a63203fd867d8f660d6..8a457df37aad16708a3b2e1790a2aae1e4a198ee 100644 (file)
@@ -97,7 +97,7 @@ function ifttt_post(App $a)
 
        $nickname = $a->argv[1];
 
-       $user = dba::select('user', ['uid'], ['nickname' => $nickname], ['limit' => 1]);
+       $user = dba::selectFirst('user', ['uid'], ['nickname' => $nickname]);
        if (!DBM::is_result($user)) {
                logger('User ' . $nickname . ' not found.', LOGGER_DEBUG);
                return;
@@ -120,13 +120,13 @@ function ifttt_post(App $a)
                return;
        }
 
-       $item = array();
+       $item = [];
 
        if (isset($_REQUEST['type'])) {
                $item['type'] = $_REQUEST['type'];
        }
 
-       if (!in_array($item['type'], array('status', 'link', 'photo'))) {
+       if (!in_array($item['type'], ['status', 'link', 'photo'])) {
                logger('Unknown item type ' . $item['type'], LOGGER_DEBUG);
                return;
        }