true() public static method

Always true (tautology).
public static true ( ) : AlwaysTrue
return Webmozart\Expression\Logic\AlwaysTrue The created expression.
 /**
  * {@inheritdoc}
  */
 public function clearRootInstallerDescriptors()
 {
     $this->removeRootInstallerDescriptors(Expr::true());
 }
Example #2
0
 public function orTrue()
 {
     return Expr::true();
 }
 /**
  * {@inheritdoc}
  */
 public function clearServers()
 {
     $this->removeServers(Expr::true());
 }
 /**
  * {@inheritdoc}
  */
 public function clearRootBindings()
 {
     $this->removeRootBindings(Expr::true());
 }
 /**
  * {@inheritdoc}
  */
 public function clearRootPathMappings()
 {
     $this->removeRootPathMappings(Expr::true());
 }
Example #6
0
 public function testAndXIgnoresTrue()
 {
     $conjunction1 = new AndX(array($notNull = new Same('10')));
     $conjunction2 = $conjunction1->andX(Expr::true());
     $this->assertSame($conjunction1, $conjunction2);
 }
 /**
  * {@inheritdoc}
  */
 public function clearPluginClasses()
 {
     $this->removePluginClasses(Expr::true());
 }
Example #8
0
 /**
  * Returns the packages that should be displayed for the given console
  * arguments.
  *
  * @param Args $args The console arguments.
  *
  * @return PackageCollection The packages.
  */
 private function getSelectedPackages(Args $args)
 {
     $states = $this->getSelectedStates($args);
     $expr = Expr::true();
     $envs = array();
     if ($states !== PackageState::all()) {
         $expr = $expr->andMethod('getState', Expr::in($states));
     }
     if ($args->isOptionSet('installer')) {
         $expr = $expr->andMethod('getInstallInfo', Expr::method('getInstallerName', Expr::same($args->getOption('installer'))));
     }
     if ($args->isOptionSet('prod')) {
         $envs[] = Environment::PROD;
     }
     if ($args->isOptionSet('dev')) {
         $envs[] = Environment::DEV;
     }
     if (count($envs) > 0) {
         $expr = $expr->andMethod('getInstallInfo', Expr::method('getEnvironment', Expr::in($envs)));
     }
     return $this->packageManager->findPackages($expr);
 }
Example #9
0
 /**
  * {@inheritdoc}
  */
 public function clearModules()
 {
     $this->removeModules(Expr::true());
 }
Example #10
0
 private function all()
 {
     return Expr::true();
 }
 /**
  * {@inheritdoc}
  */
 public function getAssetMappings()
 {
     return $this->findAssetMappings(Expr::true());
 }
Example #12
0
 /**
  * Returns the packages that should be displayed for the given console
  * arguments.
  *
  * @param Args $args The console arguments.
  *
  * @return PackageCollection The packages.
  */
 private function getSelectedPackages(Args $args)
 {
     $states = $this->getSelectedStates($args);
     $expr = Expr::true();
     if ($states != PackageState::all()) {
         $expr = $expr->andIn($states, Package::STATE);
     }
     if ($args->isOptionSet('installer')) {
         $expr = $expr->andSame($args->getOption('installer'), Package::INSTALLER);
     }
     return $this->packageManager->findPackages($expr);
 }
 /**
  * {@inheritdoc}
  */
 public function clearConfigKeys()
 {
     $this->removeConfigKeys(Expr::true());
 }
 /**
  * {@inheritdoc}
  */
 public function clearPackages()
 {
     $this->removePackages(Expr::true());
 }
Example #15
0
 public function testAndXIgnoresTrue()
 {
     $literal = new TestLiteral('value');
     $conjunction = $literal->andX(Expr::true());
     $this->assertSame($literal, $conjunction);
 }