Issues (38)

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.

src/Extras/Primitives/Camera.php (10 issues)

Labels
Severity

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
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jul 4, 2016 - 1:31:08 AM
5
 * Contact      [email protected]
6
 * @copyright   2016 Marko Kungla - https://github.com/mkungla
7
 * @license     The MIT License (MIT)
8
 *
9
 * @category       AframeVR
10
 * @package        aframe-php
11
 *
12
 * Lang         PHP (php version >= 7)
13
 * Encoding     UTF-8
14
 * File         Camera.php
15
 * Code format  PSR-2 and 12
16
 * @link        https://github.com/mkungla/aframe-php
17
 * @issues      https://github.com/mkungla/aframe-php/issues
18
 * ********************************************************************
19
 * Contributors:
20
 * @author Marko Kungla <[email protected]>
21
 * ********************************************************************
22
 * Comments:
23
 * @formatter:on */
24
namespace AframeVR\Extras\Primitives;
25
26
use \AframeVR\Core\Entity;
27
use \AframeVR\Interfaces\EntityInterface;
28
29
class Camera extends Entity implements EntityInterface
30
{
31
32
    /**
33
     * Init <a-camera>
34
     *
35
     * The camera primitive places the user somewhere within the scene. It is an entity that prescribes the camera
36
     * component with mappings to controls-related components.
37
     *
38
     * @return void
39
     */
40 4
    public function reset()
41
    {
42 4
        parent::reset();
43 4
        $this->el()->entity()->attr('Camera');
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
44 4
        $this->active(true);
45 4
        $this->lookControls(true);
46 4
        $this->wasdControls(true);
47 4
    }
48
49
    /**
50
     * camera.active
51
     *
52
     * @param bool $active
53
     * @return \AframeVR\Extras\Primitives\Camera
54
     */
55 4
    public function active(bool $active)
56
    {
57 4
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
58 4
            ->entity()
59 4
            ->attr('Camera')
60 4
            ->active($active);
61 4
        return $this;
62
    }
63
64
    /**
65
     * camera.far
66
     *
67
     * @param float $far
68
     * @return \AframeVR\Extras\Primitives\Camera
69
     */
70 2
    public function far(float $far)
71
    {
72 2
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
73 2
            ->entity()
74 2
            ->attr('Camera')
75 2
            ->far($far);
76 2
        return $this;
77
    }
78
79
    /**
80
     * camera.fov
81
     *
82
     * @param float $fov
83
     * @return \AframeVR\Extras\Primitives\Camera
84
     */
85 2
    public function fov(float $fov)
86
    {
87 2
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
88 2
            ->entity()
89 2
            ->attr('Camera')
90 2
            ->fov($fov);
91 2
        return $this;
92
    }
93
94
    /**
95
     * look-controls.enabled
96
     *
97
     * @param bool $look_controls
98
     * @return \AframeVR\Extras\Primitives\Camera
99
     */
100 4
    public function lookControls(bool $look_controls = true)
101
    {
102 4
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
103 4
            ->entity()
104 4
            ->attr('LookControls')
105 4
            ->enabled($look_controls);
106 4
        return $this;
107
    }
108
109
    /**
110
     * camera.near
111
     *
112
     * @param float $near
113
     * @return \AframeVR\Extras\Primitives\Camera
114
     */
115 2
    public function near(float $near)
116
    {
117 2
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
118 2
            ->entity()
119 2
            ->attr('Camera')
120 2
            ->near($near);
121 2
        return $this;
122
    }
123
124
    /**
125
     * wasd-controls.enabled
126
     *
127
     * @param bool $wasd_controls
128
     * @return \AframeVR\Extras\Primitives\Camera
129
     */
130 4
    public function wasdControls(bool $wasd_controls = true)
131
    {
132 4
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
133 4
            ->entity()
134 4
            ->attr('WASDControls')
135 4
            ->enabled($wasd_controls);
136 4
        return $this;
137
    }
138
139
    /**
140
     * camera.zoom
141
     *
142
     * @param float $zoom
143
     * @return \AframeVR\Extras\Primitives\Camera
144
     */
145 2
    public function zoom(float $zoom)
146
    {
147 2
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
148 2
            ->entity()
149 2
            ->attr('Camera')
150 2
            ->zoom($zoom);
151 2
        return $this;
152
    }
153
154
    /**
155
     * Activate cursor
156
     *
157
     * @return \AframeVR\Extras\Primitives\Camera
158
     */
159 2
    public function cursor()
160
    {
161 2
        $this->el()
0 ignored issues
show
The call to entity() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
The call to cursor() misses a required argument $id.

This check looks for function calls that miss required arguments.

Loading history...
162 2
            ->entity()
163 2
            ->el()
164 2
            ->cursor();
165 2
        return $this;
166
    }
167
}
168
169