Markup   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 5
Bugs 4 Features 1
Metric Value
wmc 1
eloc 4
c 5
b 4
f 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A menuMarkup() 0 7 1
1
<?php
2
3
namespace CSlant\LaravelTelegramGitNotifier\Traits;
4
5
use Telegram;
6
7
trait Markup
8
{
9
    /**
10
     * Generate menu markup.
11
     *
12
     * @param  Telegram  $telegram
13
     * @return array<string[]>
14
     */
15
    public function menuMarkup(Telegram $telegram): array
16
    {
17
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(array($tele...author.source_code')))) returns the type array<integer,array<inte...,array<string,string>>> which is incompatible with the documented return type array<mixed,string[]>.
Loading history...
18
            [
19
                $telegram->buildInlineKeyBoardButton('🗨 '.__('tg-notifier::tools/menu.discussion'), config('telegram-git-notifier.author.discussion')),
20
            ], [
21
                $telegram->buildInlineKeyBoardButton('💠 '.__('tg-notifier::tools/menu.source_code'), config('telegram-git-notifier.author.source_code')),
22
            ],
23
        ];
24
    }
25
}
26