Completed
Push — master ( 6c40ed...665ea8 )
by sebastian
01:26
created

src/jwe/impl/IVFactory.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php namespace jwe\impl;
2
/**
3
* Copyright 2015 OpenStack Foundation
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
* http://www.apache.org/licenses/LICENSE-2.0
8
* Unless required by applicable law or agreed to in writing, software
9
* distributed under the License is distributed on an "AS IS" BASIS,
10
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
* See the License for the specific language governing permissions and
12
* limitations under the License.
13
**/
14
use utils\services\Utils_Registry;
15
/**
16
 * Class IVFactory
17
 * @package jwe\impl
18
 */
19
final class IVFactory {
20
21
    /**
22
     * @param $size
23
     * @return string
24
     */
25
    static public function build($size){
26
27
        $generator = Utils_Registry::getInstance()->get(Utils_Registry::RandomNumberGeneratorService);
28
        return $generator->invoke($size / 8);
0 ignored issues
show
The call to IService::invoke() has too many arguments starting with $size / 8.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
29
    }
30
}