for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Clubdeuce\WPGoogleMaps;
/**
* Class Info_Window
* @package Clubdeuce\WPGoogleMaps
*/
class Info_Window extends Model_Base {
* @var string
protected $_content = '';
* @var int
protected $_pixel_offset = 0;
* @var array
protected $_position;
protected $_max_width;
* @param string $content
public function set_content( $content ) {
$this->_content = $content;
}
* @param string $offset
public function set_pixel_offset( $offset ) {
$this->_pixel_offset = $offset;
$_pixel_offset
integer
$offset
string
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.
$answer = 42; $correct = false; $correct = (bool) $answer;
* @param array $position
public function set_position( $position ) {
$position = wp_parse_args( $position, array(
'lat' => null,
'lng' => null,
) );
$this->_position = $position;
* @param string $width
public function set_max_width( $width ) {
$this->_max_width = $width;
$_max_width
$width
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.