AbstractCondition   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
getKeyword() 0 1 ?
1
<?php
2
3
namespace Ddeboer\Imap\Search;
4
5
/**
6
 * Represents a condition that can be used in a search expression.
7
 */
8
abstract class AbstractCondition
9
{
10
    /**
11
     * Converts the condition to a string that can be sent to the IMAP server.
12
     *
13
     * @return string
14
     */
15
    public function __toString()
16
    {
17
        return $this->getKeyword();
18
    }
19
20
    /**
21
     * Returns the keyword that the condition represents.
22
     *
23
     * @return string
24
     */
25
    abstract protected function getKeyword();
26
}
27