Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
3f200702
Unverified
Commit
3f200702
authored
7 years ago
by
Morris Jobke
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #7845 from nextcloud/capabilties_manager_strict
Make the capabilities manager strict
parents
3ade5ccb
758cb4d0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/CapabilitiesManager.php
+5
-3
5 additions, 3 deletions
lib/private/CapabilitiesManager.php
with
5 additions
and
3 deletions
lib/private/CapabilitiesManager.php
+
5
−
3
View file @
3f200702
...
...
@@ -20,8 +20,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace
OC
;
declare
(
strict_types
=
1
);
namespace
OC
;
use
OCP\AppFramework\QueryException
;
use
OCP\Capabilities\ICapability
;
...
...
@@ -47,7 +49,7 @@ class CapabilitiesManager {
* @throws \InvalidArgumentException
* @return array
*/
public
function
getCapabilities
(
$public
=
false
)
{
public
function
getCapabilities
(
bool
$public
=
false
)
:
array
{
$capabilities
=
[];
foreach
(
$this
->
capabilities
as
$capability
)
{
try
{
...
...
@@ -78,6 +80,6 @@ class CapabilitiesManager {
* @param \Closure $callable
*/
public
function
registerCapability
(
\Closure
$callable
)
{
array_push
(
$this
->
capabilities
,
$callable
)
;
$this
->
capabilities
[]
=
$callable
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment