original_string: public function whereComponent($components, $property, $value, $strict = false)
      {
          return $this->filter(function ($object) use ($components, $property, $value, $strict) {
  
              $hasComponent = false;
  
              foreach ((array) $components as $componentName) {
  
                  if (!$componentAlias = $object->hasComponent($componentName)) {
                      continue;
                  }
  
                  $componentSettings = array_get($object->settings, 'components', []);
  
                  if (!array_key_exists($componentAlias, $componentSettings)) {
                      continue;
                  }
  
                  $settings = $componentSettings[$componentAlias];
  
                  if (!array_key_exists($property, $settings)) {
                      continue;
                  }
  
                  if (
                      ($strict && $settings[$property] === $value) ||
                      (!$strict && $settings[$property] == $value)
                  ) {
                      $hasComponent = true;
                  }
              }
  
              return $hasComponent;
          });
      }
code: public function whereComponent($components, $property, $value, $strict = false)
      {
          return $this->filter(function ($object) use ($components, $property, $value, $strict) {
  
              $hasComponent = false;
  
              foreach ((array) $components as $componentName) {
  
                  if (!$componentAlias = $object->hasComponent($componentName)) {
                      continue;
                  }
  
                  $componentSettings = array_get($object->settings, 'components', []);
  
                  if (!array_key_exists($componentAlias, $componentSettings)) {
                      continue;
                  }
  
                  $settings = $componentSettings[$componentAlias];
  
                  if (!array_key_exists($property, $settings)) {
                      continue;
                  }
  
                  if (
                      ($strict && $settings[$property] === $value) ||
                      (!$strict && $settings[$property] == $value)
                  ) {
                      $hasComponent = true;
                  }
              }
  
              return $hasComponent;
          });
      }
code_tokens: public function whereComponent ( $ components , $ property , $ value , $ strict = false ) { return $ this -> filter ( function ( $ object ) use ( $ components , $ property , $ value , $ strict ) { $ hasComponent = false ; foreach ( ( array ) $ components as $ componentName ) { if ( ! $ componentAlias = $ object -> hasComponent ( $ componentName ) ) { continue ; } $ componentSettings = array_get ( $ object -> settings , 'components' , [ ] ) ; if ( ! array_key_exists ( $ componentAlias , $ componentSettings ) ) { continue ; } $ settings = $ componentSettings [ $ componentAlias ] ; if ( ! array_key_exists ( $ property , $ settings ) ) { continue ; } if ( ( $ strict && $ settings [ $ property ] === $ value ) || ( ! $ strict && $ settings [ $ property ] == $ value ) ) { $ hasComponent = true ; } } return $ hasComponent ; } ) ; }
docstring: Returns objects whose component properties match the supplied value.
  @param mixed $components
  @param string $property
  @param string $value
  @param bool $strict
  @return static
docstring_tokens: Returns objects whose component properties match the supplied value .