Code Duplication    Length = 15-15 lines in 6 locations

apps/files_sharing/lib/Activity/Providers/Groups.php 1 location

@@ 75-89 (lines=15) @@
72
	 * @throws \InvalidArgumentException
73
	 * @since 11.0.0
74
	 */
75
	public function parse(IEvent $event, IEvent $previousEvent = null) {
76
		if ($event->getApp() !== 'files_sharing') {
77
			throw new \InvalidArgumentException();
78
		}
79
80
		if ($this->activityManager->isFormattingFilteredObject()) {
81
			try {
82
				return $this->parseShortVersion($event);
83
			} catch (\InvalidArgumentException $e) {
84
				// Ignore and simply use the long version...
85
			}
86
		}
87
88
		return $this->parseLongVersion($event);
89
	}
90
91
	/**
92
	 * @param IEvent $event

apps/files_sharing/lib/Activity/Providers/PublicLinks.php 1 location

@@ 77-91 (lines=15) @@
74
	 * @throws \InvalidArgumentException
75
	 * @since 11.0.0
76
	 */
77
	public function parse(IEvent $event, IEvent $previousEvent = null) {
78
		if ($event->getApp() !== 'files_sharing') {
79
			throw new \InvalidArgumentException();
80
		}
81
82
		if ($this->activityManager->isFormattingFilteredObject()) {
83
			try {
84
				return $this->parseShortVersion($event);
85
			} catch (\InvalidArgumentException $e) {
86
				// Ignore and simply use the long version...
87
			}
88
		}
89
90
		return $this->parseLongVersion($event);
91
	}
92
93
	/**
94
	 * @param IEvent $event

apps/files_sharing/lib/Activity/Providers/RemoteShares.php 1 location

@@ 66-80 (lines=15) @@
63
	 * @throws \InvalidArgumentException
64
	 * @since 11.0.0
65
	 */
66
	public function parse(IEvent $event, IEvent $previousEvent = null) {
67
		if ($event->getApp() !== 'files_sharing') {
68
			throw new \InvalidArgumentException();
69
		}
70
71
		if ($this->activityManager->isFormattingFilteredObject()) {
72
			try {
73
				return $this->parseShortVersion($event);
74
			} catch (\InvalidArgumentException $e) {
75
				// Ignore and simply use the long version...
76
			}
77
		}
78
79
		return $this->parseLongVersion($event);
80
	}
81
82
	/**
83
	 * @param IEvent $event

apps/files_sharing/lib/Activity/Providers/Users.php 1 location

@@ 77-91 (lines=15) @@
74
	 * @throws \InvalidArgumentException
75
	 * @since 11.0.0
76
	 */
77
	public function parse(IEvent $event, IEvent $previousEvent = null) {
78
		if ($event->getApp() !== 'files_sharing') {
79
			throw new \InvalidArgumentException();
80
		}
81
82
		if ($this->activityManager->isFormattingFilteredObject()) {
83
			try {
84
				return $this->parseShortVersion($event);
85
			} catch (\InvalidArgumentException $e) {
86
				// Ignore and simply use the long version...
87
			}
88
		}
89
90
		return $this->parseLongVersion($event);
91
	}
92
93
	/**
94
	 * @param IEvent $event

apps/systemtags/lib/Activity/Provider.php 1 location

@@ 76-90 (lines=15) @@
73
	 * @throws \InvalidArgumentException
74
	 * @since 11.0.0
75
	 */
76
	public function parse(IEvent $event, IEvent $previousEvent = null) {
77
		if ($event->getApp() !== 'systemtags') {
78
			throw new \InvalidArgumentException();
79
		}
80
81
		if ($this->activityManager->isFormattingFilteredObject()) {
82
			try {
83
				return $this->parseShortVersion($event);
84
			} catch (\InvalidArgumentException $e) {
85
				// Ignore and simply use the long version...
86
			}
87
		}
88
89
		return $this->parseLongVersion($event);
90
	}
91
92
	/**
93
	 * @param IEvent $event

apps/sharebymail/lib/Activity.php 1 location

@@ 80-94 (lines=15) @@
77
	 * @throws \InvalidArgumentException
78
	 * @since 11.0.0
79
	 */
80
	public function parse(IEvent $event, IEvent $previousEvent = null) {
81
		if ($event->getApp() !== 'sharebymail') {
82
			throw new \InvalidArgumentException();
83
		}
84
85
		if ($this->activityManager->isFormattingFilteredObject()) {
86
			try {
87
				return $this->parseShortVersion($event);
88
			} catch (\InvalidArgumentException $e) {
89
				// Ignore and simply use the long version...
90
			}
91
		}
92
93
		return $this->parseLongVersion($event);
94
	}
95
96
	/**
97
	 * @param IEvent $event