GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (70)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

Source/Iterators/Standard/IteratorScheme.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Pinq\Iterators\Standard;
4
5
use Pinq\Iterators\Common;
6
use Pinq\Iterators\Generators\IGenerator;
7
8
/**
9
 * Iterator scheme using the extended iterator API.
10
 * Compatible with PHP 5.4.0.
11
 *
12
 * @author Elliot Levin <[email protected]>
13
 */
14
class IteratorScheme extends Common\IteratorScheme
15
{
16
    public static function compatibleWith($phpVersion)
17
    {
18
        return version_compare($phpVersion, '5.4.0', '>=');
19
    }
20
21
    public function createOrderedMap(\Traversable $iterator = null)
22
    {
23
        return new OrderedMap($iterator === null ? null : $this->toIterator($iterator));
24
    }
25
26
    public function createSet(\Traversable $iterator = null)
27
    {
28
        return new Set($iterator === null ? null : $this->toIterator($iterator));
29
    }
30
31
    public function walk(\Traversable $iterator, callable $function)
32
    {
33
        $iterator = $this->adapter($iterator);
34
        $iterator->rewind();
35
36
        while (($element = $iterator->fetch())
37
                && $function($element[1], $element[0]) !== false) {
38
39
        }
40
    }
41
42
    public function toArray(\Traversable $iterator)
43
    {
44
        $iterator = $this->arrayCompatibleIterator($this->adapter($iterator));
45
        $array    = [];
46
47
        $iterator->rewind();
48
        while ($element = $iterator->fetch()) {
49
            $array[$element[0]] =& $element[1];
50
        }
51
52
        return $array;
53
    }
54
55
    /**
56
     * @param \Traversable $iterator
57
     *
58
     * @return IIterator
59
     */
60 View Code Duplication
    public static function adapter(\Traversable $iterator)
61
    {
62
        if ($iterator instanceof IIterator) {
63
            return $iterator;
64
        } elseif ($iterator instanceof IGenerator) {
65
            return new IGeneratorAdapter($iterator);
66
        } elseif ($iterator instanceof \ArrayIterator) {
67
            return new ArrayIteratorAdapter($iterator);
68
        } elseif ($iterator instanceof \IteratorAggregate) {
69
            return static::adapter($iterator->getIterator());
70
        } else {
71
            return new IteratorAdapter($iterator);
72
        }
73
    }
74
75 View Code Duplication
    public function arrayCompatibleIterator(\Traversable $iterator)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
76
    {
77
        $iterator = $this->adapter($iterator);
78
        if ($iterator->isArrayCompatible()) {
79
            return $iterator;
80
        }
81
82
        return new ArrayCompatibleIterator($this->adapter($iterator));
83
    }
84
85
    public function adapterIterator(\Traversable $iterator)
86
    {
87
        return $this->adapter($iterator);
88
    }
89
90
    public function arrayIterator(array $array)
91
    {
92
        return new ArrayIterator($array);
93
    }
94
95
    public function emptyIterator()
96
    {
97
        return new EmptyIterator();
98
    }
99
100
    public function filterIterator(\Traversable $iterator, callable $predicate)
101
    {
102
        return new FilterIterator($this->adapter($iterator), $predicate);
103
    }
104
105
    public function projectionIterator(
106
            \Traversable $iterator,
107
            callable $keyProjectionFunction = null,
108
            callable $valueProjectionFunction = null
109
    ) {
110
        return new ProjectionIterator(
111
                $this->adapter($iterator),
112
                $keyProjectionFunction,
113
                $valueProjectionFunction);
114
    }
115
116
    public function reindexerIterator(\Traversable $iterator)
117
    {
118
        return new ReindexedIterator($this->adapter($iterator));
119
    }
120
121
    public function rangeIterator(\Traversable $iterator, $start, $amount)
122
    {
123
        return new RangeIterator($this->adapter($iterator), $start, $amount);
124
    }
125
126
    public function groupedIterator(
127
            \Traversable $iterator,
128
            callable $groupKeyFunction,
129
            callable $traversableFactory
130
    ) {
131
        return new GroupedIterator(
132
                $this->adapter($iterator),
133
                $groupKeyFunction,
134
                $traversableFactory);
135
    }
136
137
    public function orderedIterator(\Traversable $iterator, callable $function, $isAscending)
138
    {
139
        return new OrderedIterator($this->adapter($iterator), $function, $isAscending);
140
    }
141
142
    public function joinIterator(\Traversable $outerIterator, \Traversable $innerIterator)
143
    {
144
        return new UnfilteredJoinIterator(
145
                $this->adapter($outerIterator),
146
                $this->adapter($innerIterator));
147
    }
148
149
    public function groupJoinIterator(
150
            \Traversable $outerIterator,
151
            \Traversable $innerIterator,
152
            callable $traversableFactory
153
    ) {
154
        return new UnfilteredGroupJoinIterator(
155
                $this->adapter($outerIterator),
156
                $this->adapter($innerIterator),
157
                $traversableFactory);
158
    }
159
160
    protected function setOperationIterator(\Traversable $iterator, Common\SetOperations\ISetFilter $setFilter)
161
    {
162
        return new SetOperationIterator($this->adapter($iterator), $setFilter);
163
    }
164
165
    protected function flattenedIteratorsIterator(\Traversable $iteratorsIterator)
166
    {
167
        return new FlatteningIterator($this->adapter($iteratorsIterator));
168
    }
169
}
170