Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add CodeSniffing to the travis build. #151

Closed
wants to merge 1 commit into from

2 participants

@blainesch

Fixes #143 -> Good starting point for adding custom rules too!

No dev branch?

@blainesch blainesch commented on the diff
src/Illuminate/Cache/WinCacheStore.php
@@ -46,7 +46,7 @@ protected function retrieveItem($key)
*/
protected function storeItem($key, $value, $minutes)
{
- wincache_ucache_add($this->prefix.$key, value, $minutes * 60);
+ wincache_ucache_add($this->prefix.$key, $value, $minutes * 60);

Not much of a "sniff" here, this should have been caught by a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@bencorlett

I like this. +1

@blainesch blainesch closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 25, 2013
  1. Add CodeSniffing to the travis build.

    Blaine Schmeisser authored
This page is out of date. Refresh to see the latest.
View
6 .travis.yml
@@ -4,8 +4,12 @@ php:
- 5.3
- 5.4
+before_install:
+ - pear install --alldeps pear/PHP_CodeSniffer
+ - phpenv rehash
+
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
-script: phpunit
+script: phpcs --standard=csruleset.xml ./ && phpunit
View
18 csruleset.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<ruleset name="Laravel Standard">
+
+ <description>Laraval Coding Standard</description>
+
+ <exclude-pattern>tests/*</exclude-pattern>
+ <exclude-pattern>vendor/*</exclude-pattern>
+ <exclude-pattern>stubs/*</exclude-pattern>
+ <exclude-pattern>Pheanstalk/*</exclude-pattern>
+ <exclude-pattern>Support/helpers.php</exclude-pattern>
+
+ <rule ref="PSR1"/>
+
+ <rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
+ <exclude-pattern>Foundation/start.php</exclude-pattern>
+ </rule>
+
+</ruleset>
View
2  src/Illuminate/Cache/WinCacheStore.php
@@ -46,7 +46,7 @@ protected function retrieveItem($key)
*/
protected function storeItem($key, $value, $minutes)
{
- wincache_ucache_add($this->prefix.$key, value, $minutes * 60);
+ wincache_ucache_add($this->prefix.$key, $value, $minutes * 60);

Not much of a "sniff" here, this should have been caught by a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
/**
View
3  src/Illuminate/Container/BindingResolutionException.php
@@ -0,0 +1,3 @@
+<?php namespace Illuminate\Container;
+
+class BindingResolutionException extends \Exception {}
View
2  src/Illuminate/Container/Container.php
@@ -1,7 +1,5 @@
<?php namespace Illuminate\Container; use Closure, ArrayAccess, ReflectionParameter;
-class BindingResolutionException extends \Exception {}
-
class Container implements ArrayAccess {
/**
View
3  src/Illuminate/Encryption/DecryptException.php
@@ -0,0 +1,3 @@
+<?php namespace Illuminate\Encryption;
+
+class DecryptException extends \RuntimeException {}
View
2  src/Illuminate/Encryption/Encrypter.php
@@ -1,7 +1,5 @@
<?php namespace Illuminate\Encryption;
-class DecryptException extends \RuntimeException {}
-
class Encrypter {
/**
View
2  src/Illuminate/Events/Dispatcher.php
@@ -118,4 +118,4 @@ public function createClassListener($listener)
};
}
-}
+}
View
3  src/Illuminate/Filesystem/FileNotFoundException.php
@@ -0,0 +1,3 @@
+<?php namespace Illuminate\Filesystem;
+
+class FileNotFoundException extends \Exception {}
View
2  src/Illuminate/Filesystem/Filesystem.php
@@ -2,8 +2,6 @@
use FilesystemIterator;
-class FileNotFoundException extends \Exception {}
-
class Filesystem {
/**
View
2  src/Illuminate/Workbench/Package.php
@@ -73,4 +73,4 @@ public function getFullName()
return $this->lowerVendor.'/'.$this->lowerName;
}
-}
+}
View
2  src/Illuminate/Workbench/Starter.php
@@ -26,4 +26,4 @@ public static function start($path, $finder = null, $files = null)
}
}
-}
+}
Something went wrong with that request. Please try again.