lightspeeddevelopment /
lsx-search
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * LSX Search Main Class. |
||
| 4 | * |
||
| 5 | * @package lsx-search |
||
| 6 | */ |
||
| 7 | class LSX_Search { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Holds class instance |
||
| 11 | * |
||
| 12 | * @since 1.0.0 |
||
| 13 | * |
||
| 14 | * @var object LSX_Search() |
||
| 15 | */ |
||
| 16 | protected static $instance = null; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var LSX_Search_Admin() |
||
|
0 ignored issues
–
show
|
|||
| 20 | */ |
||
| 21 | public $admin; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var LSX_Search_Frontend() |
||
|
0 ignored issues
–
show
The type
LSX_Search_Frontend was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 25 | */ |
||
| 26 | public $frontend; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var LSX_Search_FacetWP() |
||
| 30 | */ |
||
| 31 | public $facetwp; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var LSX_Search_Shortcode() |
||
| 35 | */ |
||
| 36 | public $shortcode; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * LSX_Search constructor |
||
| 40 | */ |
||
| 41 | public function __construct() { |
||
| 42 | $this->load_vendors(); |
||
| 43 | |||
| 44 | require_once LSX_SEARCH_PATH . '/classes/class-admin.php'; |
||
| 45 | require_once LSX_SEARCH_PATH . '/classes/class-frontend.php'; |
||
| 46 | require_once LSX_SEARCH_PATH . '/classes/class-lsx-search-facetwp.php'; |
||
| 47 | require_once LSX_SEARCH_PATH . '/classes/class-lsx-search-shortcode.php'; |
||
| 48 | |||
| 49 | $this->admin = \lsx\search\classes\Admin::get_instance(); |
||
| 50 | $this->frontend = \lsx\search\classes\Frontend::get_instance(); |
||
| 51 | $this->facetwp = new LSX_Search_FacetWP(); |
||
| 52 | $this->shortcode = new LSX_Search_Shortcode(); |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Return an instance of this class. |
||
| 57 | * |
||
| 58 | * @since 1.0.0 |
||
| 59 | * |
||
| 60 | * @return object LSX_Search() A single instance of this class. |
||
| 61 | */ |
||
| 62 | public static function get_instance() { |
||
|
0 ignored issues
–
show
|
|||
| 63 | // If the single instance hasn't been set, set it now. |
||
| 64 | if ( null === self::$instance ) { |
||
|
0 ignored issues
–
show
|
|||
| 65 | self::$instance = new self(); |
||
| 66 | } |
||
| 67 | return self::$instance; |
||
| 68 | } |
||
|
0 ignored issues
–
show
|
|||
| 69 | |||
| 70 | /** |
||
| 71 | * Loads the plugin functions. |
||
| 72 | */ |
||
| 73 | private function load_vendors() { |
||
|
0 ignored issues
–
show
|
|||
| 74 | // Configure custom fields. |
||
| 75 | if ( ! class_exists( 'CMB2' ) ) { |
||
|
0 ignored issues
–
show
|
|||
| 76 | require_once LSX_SEARCH_PATH . 'vendor/CMB2/init.php'; |
||
| 77 | } |
||
| 78 | } |
||
|
0 ignored issues
–
show
|
|||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Initiates the LSX Search Plugin |
||
| 83 | * |
||
| 84 | * @return object LSX_Search(); |
||
| 85 | */ |
||
| 86 | function lsx_search() { |
||
|
0 ignored issues
–
show
|
|||
| 87 | global $lsx_search; |
||
| 88 | $lsx_search = LSX_Search::get_instance(); |
||
| 89 | return $lsx_search; |
||
| 90 | } |
||
|
0 ignored issues
–
show
|
|||
| 91 | lsx_search(); |
||
| 92 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths