-
Notifications
You must be signed in to change notification settings - Fork 2
/
AnalysisInterface.php
78 lines (68 loc) · 1.65 KB
/
AnalysisInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
namespace Aternos\Codex\Analysis;
use ArrayAccess;
use Aternos\Codex\Log\AnalysableLogInterface;
use Aternos\Codex\Log\LogInterface;
use Countable;
use Iterator;
use JsonSerializable;
/**
* Interface AnalysisInterface
*
* @package Aternos\Codex\Analysis
*/
interface AnalysisInterface extends Iterator, Countable, ArrayAccess, JsonSerializable
{
/**
* Set the log
*
* @param LogInterface $log
* @return $this
*/
public function setLog(LogInterface $log): static;
/**
* Get the log
*
* @return LogInterface|null
*/
public function getLog(): ?LogInterface;
/**
* Set all insights at once in an array replacing the current insights
*
* @param InsightInterface[] $insights
* @return $this
*/
public function setInsights(array $insights = []): static;
/**
* Add an insight
*
* @param InsightInterface $insight
* @return $this
*/
public function addInsight(InsightInterface $insight): static;
/**
* Get all insights
*
* @return InsightInterface[]
*/
public function getInsights(): array;
/**
* Get all problem insights
*
* @return ProblemInterface[]
*/
public function getProblems(): array;
/**
* Get all information insights
*
* @return InformationInterface[]
*/
public function getInformation(): array;
/**
* Get all insights that are extended from $extendedFrom (class name)
*
* @param class-string<InsightInterface> $extendedFrom
* @return InsightInterface[]
*/
public function getFilteredInsights(string $extendedFrom): array;
}