PHP assumption is a static code analysis tool doing checks for weak assumptions. It helps us to convert our weak assumptions to assertions
sudo apt-get update
sudo apt-get install curl
sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer
sudo mkdir /var/www/html/vrs_project
cd /var/www/html/vrs_project
composer require --dev rskuipers/php-assumptions
For more info. about composer installation and usage : [https://www.1and1.com/cloud-community/learn/application/php/install-and-use-php-composer-on-ubuntu-1604/]
/var/www/html/rentalhomes_fullsolr/vendor$ bin/phpa /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| file | line | message |
============================================================================================================================================================================================================
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 11 | if($keyword) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 16 | if($search_by_property_id == true) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 24 | if( !$keyword ) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 59 | if(SiteConfig::ajaxCache == false && isset($data['result']) && !empty($data['result'])) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 120 | if($search_cache_bucket){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 150 | if($additions) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 156 | if($submitted_list) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 180 | if($favorite == 3) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 184 | elseif($favorite == 2) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 231 | if($isMapDragged) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 301 | if( !$keyword ) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 318 | if(SiteConfig::ajaxCache == false && $cacheEnable) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 318 | if(SiteConfig::ajaxCache == false && $cacheEnable) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 328 | if($add_keyword) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 370 | $result["refresh_type"] = (isset($_REQUEST['page']) && $_REQUEST['page'] != 1) ? "refresh" : ""; |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 371 | $result["stays_home"] = (isset($_REQUEST['stays_home']) && $_REQUEST['stays_home'] != 1) ? "stays_home" : false; |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 429 | if($items){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 453 | if($lat != 0){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 471 | if($search){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 473 | if($geo_results){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 532 | if($listing_properties){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 607 | if ( Yii::app()->params['enabled_im_reconciliation'] == 1 && is_array($im_data) ) |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 667 | if($keyword && $date_start && $date_end){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| /var/www/html/rentalhomes_fullsolr/protected/controllers/ListingController.php | 697 | if($cb_url){ |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24 out of 101 boolean expressions are assumptions (24%)