Completed
Push — master ( 1f9c9a...dbd6f1 )
by Nate
04:38
created

ClassMetadata::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1

1 Method

Rating   Name   Duplication   Size   Complexity  
ClassMetadata::getAnnotation() 0 1 ?
1
<?php
2
/*
3
 * Copyright (c) Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
namespace Tebru\Gson;
7
8
use Tebru\Gson\Internal\Data\AnnotationSet;
9
10
11
/**
12
 * Class ClassMetadata
13
 *
14
 * Represents a class an its annotations
15
 *
16
 * @author Nate Brunette <[email protected]>
17
 */
18
interface ClassMetadata
19
{
20
    /**
21
     * Get the class name as a string
22
     *
23
     * @return string
24
     */
25
    public function getName(): string;
26
27
    /**
28
     * Get all class annotations
29
     *
30
     * @return AnnotationSet
31
     */
32
    public function getAnnotations(): AnnotationSet;
33
34
    /**
35
     * Get a specific annotation by class name, returns null if the annotation
36
     * doesn't exist.
37
     *
38
     * @param string $annotationClass
39
     * @return null|object
40
     */
41
    public function getAnnotation(string $annotationClass);
42
}
43