* Record the given set of hash tags in the db for this notice.
* Given tag strings will be normalized and checked for dupes.
*/
- function saveKnownTags($hashtags)
+ function saveKnownTags(array $hashtags)
{
//turn each into their canonical tag
//this is needed to remove dupes before saving e.g. #hash.tag = #hashtag
*
* @result boolean hook value
*/
- function onEndGroupSave($group)
+ function onEndGroupSave(User_group $group)
{
$gps = new Group_privacy_settings();
foreach (array_unique($match[1]) as $nickname) {
$group = User_group::getForNickname($nickname, $profile);
- if (empty($group)) {
+ if (!$group instanceof User_group) {
continue;
}
* send immediately but won't get the return value.
*
* @param mixed $entry XML string, Notice, or Activity
+ * @param Profile $actor Acting profile
* @return boolean success
*/
- public function notifyDeferred($entry, $actor)
+ public function notifyDeferred($entry, Profile $actor)
{
if ($this->salmonuri) {
try {
* @param string $method 'push' or 'salmon'
* @return mixed saved Notice or false
*/
- public function processPost($activity, $method)
+ public function processPost(Activity $activity, $method)
{
$actor = ActivityUtils::checkAuthorship($activity, $this->localProfile());
}
}
- protected static function updatePeopletag($tag, ActivityObject $object, array $hints=array()) {
+ protected static function updatePeopletag(Peopletag $tag, ActivityObject $object, array $hints=array()) {
$orig = clone($tag);
$tag->tag = $object->title;
} else {
$actor = $activity->actor;
- if (empty($actor)) {
+ if (!$actor instanceof Profile) {
// OK here! assume the default
} else if ($actor->id == $this->getUri() || $actor->link == $this->getUri()) {
$this->updateFromActivityObject($actor);