#116 - integration with slack #129
@@ -22,4 +22,4 @@ class SlackApiChannel
|
||||
|
|
||||
"text" => $notification->toSlack($notifiable),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Can you type Can you type `$notifiable`?
Hm, I don't if I wouldn't put his to Infrastucture directory. Hm, I don't if I wouldn't put his to Infrastucture directory.
Could you extract this config to separate method? It would make further testing easier, I think. Could you extract this config to separate method? It would make further testing easier, I think.
In general, it can be anything that uses trait In general, it can be anything that uses trait `Notifiable`
Oh no, maybe you could add some interface fot that? Oh no, maybe you could add some interface fot that?
|
||||
}
|
||||
|
Can you type Can you type `$notifiable`?
Hm, I don't if I wouldn't put his to Infrastucture directory. Hm, I don't if I wouldn't put his to Infrastucture directory.
Could you extract this config to separate method? It would make further testing easier, I think. Could you extract this config to separate method? It would make further testing easier, I think.
In general, it can be anything that uses trait In general, it can be anything that uses trait `Notifiable`
Oh no, maybe you could add some interface fot that? Oh no, maybe you could add some interface fot that?
|
||||
|
||||
|
Can you type Can you type `$notifiable`?
Can you type Can you type `$notifiable`?
Hm, I don't if I wouldn't put his to Infrastucture directory. Hm, I don't if I wouldn't put his to Infrastucture directory.
Hm, I don't if I wouldn't put his to Infrastucture directory. Hm, I don't if I wouldn't put his to Infrastucture directory.
Could you extract this config to separate method? It would make further testing easier, I think. Could you extract this config to separate method? It would make further testing easier, I think.
Could you extract this config to separate method? It would make further testing easier, I think. Could you extract this config to separate method? It would make further testing easier, I think.
In general, it can be anything that uses trait In general, it can be anything that uses trait `Notifiable`
In general, it can be anything that uses trait In general, it can be anything that uses trait `Notifiable`
Oh no, maybe you could add some interface fot that? Oh no, maybe you could add some interface fot that?
Oh no, maybe you could add some interface fot that? Oh no, maybe you could add some interface fot that?
|
||||
@@ -52,4 +52,4 @@ class Controller extends SlackController
|
||||
|
Please add return type here. Please add return type here.
Please add return type here. Please add return type here.
@EwelinaLasowy , what do you think about word Komenda? :> @EwelinaLasowy , what do you think about word Komenda? :>
@EwelinaLasowy , what do you think about word Komenda? :> @EwelinaLasowy , what do you think about word Komenda? :>
|
||||
->withText(":x: Komenda `/{$this->request->command} {$this->request->text}` jest niepoprawna:")
|
||||
->withAttachments($errors->all());
|
||||
}
|
||||
}
|
||||
|
Please add return type here. Please add return type here.
@EwelinaLasowy , what do you think about word Komenda? :> @EwelinaLasowy , what do you think about word Komenda? :>
|
||||
}
|
||||
|
Please add return type here. Please add return type here.
@EwelinaLasowy , what do you think about word Komenda? :> @EwelinaLasowy , what do you think about word Komenda? :>
|
||||
|
||||
|
Please add return type here. Please add return type here.
Please add return type here. Please add return type here.
@EwelinaLasowy , what do you think about word Komenda? :> @EwelinaLasowy , what do you think about word Komenda? :>
@EwelinaLasowy , what do you think about word Komenda? :> @EwelinaLasowy , what do you think about word Komenda? :>
|
||||
@@ -8,4 +8,4 @@ use Spatie\SlashCommand\Exceptions\SlackSlashCommandException;
|
||||
|
||||
class UserNotFoundException extends SlackSlashCommandException
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ class CatchAll extends BaseHandler
|
||||
->setFields($attachmentFields),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,4 +52,4 @@ class DailySummary extends SignatureHandler
|
||||
```suggestion
$absences = $dailySummaryRetriever->getAbsences($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$remoteDays = $dailySummaryRetriever->getRemoteDays($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$birthdays = $dailySummaryRetriever->getBirthdays($now)
->map(fn(User $user): string => $user->profile->full_name);
```
```suggestion
$absences = $dailySummaryRetriever->getAbsences($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$remoteDays = $dailySummaryRetriever->getRemoteDays($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$birthdays = $dailySummaryRetriever->getBirthdays($now)
->map(fn(User $user): string => $user->profile->full_name);
```
What if we would have five more activities? Maybe this could be encapsulated somehow? What if we would have five more activities? Maybe this could be encapsulated somehow?
What if we would have five more activities? Maybe this could be encapsulated somehow? What if we would have five more activities? Maybe this could be encapsulated somehow?
|
||||
->withAttachment($remoteAttachment)
|
||||
->withAttachment($birthdayAttachment);
|
||||
}
|
||||
}
|
||||
```suggestion
$absences = $dailySummaryRetriever->getAbsences($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$remoteDays = $dailySummaryRetriever->getRemoteDays($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$birthdays = $dailySummaryRetriever->getBirthdays($now)
->map(fn(User $user): string => $user->profile->full_name);
```
What if we would have five more activities? Maybe this could be encapsulated somehow? What if we would have five more activities? Maybe this could be encapsulated somehow?
|
||||
}
|
||||
```suggestion
$absences = $dailySummaryRetriever->getAbsences($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$remoteDays = $dailySummaryRetriever->getRemoteDays($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$birthdays = $dailySummaryRetriever->getBirthdays($now)
->map(fn(User $user): string => $user->profile->full_name);
```
What if we would have five more activities? Maybe this could be encapsulated somehow? What if we would have five more activities? Maybe this could be encapsulated somehow?
|
||||
|
||||
```suggestion
$absences = $dailySummaryRetriever->getAbsences($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$remoteDays = $dailySummaryRetriever->getRemoteDays($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$birthdays = $dailySummaryRetriever->getBirthdays($now)
->map(fn(User $user): string => $user->profile->full_name);
```
```suggestion
$absences = $dailySummaryRetriever->getAbsences($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$remoteDays = $dailySummaryRetriever->getRemoteDays($now)
->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name);
$birthdays = $dailySummaryRetriever->getBirthdays($now)
->map(fn(User $user): string => $user->profile->full_name);
```
What if we would have five more activities? Maybe this could be encapsulated somehow? What if we would have five more activities? Maybe this could be encapsulated somehow?
What if we would have five more activities? Maybe this could be encapsulated somehow? What if we would have five more activities? Maybe this could be encapsulated somehow?
|
||||
@@ -68,4 +68,4 @@ class GiveKeysTo extends SignatureHandler
|
||||
"user.required" => "Musisz podać użytkownika, któremu chcesz przekazać klucze",
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,4 @@ class Help extends SignatureHandler
|
||||
->setFields($attachmentFields),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,4 @@ class HomeOffice extends SignatureHandler
|
||||
"flow_skipped" => false,
|
||||
], $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,4 +28,4 @@ class KeyList extends SignatureHandler
|
||||
->setText($keys->isNotEmpty() ? $keys->implode("\n") : "Nie ma żadnych kluczy w tobym"),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ abstract class SignatureHandler extends BaseSignatureHandler
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +67,4 @@ class TakeKeysFrom extends SignatureHandler
|
||||
"user.required" => "Musisz podać użytkownika, któremu chcesz zabrać klucze",
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ class SlackUserExistsRule implements Rule
|
||||
{
|
||||
return "Użytkownik :input nie istnieje w tobym";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,4 +40,4 @@ trait FindsUserBySlackId
|
||||
|
Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387 Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387
Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387 Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387
Yes. Yes.
`Return value is expected to be 'null|\Toby\Eloquent\Models\User', '\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object' returned `
Yes. Yes.
`Return value is expected to be 'null|\Toby\Eloquent\Models\User', '\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object' returned `
|
||||
{
|
||||
return Str::between($slackId, "<@", "|");
|
||||
}
|
||||
}
|
||||
|
Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387 Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387
Yes. Yes.
`Return value is expected to be 'null|\Toby\Eloquent\Models\User', '\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object' returned `
|
||||
}
|
||||
|
Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387 Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387
Yes. Yes.
`Return value is expected to be 'null|\Toby\Eloquent\Models\User', '\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object' returned `
|
||||
|
||||
|
Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387 Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387
Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387 Is it required here? https://github.com/laravel/framework/blob/9.x/src/Illuminate/Collections/Collection.php#L387
Yes. Yes.
`Return value is expected to be 'null|\Toby\Eloquent\Models\User', '\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object' returned `
Yes. Yes.
`Return value is expected to be 'null|\Toby\Eloquent\Models\User', '\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object' returned `
|
||||
@@ -42,4 +42,4 @@ trait ListsHandlers
|
||||
)
|
||||
->all();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Can you type
$notifiable?Can you type
$notifiable?Hm, I don't if I wouldn't put his to Infrastucture directory.
Hm, I don't if I wouldn't put his to Infrastucture directory.
Could you extract this config to separate method? It would make further testing easier, I think.
Could you extract this config to separate method? It would make further testing easier, I think.
In general, it can be anything that uses trait
NotifiableIn general, it can be anything that uses trait
NotifiableOh no, maybe you could add some interface fot that?
Oh no, maybe you could add some interface fot that?