• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sweetrdf / termTemplates / #93

03 Oct 2025 02:45PM UTC coverage: 86.034%. Remained the same
#93

push

php-coveralls

zozlak
Merge branch 'master' of github.com:sweetrdf/termTemplates

1 of 1 new or added line in 1 file covered. (100.0%)

4 existing lines in 1 file now uncovered.

154 of 179 relevant lines covered (86.03%)

1.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.86
/src/termTemplates/NotTemplate.php
1
<?php
2

3
/*
4
 * The MIT License
5
 *
6
 * Copyright 2022 zozlak.
7
 *
8
 * Permission is hereby granted, free of charge, to any person obtaining a copy
9
 * of this software and associated documentation files (the "Software"), to deal
10
 * in the Software without restriction, including without limitation the rights
11
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
 * copies of the Software, and to permit persons to whom the Software is
13
 * furnished to do so, subject to the following conditions:
14
 *
15
 * The above copyright notice and this permission notice shall be included in
16
 * all copies or substantial portions of the Software.
17
 *
18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
 * THE SOFTWARE.
25
 */
26

27
namespace termTemplates;
28

29
use rdfInterface\TermInterface;
30
use rdfInterface\QuadInterface;
31
use rdfInterface\TermCompareInterface;
32
use rdfInterface\QuadCompareInterface;
33

34
/**
35
 * Provides condition negation 
36
 *
37
 * @author zozlak
38
 */
39
class NotTemplate implements TermCompareInterface, QuadCompareInterface {
40

41
    private TermCompareInterface | QuadCompareInterface $term;
42

43
    public function __construct(TermCompareInterface | QuadCompareInterface $term) {
44
        $this->term = $term;
1✔
45
    }
46

47
    public function __toString(): string {
48
        return '[not ' . $this->term . ']';
1✔
49
    }
50

51
    public function equals(TermInterface | QuadInterface $term): bool {
52
        return !$this->term->equals($term);
1✔
53
    }
54

55
    public function getGraph(): TermCompareInterface | null {
UNCOV
56
        return $this->term instanceof QuadCompareInterface ? $this->term->getGraph() : null;
×
57
    }
58

59
    public function getObject(): TermCompareInterface | null {
UNCOV
60
        return $this->term instanceof QuadCompareInterface ? $this->term->getObject() : null;
×
61
    }
62

63
    public function getPredicate(): TermCompareInterface | null {
UNCOV
64
        return $this->term instanceof QuadCompareInterface ? $this->term->getPredicate() : null;
×
65
    }
66

67
    public function getSubject(): TermCompareInterface | null {
UNCOV
68
        return $this->term instanceof QuadCompareInterface ? $this->term->getSubject() : null;
×
69
    }
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc