| Conditions | 1 |
| Paths | 1 |
| Total Lines | 61 |
| Code Lines | 59 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 35 | public function setUp() { |
||
| 36 | $request = $this->getMockBuilder('OCP\IRequest') |
||
| 37 | ->disableOriginalConstructor() |
||
| 38 | ->getMock(); |
||
| 39 | $userManager = $this->getMockBuilder('OCP\IUserManager') |
||
| 40 | ->disableOriginalConstructor() |
||
| 41 | ->getMock(); |
||
| 42 | $groupManager = $this->getMockBuilder('OCP\IGroupManager') |
||
| 43 | ->disableOriginalConstructor() |
||
| 44 | ->getMock(); |
||
| 45 | $avatarManager = $this->getMockBuilder('OCP\IAvatarManager') |
||
| 46 | ->disableOriginalConstructor() |
||
| 47 | ->getMock(); |
||
| 48 | $logger = $this->getMockBuilder('OCP\ILogger') |
||
| 49 | ->disableOriginalConstructor() |
||
| 50 | ->getMock(); |
||
| 51 | $l10n = $this->getMockBuilder('OCP\IL10N') |
||
| 52 | ->disableOriginalConstructor() |
||
| 53 | ->getMock(); |
||
| 54 | $urlGenerator = $this->getMockBuilder('OCP\IURLGenerator') |
||
| 55 | ->disableOriginalConstructor() |
||
| 56 | ->getMock(); |
||
| 57 | $commentMapper = $this->getMockBuilder('OCA\Polls\Db\CommentMapper') |
||
| 58 | ->disableOriginalConstructor() |
||
| 59 | ->getMock(); |
||
| 60 | $dateMapper = $this->getMockBuilder('OCA\Polls\Db\DateMapper') |
||
| 61 | ->disableOriginalConstructor() |
||
| 62 | ->getMock(); |
||
| 63 | $eventMapper = $this->getMockBuilder('OCA\Polls\Db\EventMapper') |
||
| 64 | ->disableOriginalConstructor() |
||
| 65 | ->getMock(); |
||
| 66 | $notificationMapper = $this->getMockBuilder('OCA\Polls\Db\NotificationMapper') |
||
| 67 | ->disableOriginalConstructor() |
||
| 68 | ->getMock(); |
||
| 69 | $participationMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationMapper') |
||
| 70 | ->disableOriginalConstructor() |
||
| 71 | ->getMock(); |
||
| 72 | $participationTextMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationTextMapper') |
||
| 73 | ->disableOriginalConstructor() |
||
| 74 | ->getMock(); |
||
| 75 | $textMapper = $this->getMockBuilder('OCA\Polls\Db\TextMapper') |
||
| 76 | ->disableOriginalConstructor() |
||
| 77 | ->getMock(); |
||
| 78 | |||
| 79 | $this->controller = new PageController( |
||
| 80 | 'polls', |
||
| 81 | $request, |
||
| 82 | $userManager, |
||
| 83 | $groupManager, |
||
| 84 | $avatarManager, |
||
| 85 | $logger, |
||
| 86 | $l10n, |
||
| 87 | $urlGenerator, |
||
| 88 | $this->userId, |
||
| 89 | $commentMapper, |
||
| 90 | $dateMapper, |
||
| 91 | $eventMapper, |
||
| 92 | $notificationMapper, |
||
| 93 | $participationMapper, |
||
| 94 | $participationTextMapper, |
||
| 95 | $textMapper |
||
| 96 | ); |
||
| 106 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths