tagManager->load('files', [], false, $user); $favorites = $tags->getFavorites(); if (empty($favorites)) { throw new \RuntimeException('No favorites', 1); } elseif (isset($favorites[self::FAVORITE_LIMIT])) { throw new \RuntimeException('Too many favorites', 2); } // Can not DI because the user is not known on instantiation $userFolder = $this->rootFolder->getUserFolder($user); $favoriteNodes = []; foreach ($favorites as $favorite) { $node = $userFolder->getFirstNodeById($favorite); if ($node) { if (!$foldersOnly || $node instanceof Folder) { $favoriteNodes[] = $node; } } } if (empty($favoriteNodes)) { throw new \RuntimeException('No favorites', 1); } return $favoriteNodes; } /** * Returns an array with the favorites * * @param string $user * @return array * @throws \RuntimeException when too many or no favorites where found */ public function getFavoriteFilePaths(string $user): array { $userFolder = $this->rootFolder->getUserFolder($user); $nodes = $this->getFavoriteNodes($user); $folders = $items = []; foreach ($nodes as $node) { $path = $userFolder->getRelativePath($node->getPath()); $items[] = $path; if ($node instanceof Folder) { $folders[] = $path; } } return [ 'items' => $items, 'folders' => $folders, ]; } } g.apache.maven.plugins-maven-help-plugin-3.4.0'>dependabot/maven/org.apache.maven.plugins-maven-help-plugin-3.4.0 A seamless aspect-oriented extension to the Java programming language: https://github.com/eclipse-aspectj/aspectjwww-data
summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/genericaspects/GenericAspectY.aj
blob: b3c5bc4512f1e5853e4ad2573e870a2663268e45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181