Completed
Push — master ( eb5562...b637ab )
by Pol
02:27
created

src/Plugin/Method/generateDecimalFractions.php (2 issues)

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
2
3
namespace drupol\Yaroc\Plugin\Method;
4
5
use drupol\Yaroc\Plugin\MethodPluginBase;
6
use drupol\Yaroc\Plugin\MethodPluginInterface;
7
8
/**
9
 * Class generateDecimalFractions.
10
 *
11
 * @package drupol\Yaroc\Plugin\Method
12
 */
13
class generateDecimalFractions extends MethodPluginBase implements MethodPluginInterface {
0 ignored issues
show
The class generateDecimalFractions is not named in CamelCase.

This check marks class names that have not been written in CamelCase.

In CamelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database connector becomes DatabaseConnector.

Loading history...
This class is not in CamelCase format.

Classes in PHP are usually named in CamelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database provider becomes DatabaseProvider.

Loading history...
14
15
  /**
16
   * {@inheritdoc}
17
   */
18
  const METHOD = 'generateDecimalFractions';
19
20
  /**
21
   * {@inheritdoc}
22
   */
23 4
  public function getDefaultParameters() {
24
    return [
25
        'apiKey' => [
26 4
          'value' => NULL,
27
          'api' => [
28 4
            1,
29 4
            2,
30 4
          ],
31 4
        ],
32
        'n' => [
33 4
          'value' => NULL,
34
          'api' => [
35 4
            1,
36 4
            2,
37
          ]
38 4
        ],
39
        'decimalPlaces' => [
40 4
          'value' => NULL,
41
          'api' => [
42 4
            1,
43 4
            2,
44
          ]
45 4
        ],
46
        'replacement' => [
47 4
          'value' => NULL,
48 4
          'optional' => TRUE,
49
          'api' => [
50 4
            1,
51 4
            2,
52
          ]
53 4
        ],
54 4
      ] + parent::getDefaultParameters();
55
  }
56
57
  /**
58
   * {@inheritdoc}
59
   */
60 4
  public function getTestsParameters() {
61
    return [
62 4
      'n' => 5,
63 4
      'decimalPlaces' => 5,
64 4
      'replacement' => TRUE,
65 4
    ];
66
  }
67
68
}